summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-08-02 16:58:58 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-08-03 15:01:55 +1000
commitba603ea1925cf68bafe24958d882dbe01d9111a5 (patch)
treeddfa95131cadb05da4464ad99be2ffa479a2185b /src
parentda0fbb580f26aec37ccac9eeb8856e1717d29802 (diff)
touchpad: improve finger counting for synaptics serial touchpads
A three-finger touch may cause slot N to end, in a frame after the BTN_TOOL_TRIPLETAP. This causes tp->nfinger_down to be decremented to 2 as the touch switches to MAYBE_END - which happens to be our num_slots. We exit early and never restore the touch correctly. Fix this by checking that the number of fake touches is equal to the slots, if it is higher then we need to check for recovery. Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/99 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/evdev-mt-touchpad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index 25d0f23b..79f69b7d 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -554,7 +554,7 @@ tp_restore_synaptics_touches(struct tp_dispatch *tp,
return;
if (tp->nfingers_down >= nfake_touches ||
- tp->nfingers_down == tp->num_slots)
+ (tp->nfingers_down == tp->num_slots && nfake_touches == tp->num_slots))
return;
/* Synaptics devices may end touch 2 on BTN_TOOL_TRIPLETAP