gestures: avoid processing the last hold and motion event twice

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 <jose.exposito89@gmail.com>
This commit is contained in:
José Expósito 2021-10-07 08:34:43 +02:00
parent 89cd0f990e
commit cf929e9835

View file

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