Hi,
On 24-07-15 04:54, Peter Hutterer wrote:
On the 4.1 kernels synaptics pretends to have 3 slots (the serial fw only does
2). This was added to avoid cursor jumps but has since been reverted.
In some cases a TRIPLETAP may be triggered without slot 2 ever activating.
While there are still those kernels out there, work around this bug by opening
a new touch point where none exists if the fake finger count exceeds the slot
count.
Reported-by: Jan Alexander Steffens <jan.steff...@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
Tested-by: Jan Alexander Steffens <jan.steff...@gmail.com>
I'm not sure if we really want to work around kernel bugs like this, hasn't the
revert of the broken commit been scheduled for a 4.1.x update ?
IMHO we should just urge people ti upgrade to 4.1.x then.
---
src/evdev-mt-touchpad.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index 6718b61..376f394 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -368,13 +368,22 @@ tp_restore_synaptics_touches(struct tp_dispatch *tp,
for (i = 0; i < tp->num_slots; i++) {
struct tp_touch *t = tp_get_touch(tp, i);
- if (t->state != TOUCH_END)
+ switch(t->state) {
+ case TOUCH_HOVERING:
+ case TOUCH_BEGIN:
+ case TOUCH_UPDATE:
continue;
+ /* new touch, move it through to begin immediately */
+ case TOUCH_NONE:
+ case TOUCH_END:
+ tp_new_touch(tp, t, time);
+ tp_begin_touch(tp, t, time);
+ break;
+ }
- /* new touch, move it through begin to update immediately */
- tp_new_touch(tp, t, time);
- tp_begin_touch(tp, t, time);
- t->state = TOUCH_UPDATE;
+ /* touch just ended ,we need need to restore it to update */
+ if (t->state == TOUCH_END)
+ t->state = TOUCH_UPDATE;
This will now never trigger, if the touch was in TOUCH_END state it has gone
through tp_begin_touch in the switch/case and will now be in TOUCH_BEGIN.
Regards,
Hans
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel