gdk/wayland: Fix pointer-gestures version selection
version == GDK_ZWP_POINTER_GESTURES_V1_VERSION will fail if the compositor implements version 2 of pointer-gestures-v1.
This commit is contained in:
parent
1fa2969a05
commit
92ba4bf396
@ -460,12 +460,12 @@ gdk_registry_handle_global (void *data,
|
|||||||
display_wayland->subcompositor =
|
display_wayland->subcompositor =
|
||||||
wl_registry_bind (display_wayland->wl_registry, id, &wl_subcompositor_interface, 1);
|
wl_registry_bind (display_wayland->wl_registry, id, &wl_subcompositor_interface, 1);
|
||||||
}
|
}
|
||||||
else if (strcmp (interface, "zwp_pointer_gestures_v1") == 0 &&
|
else if (strcmp (interface, "zwp_pointer_gestures_v1") == 0)
|
||||||
version == GDK_ZWP_POINTER_GESTURES_V1_VERSION)
|
|
||||||
{
|
{
|
||||||
display_wayland->pointer_gestures =
|
display_wayland->pointer_gestures =
|
||||||
wl_registry_bind (display_wayland->wl_registry,
|
wl_registry_bind (display_wayland->wl_registry,
|
||||||
id, &zwp_pointer_gestures_v1_interface, version);
|
id, &zwp_pointer_gestures_v1_interface,
|
||||||
|
MIN (version, GDK_ZWP_POINTER_GESTURES_V1_VERSION));
|
||||||
}
|
}
|
||||||
else if (strcmp (interface, "gtk_primary_selection_device_manager") == 0)
|
else if (strcmp (interface, "gtk_primary_selection_device_manager") == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user