mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 04:22:05 +00:00
x11: Push error trap querying the _MUTTER_FRAME_FOR property
It is a possibility that this request results in an error, so handle the possible fallout. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2745>
This commit is contained in:
parent
1cee0579fa
commit
8789e1b7d9
@ -1490,13 +1490,23 @@ handle_other_xevent (MetaX11Display *x11_display,
|
||||
unsigned long nitems, bytes_after, *data;
|
||||
|
||||
/* Check whether the new window is a frame for another window */
|
||||
meta_x11_error_trap_push (x11_display);
|
||||
|
||||
if (XGetWindowProperty (x11_display->xdisplay,
|
||||
event->xmaprequest.window,
|
||||
x11_display->atom__MUTTER_FRAME_FOR,
|
||||
0, 32, False, XA_WINDOW,
|
||||
&type, &format, &nitems, &bytes_after,
|
||||
(guchar **) &data) == Success &&
|
||||
nitems == 1)
|
||||
(guchar **) &data) != Success)
|
||||
{
|
||||
meta_x11_error_trap_pop (x11_display);
|
||||
break;
|
||||
}
|
||||
|
||||
if (meta_x11_error_trap_pop_with_return (x11_display) != Success)
|
||||
break;
|
||||
|
||||
if (nitems == 1)
|
||||
{
|
||||
Window client_window;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user