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>
This commit is contained in:
José Expósito 2021-11-02 19:37:07 +01:00
parent be3c09bc15
commit 5e44861e0e

View file

@ -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;
}