summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-01-25 10:50:02 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-01-25 11:31:37 +1000
commit71fcd387f716f46b553f6646561cd33f3ca2eb54 (patch)
treea6cb93c35aa8cf57d279d509e4cd0ea57e2168f6 /src
parent05bec986819af2d06986e0f5cf2e5257e88c0cc9 (diff)
gestures: jump straight to swipe for 3+ finger gestures on ST touchpads
The first/second variables are only needed for pinch, so we can skip them here. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/evdev-mt-touchpad-gestures.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c
index 5aa256fd..8fe0bb85 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;