frames: Fix XGetWMNormalHints return value check

It returns non-0 if there are any hints in the WM_NORMAL_HINTS
property, 0 if there are none.

Fixes the mouse cursor changing to the resize shape over the decorations
of non-resizable windows.

Fixes: c7b3d8c607 ("frames: Push error traps around various X11 calls")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3096>
This commit is contained in:
Michel Dänzer 2023-06-27 12:09:13 +02:00 committed by Marge Bot
parent db0870b114
commit e95499038d

View File

@ -446,10 +446,10 @@ frame_sync_wm_normal_hints (GtkWindow *frame,
gdk_x11_display_error_trap_push (display);
if (XGetWMNormalHints (gdk_x11_display_get_xdisplay (display),
if (!XGetWMNormalHints (gdk_x11_display_get_xdisplay (display),
client_window,
&size_hints,
&nitems) != Success)
&nitems))
{
gdk_x11_display_error_trap_pop_ignored (display);
return;