frame: Handle X11 errors earlier on frame setting
Avoid changing the stack information if we fail earlier than that Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3732>
This commit is contained in:
parent
e1dbf102dc
commit
b0df2d0f7d
@ -122,6 +122,15 @@ meta_window_x11_set_frame_xwindow (MetaWindow *window,
|
|||||||
if (META_X11_DISPLAY_HAS_SHAPE (x11_display))
|
if (META_X11_DISPLAY_HAS_SHAPE (x11_display))
|
||||||
XShapeSelectInput (x11_display->xdisplay, frame->xwindow, ShapeNotifyMask);
|
XShapeSelectInput (x11_display->xdisplay, frame->xwindow, ShapeNotifyMask);
|
||||||
|
|
||||||
|
if (mtk_x11_error_trap_pop_with_return (x11_display->xdisplay))
|
||||||
|
{
|
||||||
|
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||||
|
"Setting up frame for window %s failed", window->desc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mtk_x11_error_trap_push (x11_display->xdisplay);
|
||||||
|
|
||||||
meta_x11_display_register_x_window (x11_display, &frame->xwindow, window);
|
meta_x11_display_register_x_window (x11_display, &frame->xwindow, window);
|
||||||
|
|
||||||
meta_stack_tracker_record_remove (window->display->stack_tracker,
|
meta_stack_tracker_record_remove (window->display->stack_tracker,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user