From e8495b8d36796735f93d207ce40dff96533070fa Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 10 Sep 2024 14:44:23 +1000 Subject: [PATCH] gestures: cancel the hold before initializing the pinch If we're in state HOLD we have an ongoing hold gesture - make sure we cancel that one first before we initialize the pinch. Part-of: --- src/evdev-mt-touchpad-gestures.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c index e92b9f4a..9802d106 100644 --- a/src/evdev-mt-touchpad-gestures.c +++ b/src/evdev-mt-touchpad-gestures.c @@ -650,8 +650,8 @@ tp_gesture_handle_event_on_state_hold(struct tp_dispatch *tp, tp->gesture.state = GESTURE_STATE_SWIPE; break; case GESTURE_EVENT_PINCH: - tp_gesture_init_pinch(tp); tp_gesture_cancel(tp, time); + tp_gesture_init_pinch(tp); tp->gesture.state = GESTURE_STATE_PINCH; break; case GESTURE_EVENT_HOLD_TIMEOUT: