GNOME Bugzilla – Bug 744604
stage: Process state update event immediately
Last modified: 2015-02-16 17:21:47 UTC
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.
Created attachment 296952 [details] [review] stage: Process state update event immediately
Created attachment 296954 [details] [review] 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.
Review of attachment 296954 [details] [review]: it looks good; one minor comment. ::: clutter/clutter-stage.c @@ +4551,3 @@ + clutter_stage_event (stage, event); + clutter_event_free (event); how about you just put the event on the stack, so we don't have to deal with an additional allocation?
There is some logic in clutter-event.c : https://git.gnome.org/browse/clutter/tree/clutter/clutter-event.c#n1198 If you're comfortable with by passing that, I'll do it.
(In reply to Lionel Landwerlin from comment #4) > There is some logic in clutter-event.c : > https://git.gnome.org/browse/clutter/tree/clutter/clutter-event.c#n1198 > > If you're comfortable with by passing that, I'll do it. in this specific case, it does not matter at all. stage state events do not have ancillary data; the only reason we allocated them was because they were going on the stage specific queue, so they had to survive until the queue got consumed.
Created attachment 296956 [details] [review] 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.
Review of attachment 296956 [details] [review]: looks good.
Review of attachment 296956 [details] [review]: Pushed to master.