[PATCH libinput] gestures: check ntouches, not just num_slots for the number of fingers

Peter Hutterer peter.hutterer at who-t.net
Wed Jul 29 02:53:56 PDT 2015


We need to check fake fingers as well as real fingers, especially for
two-finger scrolling on single-touch touchpads with BTN_TOOL_DOUBLETAP.

https://bugzilla.redhat.com/show_bug.cgi?id=1246651

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

diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c
index 8bcdeb4..6b1a273 100644
--- a/src/evdev-mt-touchpad-gestures.c
+++ b/src/evdev-mt-touchpad-gestures.c
@@ -157,7 +157,7 @@ tp_gesture_get_active_touches(struct tp_dispatch *tp,
 
 	memset(touches, 0, count * sizeof(struct tp_touch *));
 
-	for (i = 0; i < tp->num_slots; i++) {
+	for (i = 0; i < tp->ntouches; i++) {
 		t = &tp->touches[i];
 		if (tp_touch_active(tp, t)) {
 			touches[n++] = t;
-- 
2.4.3



More information about the wayland-devel mailing list