From: Peter Hutterer Date: Wed, 29 Jul 2015 07:12:53 +0000 (+1000) Subject: gestures: check ntouches, not just num_slots for the number of fingers X-Git-Tag: 0.21.0~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d40aefecad44982cb90f9bfe3c3e33102c2bd27;p=platform%2Fupstream%2Flibinput.git gestures: check ntouches, not just num_slots for the number of fingers 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 Reviewed-by: Hans de Goede --- diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c index 8bcdeb40..6b1a273c 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;