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.
This commit is contained in:
Matthias Clasen
2023-08-04 07:45:59 -04:00
parent c6693b7fb7
commit 645043d5a2

View File

@@ -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;
}