mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 05:50:05 +01:00
touchpad: cancel any ongoing gesture if we're about to send a button
This shouldn't have any effect in the current setup as there is "coincidentally" no overlap between the two state machines so this is effectively a noop. Nonetheless, if we're about to send a tap button event we cannot be in any other gesture than tapping so all swipe/pinch/holds need to be cancelled. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1042>
This commit is contained in:
parent
114af53824
commit
c73fc78407
1 changed files with 2 additions and 0 deletions
|
|
@ -136,6 +136,8 @@ tp_tap_notify(struct tp_dispatch *tp,
|
|||
if (nfingers < 1 || nfingers > 3)
|
||||
return;
|
||||
|
||||
tp_gesture_cancel(tp, time);
|
||||
|
||||
button = button_map[tp->tap.map][nfingers - 1];
|
||||
|
||||
if (state == LIBINPUT_BUTTON_STATE_PRESSED)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue