gdk/wayland: add support for wl_seat version 6
authorSimon Ser <contact@emersion.fr>
Wed, 11 Aug 2021 08:59:35 +0000 (10:59 +0200)
committerSimon Ser <contact@emersion.fr>
Wed, 11 Aug 2021 14:36:57 +0000 (16:36 +0200)
Version 6 adds two new wl_touch events, which can be ignored.

gdk/wayland/gdkdevice-wayland.c
gdk/wayland/gdkdisplay-wayland.c

index 2371fc0e84f1b17fdeb983c397ec265d807cc574..dc876b1f9a94a7cfabd34acdffe0ae35cef7e259 100644 (file)
@@ -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 = {
index ad033076b41796f9cff07b72058e66ffd9d50147..f075a71c5927b29acfec7beeac9ad04351d8b756 100644 (file)
@@ -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);