From 27fa51cfa6a4991bfd81e239a2bd7118ac122ed8 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 15 Dec 2021 20:33:03 -0500 Subject: [PATCH] wayland: Add sequences for touchpad gestures It makes sense. --- gdk/wayland/gdkdevice-wayland.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 24633ea7d3..d82db04fb2 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -137,6 +137,7 @@ struct _GdkWaylandPointerData { guint cursor_timeout_id; guint cursor_image_index; guint cursor_image_delay; + guint touchpad_event_sequence; guint current_output_scale; GSList *pointer_surface_outputs; @@ -2667,8 +2668,11 @@ emit_gesture_swipe_event (GdkWaylandSeat *seat, seat->pointer_info.time = _time; + if (phase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN) + seat->pointer_info.touchpad_event_sequence++; + event = gdk_touchpad_event_new_swipe (seat->pointer_info.focus, - NULL, + GDK_SLOT_TO_EVENT_SEQUENCE (seat->pointer_info.touchpad_event_sequence), seat->logical_pointer, _time, device_get_modifiers (seat->logical_pointer), @@ -2764,8 +2768,11 @@ emit_gesture_pinch_event (GdkWaylandSeat *seat, seat->pointer_info.time = _time; + if (phase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN) + seat->pointer_info.touchpad_event_sequence++; + event = gdk_touchpad_event_new_pinch (seat->pointer_info.focus, - NULL, + GDK_SLOT_TO_EVENT_SEQUENCE (seat->pointer_info.touchpad_event_sequence), seat->logical_pointer, _time, device_get_modifiers (seat->logical_pointer),