gestures: cancel the hold before initializing the pinch

If we're in state HOLD we have an ongoing hold gesture - make sure we
cancel that one first before we initialize the pinch.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1046>
This commit is contained in:
Peter Hutterer 2024-09-10 14:44:23 +10:00 committed by Marge Bot
parent efdd536120
commit e8495b8d36

View file

@ -650,8 +650,8 @@ tp_gesture_handle_event_on_state_hold(struct tp_dispatch *tp,
tp->gesture.state = GESTURE_STATE_SWIPE;
break;
case GESTURE_EVENT_PINCH:
tp_gesture_init_pinch(tp);
tp_gesture_cancel(tp, time);
tp_gesture_init_pinch(tp);
tp->gesture.state = GESTURE_STATE_PINCH;
break;
case GESTURE_EVENT_HOLD_TIMEOUT: