From cf929e98351662243b64b41cdb7c9ce4bb7455d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Date: Thu, 7 Oct 2021 08:34:43 +0200 Subject: [PATCH] gestures: avoid processing the last hold and motion event twice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During the transition from GESTURE_STATE_HOLD_AND_MOTION to GESTURE_STATE_POINTER_MOTION the last pointer motion event was processed twice. Fix #680 Signed-off-by: José Expósito --- src/evdev-mt-touchpad-gestures.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c index aa949ae1..a9f4644c 100644 --- a/src/evdev-mt-touchpad-gestures.c +++ b/src/evdev-mt-touchpad-gestures.c @@ -1256,12 +1256,12 @@ tp_gesture_post_gesture(struct tp_dispatch *tp, uint64_t time, if (tp->gesture.state == GESTURE_STATE_HOLD) tp_gesture_handle_state_hold(tp, time, ignore_motion); - if (tp->gesture.state == GESTURE_STATE_HOLD_AND_MOTION) - tp_gesture_handle_state_hold_and_pointer_motion(tp, time); - if (tp->gesture.state == GESTURE_STATE_POINTER_MOTION) tp_gesture_handle_state_pointer_motion(tp, time); + if (tp->gesture.state == GESTURE_STATE_HOLD_AND_MOTION) + tp_gesture_handle_state_hold_and_pointer_motion(tp, time); + if (tp->gesture.state == GESTURE_STATE_SCROLL) tp_gesture_handle_state_scroll(tp, time);