[gtk/gtk-3-24: 1/2] gdk/wayland: Fix pointer-gestures version selection
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 1/2] gdk/wayland: Fix pointer-gestures version selection
- Date: Mon, 5 Jul 2021 13:16:20 +0000 (UTC)
commit 92ba4bf3961b6e35f22331fc9e85fd44e6f2c81b
Author: Vlad Zahorodnii <vlad zahorodnii kde org>
Date: Mon Jun 21 09:22:29 2021 +0300
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.
gdk/wayland/gdkdisplay-wayland.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index fc5e40807f..dee7632c3a 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -460,12 +460,12 @@ gdk_registry_handle_global (void *data,
display_wayland->subcompositor =
wl_registry_bind (display_wayland->wl_registry, id, &wl_subcompositor_interface, 1);
}
- else if (strcmp (interface, "zwp_pointer_gestures_v1") == 0 &&
- version == GDK_ZWP_POINTER_GESTURES_V1_VERSION)
+ else if (strcmp (interface, "zwp_pointer_gestures_v1") == 0)
{
display_wayland->pointer_gestures =
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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]