path: root/src
diff options
authorPeter Hutterer <>2016-02-24 13:46:48 +1000
committerPeter Hutterer <>2016-02-28 20:35:59 +1000
commitdbb85f67396ce47ca0fb66b610b3818f9a041ca0 (patch)
tree17a4ec44904b5e976f012e606af30a876b2851e5 /src
parent45e5847bf3e755532b2b6a62b74b85fcdadf2e36 (diff)
touchpad: only trigger immediate pinch detection for three fingers
If the fingers are vertically apart by more than 20mm we used to assume a pinch gesture immediately. This is too close together for some users during two-finger scrolling. Since we should always bias towards scrolling, only trigger this detection for three fingers, the rest has to go through the movement detection. The reason for the pinch detection here was to differentiate from 3fg swipe gestures (83f3dbd1), hence we're still in spirit of that patch. Signed-off-by: Peter Hutterer <> Tested-by: Jan Alexander Steffens (heftig) <> Reviewed-by: Hans de Goede <>
Diffstat (limited to 'src')
1 files changed, 1 insertions, 0 deletions
diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c
index dc8d6060..3c8f5a7a 100644
--- a/src/evdev-mt-touchpad-gestures.c
+++ b/src/evdev-mt-touchpad-gestures.c
@@ -339,6 +339,7 @@ tp_gesture_handle_state_unknown(struct tp_dispatch *tp, uint64_t time)
/* Else check if one finger is > 20mm below the others */
vert_distance = abs(first->point.y - second->point.y);
if (vert_distance > 20 * yres &&
+ tp->gesture.finger_count > 2 &&
tp->gesture.enabled) {