summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2024-03-12 15:16:43 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2024-03-12 15:19:59 +1000
commit15609213a64461e5351ea13556a308a8eb65acc9 (patch)
tree508b97e7b0f87fad580bc361fc61d7447a59ce91
parent6faab3a1d4268da0d59af27fdf918bdd3bd7ba45 (diff)
touchpad: disable the immediate scroll state if tapping is enabled
On a touchpad without gestures we would take a 2-finger touch as immediate start to a 2-finger scroll gesture. This effectively removes the 1mm threshold we otherwise have before scrolling is assumed to have started. If tapping is enabled and a user triggers a small motion event this results in scroll events being sent before the two-finger tap. Closes #981 Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/982>
-rw-r--r--src/evdev-mt-touchpad-gestures.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c
index 1e5d039b..e92b9f4a 100644
--- a/src/evdev-mt-touchpad-gestures.c
+++ b/src/evdev-mt-touchpad-gestures.c
@@ -1074,10 +1074,8 @@ tp_gesture_handle_state_none(struct tp_dispatch *tp, uint64_t time)
return;
}
- if (!tp->gesture.enabled) {
- if (ntouches == 2)
- tp_gesture_handle_event(tp, GESTURE_EVENT_SCROLL, time);
-
+ if (!tp->gesture.enabled && !tp->tap.enabled && ntouches == 2) {
+ tp_gesture_handle_event(tp, GESTURE_EVENT_SCROLL, time);
return;
}