1
0
Fork 0

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:
Marco Trevisan (Treviño) 2024-05-04 04:30:57 +02:00 committed by Marge Bot
parent e1dbf102dc
commit b0df2d0f7d

View file

@ -122,6 +122,15 @@ meta_window_x11_set_frame_xwindow (MetaWindow *window,
if (META_X11_DISPLAY_HAS_SHAPE (x11_display))
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_stack_tracker_record_remove (window->display->stack_tracker,