From 645043d5a24eec8c2454974d5c96b23bae04b4ba Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 4 Aug 2023 07:45:59 -0400 Subject: [PATCH] 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. --- gdk/wayland/gdkdisplay-wayland.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.30.2