clutter: Drop _clutter_clear_events_queue_for_stage()

There's only one stage. Let's not overcomplicate things, as it
will not be possible to simply go through the event queue inspecting
every event.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1448
This commit is contained in:
Carlos Garnacho 2020-08-11 19:30:17 +02:00
parent 41042b18d6
commit a270b6a2ce
3 changed files with 1 additions and 26 deletions

View File

@ -18,7 +18,6 @@ gboolean _clutter_event_process_filters (ClutterEvent *eve
/* clears the event queue inside the main context */
void _clutter_clear_events_queue (void);
void _clutter_clear_events_queue_for_stage (ClutterStage *stage);
CLUTTER_EXPORT
void _clutter_event_set_platform_data (ClutterEvent *event,

View File

@ -2327,30 +2327,6 @@ _clutter_clear_events_queue (void)
}
}
void
_clutter_clear_events_queue_for_stage (ClutterStage *stage)
{
ClutterMainContext *context = _clutter_context_get_default ();
GList *l, *next;
if (context->events_queue == NULL)
return;
/* Remove any pending events for this stage from the event queue */
for (l = context->events_queue->head; l; l = next)
{
ClutterEvent *event = l->data;
next = l->next;
if (event->any.stage == stage)
{
g_queue_delete_link (context->events_queue, l);
clutter_event_free (event);
}
}
}
ClutterPickMode
_clutter_context_get_pick_mode (void)
{

View File

@ -1680,7 +1680,7 @@ clutter_stage_dispose (GObject *object)
clutter_actor_hide (CLUTTER_ACTOR (object));
_clutter_clear_events_queue_for_stage (stage);
_clutter_clear_events_queue ();
if (priv->impl != NULL)
{