Commit a9f2300a authored by Lionel Landwerlin's avatar Lionel Landwerlin

stage: Process state update event immediately

The _clutter_stage_update_state() function is currently putting events
into the Clutter event queue. This leads to problems in the gdk
backend because there are assumptions upon the numbers of queued
events, and how many of them should be moved from the main event queue
to the ClutterStages' event queues.

This change triggers the processing of the state update events on the
stage directly, so the main event queue retains the expected number of
events.

https://bugzilla.gnome.org/show_bug.cgi?id=744604
parent 344e1384
......@@ -4532,7 +4532,7 @@ _clutter_stage_update_state (ClutterStage *stage,
ClutterStageState set_flags)
{
ClutterStageState new_state;
ClutterEvent *event;
ClutterEvent event;
new_state = stage->priv->current_state;
new_state |= set_flags;
......@@ -4541,15 +4541,16 @@ _clutter_stage_update_state (ClutterStage *stage,
if (new_state == stage->priv->current_state)
return FALSE;
event = clutter_event_new (CLUTTER_STAGE_STATE);
clutter_event_set_stage (event, stage);
memset (&event, 0, sizeof (event));
event.type = CLUTTER_STAGE_STATE;
clutter_event_set_stage (&event, stage);
event->stage_state.new_state = new_state;
event->stage_state.changed_mask = new_state ^ stage->priv->current_state;
event.stage_state.new_state = new_state;
event.stage_state.changed_mask = new_state ^ stage->priv->current_state;
stage->priv->current_state = new_state;
_clutter_event_push (event, FALSE);
clutter_stage_event (stage, &event);
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment