[mutter/wip/carlosg/input-thread: 152/160] clutter: Drop _clutter_clear_events_queue_for_stage()




commit 39eda801663aca158df1a638ba58c1552749c849
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Aug 11 19:30:17 2020 +0200

    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 abf1e25093..14b4ae8a11 100644
--- a/clutter/clutter/clutter-main.c
+++ b/clutter/clutter/clutter-main.c
@@ -2300,30 +2300,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 4d02dc898e..eaadc46de4 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)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]