mirror of
https://github.com/brl/mutter.git
synced 2025-02-23 08:24:09 +00:00
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
This commit is contained in:
parent
344e13844d
commit
a9f2300af1
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user