[gtk: 1/3] gdk/wayland: add support for wl_seat version 6




commit 00abaed89ae35d4c5c6b7e5b719bd27913684b79
Author: Simon Ser <contact emersion fr>
Date:   Wed Aug 11 10:59:35 2021 +0200

    gdk/wayland: add support for wl_seat version 6
    
    Version 6 adds two new wl_touch events, which can be ignored.

 gdk/wayland/gdkdevice-wayland.c  | 21 ++++++++++++++++++++-
 gdk/wayland/gdkdisplay-wayland.c |  2 +-
 2 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 2371fc0e84..dc876b1f9a 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -2634,6 +2634,23 @@ touch_handle_cancel (void            *data,
   GDK_SEAT_NOTE (seat, EVENTS, g_message ("touch cancel"));
 }
 
+static void
+touch_handle_shape (void            *data,
+                    struct wl_touch *touch,
+                    int32_t         id,
+                    wl_fixed_t      major,
+                    wl_fixed_t      minor)
+{
+}
+
+static void
+touch_handle_orientation (void            *data,
+                          struct wl_touch *touch,
+                          int32_t         id,
+                          wl_fixed_t      orientation)
+{
+}
+
 static void
 emit_gesture_swipe_event (GdkWaylandSeat          *seat,
                           GdkTouchpadGesturePhase  phase,
@@ -3021,7 +3038,9 @@ static const struct wl_touch_listener touch_listener = {
   touch_handle_up,
   touch_handle_motion,
   touch_handle_frame,
-  touch_handle_cancel
+  touch_handle_cancel,
+  touch_handle_shape,
+  touch_handle_orientation,
 };
 
 static const struct zwp_pointer_gesture_swipe_v1_listener gesture_swipe_listener = {
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index ad033076b4..f075a71c59 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -240,7 +240,7 @@ _gdk_wayland_display_add_seat (GdkWaylandDisplay *display_wayland,
 {
   struct wl_seat *seat;
 
-  display_wayland->seat_version = MIN (version, 5);
+  display_wayland->seat_version = MIN (version, 6);
   seat = wl_registry_bind (display_wayland->wl_registry,
                            id, &wl_seat_interface,
                            display_wayland->seat_version);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]