[mutter/gnome-3-32] display: Dispose Stack after Compositor and X11



commit 8b79c83ad52c58c3dc044ad87040faf09034035f
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Tue Jun 4 11:47:06 2019 +0200

    display: Dispose Stack after Compositor and X11
    
    As per commit 7718e67f, destroying the compositor causes destroying window
    actors and this leads to stack changes, but at this point the stack was already
    disposed and cleared.
    
    So, clear the stack when any component that could use it (compositor, and X11)
    has already been destroyed.
    As consequence, also the stamps should be destroyed at later point.
    
    Fixes https://gitlab.gnome.org/GNOME/mutter/issues/623
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/605
    
    (cherry-picked from commit e94a0fced9104bc96951589a198eacbec50fee82)
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/607

 src/core/display.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 0de99edb2..4f350f0bd 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -920,10 +920,6 @@ meta_display_close (MetaDisplay *display,
 
   g_clear_object (&display->gesture_tracker);
 
-  g_clear_pointer (&display->stack, meta_stack_free);
-  g_clear_pointer (&display->stack_tracker,
-                   meta_stack_tracker_free);
-
   if (display->focus_timeout_id)
     g_source_remove (display->focus_timeout_id);
   display->focus_timeout_id = 0;
@@ -940,12 +936,6 @@ meta_display_close (MetaDisplay *display,
   /* Stop caring about events */
   meta_display_free_events (display);
 
-  /* Must be after all calls to meta_window_unmanage() since they
-   * unregister windows
-   */
-  g_hash_table_destroy (display->wayland_windows);
-  g_hash_table_destroy (display->stamps);
-
   if (display->compositor)
     meta_compositor_destroy (display->compositor);
 
@@ -956,6 +946,16 @@ meta_display_close (MetaDisplay *display,
       g_clear_object (&display->x11_display);
     }
 
+  /* Must be after all calls to meta_window_unmanage() since they
+   * unregister windows
+   */
+  g_hash_table_destroy (display->wayland_windows);
+  g_hash_table_destroy (display->stamps);
+
+  g_clear_pointer (&display->stack, meta_stack_free);
+  g_clear_pointer (&display->stack_tracker,
+                   meta_stack_tracker_free);
+
   meta_display_shutdown_keys (display);
 
   g_clear_object (&display->bell);


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