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



commit 323742e736448d116702baaab85a234a2bab81d8
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.

 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]