[PATCH libinput] touchpad: don't do speed-based thumb detection on single-touch or semi-mts

Peter Hutterer peter.hutterer at who-t.net
Tue Feb 27 06:40:45 UTC 2018


Because life is too short for this

https://bugs.freedesktop.org/show_bug.cgi?id=105265

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev-mt-touchpad.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index 62ba678e..2a6cdcef 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -92,6 +92,10 @@ tp_calculate_motion_speed(struct tp_dispatch *tp, struct tp_touch *t)
 	double distance;
 	double speed;
 
+	/* Don't do this on single-touch or semi-mt devices */
+	if (!tp->has_mt || tp->semi_mt)
+		return;
+
 	/* This doesn't kick in until we have at least 4 events in the
 	 * motion history. As a side-effect, this automatically handles the
 	 * 2fg scroll where a finger is down and moving fast before the
-- 
2.14.3



More information about the wayland-devel mailing list