From 5e44861e0ed7fdb447170a03adb9ff361ae6e4ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Exp=C3=B3sito?= Date: Tue, 2 Nov 2021 19:37:07 +0100 Subject: [PATCH] gestures: cancel hold gestures on thumb detection MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Before hold gestures where implemented, when a thumb was detected it was enough to reset the state machine. However, now it is possible to detect a thumb while a hold gesture is in course. Cancel any ongoing gesture when a thumb is detected to avoid dropping the gesture end event. See #693 Signed-off-by: José Expósito --- 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 a9f4644..c933bb0 100644 --- a/src/evdev-mt-touchpad-gestures.c +++ b/src/evdev-mt-touchpad-gestures.c @@ -958,7 +958,7 @@ tp_gesture_detect_motion_gestures(struct tp_dispatch *tp, uint64_t time) */ if (tp->thumb.detect_thumbs && thumb_mm < min_move) { tp_thumb_suppress(tp, thumb); - tp_gesture_handle_event(tp, GESTURE_EVENT_RESET, time); + tp_gesture_cancel(tp, time); return; } -- 2.7.4