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
This commit is contained in:
Carlos Garnacho 2019-06-14 17:26:23 +02:00 committed by Carlos Garnacho
parent 879f5f0dbb
commit 0c5866a9e1

View File

@ -190,9 +190,13 @@ meta_window_destroy_frame (MetaWindow *window)
"Incrementing unmaps_pending on %s for reparent back to root\n", window->desc); "Incrementing unmaps_pending on %s for reparent back to root\n", window->desc);
window->unmaps_pending += 1; window->unmaps_pending += 1;
} }
if (!x11_display->closing)
{
meta_stack_tracker_record_add (window->display->stack_tracker, meta_stack_tracker_record_add (window->display->stack_tracker,
window->xwindow, window->xwindow,
XNextRequest (x11_display->xdisplay)); XNextRequest (x11_display->xdisplay));
XReparentWindow (x11_display->xdisplay, XReparentWindow (x11_display->xdisplay,
window->xwindow, window->xwindow,
x11_display->xroot, x11_display->xroot,
@ -202,6 +206,8 @@ meta_window_destroy_frame (MetaWindow *window)
*/ */
window->frame->rect.x + borders.invisible.left, window->frame->rect.x + borders.invisible.left,
window->frame->rect.y + borders.invisible.top); window->frame->rect.y + borders.invisible.top);
}
meta_x11_error_trap_pop (x11_display); meta_x11_error_trap_pop (x11_display);
meta_ui_frame_unmanage (frame->ui_frame); meta_ui_frame_unmanage (frame->ui_frame);