From 6f3ce4de242f93de9494efc1c0665d137a46c1b2 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 11 Aug 2020 19:30:17 +0200 Subject: [PATCH] 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/1403 --- clutter/clutter/clutter-main.c | 24 ------------------------ clutter/clutter/clutter-stage.c | 2 +- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c index 1acc63264..a4828fe73 100644 --- a/clutter/clutter/clutter-main.c +++ b/clutter/clutter/clutter-main.c @@ -2297,30 +2297,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) { diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c index e8509ad55..9c00a59a7 100644 --- a/clutter/clutter/clutter-stage.c +++ b/clutter/clutter/clutter-stage.c @@ -1660,7 +1660,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) {