summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Expósito <jose.exposito89@gmail.com>2021-11-02 19:37:07 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2021-12-13 13:07:33 +1000
commit54275910dde7612b4323532f743a1b80bff039ab (patch)
tree5ac50984cc99f8677640e07bc7cee4d2c04e05e5
parent033aee76abf08dd178ba078da17176c196fbb1f9 (diff)
downloadlibinput-54275910dde7612b4323532f743a1b80bff039ab.tar.gz
gestures: cancel hold gestures on thumb detection
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 <jose.exposito89@gmail.com> (cherry picked from commit 5e44861e0ed7fdb447170a03adb9ff361ae6e4ce)
-rw-r--r--src/evdev-mt-touchpad-gestures.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c
index a9f4644c..c933bb0f 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;
}