[PATCH libinput] gestures: jump straight to swipe for 3+ finger gestures on ST touchpads
Peter Hutterer
peter.hutterer at who-t.net
Sun Jan 24 19:03:28 PST 2016
The first/second variables are only needed for pinch, so we can skip them
here.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/evdev-mt-touchpad-gestures.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c
index 5aa256f..8fe0bb8 100644
--- a/src/evdev-mt-touchpad-gestures.c
+++ b/src/evdev-mt-touchpad-gestures.c
@@ -240,6 +240,13 @@ tp_gesture_handle_state_none(struct tp_dispatch *tp, uint64_t time)
if (ntouches < 2)
return GESTURE_STATE_NONE;
+ if (!tp->gesture.enabled) {
+ if (ntouches == 2)
+ return GESTURE_STATE_SCROLL;
+ else
+ return GESTURE_STATE_SWIPE;
+ }
+
first = touches[0];
second = touches[1];
@@ -271,8 +278,7 @@ tp_gesture_handle_state_none(struct tp_dispatch *tp, uint64_t time)
if (first == second)
return GESTURE_STATE_NONE;
- } else if (!tp->gesture.enabled)
- return GESTURE_STATE_SCROLL;
+ }
tp->gesture.initial_time = time;
first->gesture.initial = first->point;
--
2.5.0
More information about the wayland-devel
mailing list