From: Matthias Clasen Date: Fri, 4 Aug 2023 11:45:59 +0000 (-0400) Subject: wayland: Fix gtk-shell protocol handling X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~6^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=645043d5a24eec8c2454974d5c96b23bae04b4ba;p=gtk4.git wayland: Fix gtk-shell protocol handling The protocol spec isn't clear about the relationship between the capability enum and the uint in the capability event. Fix things to use the same relationship as mutter. --- diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index 95c5fa7803..59e0373c9f 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -2185,8 +2185,9 @@ set_capability_setting (GdkDisplay *display, enum gtk_shell1_capability test) { GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display); + int testbit = 1 << (test - 1); - g_value_set_boolean (value, (display_wayland->shell_capabilities & test) == test); + g_value_set_boolean (value, (display_wayland->shell_capabilities & testbit) == testbit); return TRUE; }