[mutter/wip/carlosg/xwayland-on-demand: 15/16] core: Avoid queueing a stack operation on the frame when the X11 is closing
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/xwayland-on-demand: 15/16] core: Avoid queueing a stack operation on the frame when the X11 is closing
- Date: Tue, 6 Aug 2019 00:43:01 +0000 (UTC)
commit 0c5866a9e1bb1116bec6d5320351935210aae277
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 | 30 ++++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)
---
diff --git a/src/core/frame.c b/src/core/frame.c
index 769946147..dd837ec87 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -190,18 +190,24 @@ 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));
- XReparentWindow (x11_display->xdisplay,
- window->xwindow,
- x11_display->xroot,
- /* Using anything other than client root window coordinates
- * coordinates here means we'll need to ensure a configure
- * notify event is sent; see bug 399552.
- */
- window->frame->rect.x + borders.invisible.left,
- window->frame->rect.y + borders.invisible.top);
+
+ 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,
+ /* Using anything other than client root window coordinates
+ * coordinates here means we'll need to ensure a configure
+ * notify event is sent; see bug 399552.
+ */
+ window->frame->rect.x + borders.invisible.left,
+ window->frame->rect.y + borders.invisible.top);
+ }
+
meta_x11_error_trap_pop (x11_display);
meta_ui_frame_unmanage (frame->ui_frame);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]