[mutter] x11-display: Stop special casing barriers when iterating window table



commit 1992aa1567939a507fef647c702599620a4b010e
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Tue Mar 15 23:13:44 2022 +0100

    x11-display: Stop special casing barriers when iterating window table
    
    In the past, barries were added to the window management X11 display
    instance window table, and then special cased when iterating over the
    list.
    
    Since then, barriers, which are really part of the backend, has stopped
    being added to the window hash table, instead being managed by the
    backend. Lets clean up the left-over special casing that is no longer
    needed.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2442>

 src/x11/meta-x11-display.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c
index 3139246ccf..b424dee70e 100644
--- a/src/x11/meta-x11-display.c
+++ b/src/x11/meta-x11-display.c
@@ -107,17 +107,10 @@ meta_x11_display_unmanage_windows (MetaX11Display *x11_display)
 
   for (l = windows; l; l = l->next)
     {
-      if (META_IS_WINDOW (l->data))
-        {
-          MetaWindow *window = l->data;
+      MetaWindow *window = META_WINDOW (l->data);
 
-          if (!window->unmanaging)
-            meta_window_unmanage (window, META_CURRENT_TIME);
-        }
-      else if (META_IS_BARRIER (l->data))
-        meta_barrier_destroy (META_BARRIER (l->data));
-      else
-        g_assert_not_reached ();
+      if (!window->unmanaging)
+        meta_window_unmanage (window, META_CURRENT_TIME);
     }
   g_list_free_full (windows, g_object_unref);
 }


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