[mutter/wip/carlosg/xwayland-on-demand: 14/15] core: Avoid queueing a stack operation on the frame when the X11 is closing



commit 3252a97085db68a19d69f73557899b6fcc7a882e
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Jun 14 17:26:23 2019 +0200

    core: Avoid queueing a stack operation on the frame when the X11 is closing
    
    When rushing to unmanage X11 windows after the X11 connection is closed/ing,
    this would succeed at creating a stack operation for no longer known windows.
    Simply avoid to queue a stack operation if we know it's meaningless.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/709

 src/core/frame.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/core/frame.c b/src/core/frame.c
index 769946147..2ff221272 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -190,9 +190,14 @@ meta_window_destroy_frame (MetaWindow *window)
                   "Incrementing unmaps_pending on %s for reparent back to root\n", window->desc);
       window->unmaps_pending += 1;
     }
-  meta_stack_tracker_record_add (window->display->stack_tracker,
-                                 window->xwindow,
-                                 XNextRequest (x11_display->xdisplay));
+
+  if (!x11_display->closing)
+    {
+      meta_stack_tracker_record_add (window->display->stack_tracker,
+                                     window->xwindow,
+                                     XNextRequest (x11_display->xdisplay));
+    }
+
   XReparentWindow (x11_display->xdisplay,
                    window->xwindow,
                    x11_display->xroot,


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