Drop the synaptics 3-slot workaround
This commit is contained in:
parent
fe775bd2e0
commit
5c3e81eb3a
@ -1,60 +0,0 @@
|
||||
From 253f8e4152b6c36b87756bb23b16512c3abf7cb8 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Fri, 24 Jul 2015 11:13:41 +1000
|
||||
Subject: [PATCH libinput] touchpad: serial synaptics need to fake new touches
|
||||
on TRIPLETAP
|
||||
|
||||
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 for 4.2
|
||||
(kernel commit dbf3c37086, 4.1.3 is still buggy). 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.steffens@gmail.com>
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Tested-by: Jan Alexander Steffens <jan.steffens@gmail.com>
|
||||
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
src/evdev-mt-touchpad.c | 22 ++++++++++++++++------
|
||||
1 file changed, 16 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
|
||||
index a683d9a..5ef03d5 100644
|
||||
--- a/src/evdev-mt-touchpad.c
|
||||
+++ b/src/evdev-mt-touchpad.c
|
||||
@@ -369,13 +369,23 @@ 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 begin to update immediately */
|
||||
- tp_new_touch(tp, t, time);
|
||||
- tp_begin_touch(tp, t, time);
|
||||
- t->state = TOUCH_UPDATE;
|
||||
+ case TOUCH_NONE:
|
||||
+ /* new touch, move it through to begin immediately */
|
||||
+ tp_new_touch(tp, t, time);
|
||||
+ tp_begin_touch(tp, t, time);
|
||||
+ break;
|
||||
+ case TOUCH_END:
|
||||
+ /* touch just ended ,we need need to restore it to update */
|
||||
+ tp_new_touch(tp, t, time);
|
||||
+ tp_begin_touch(tp, t, time);
|
||||
+ t->state = TOUCH_UPDATE;
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.4.3
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
Name: libinput
|
||||
Version: 1.5.0
|
||||
Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
|
||||
Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
|
||||
Summary: Input device library
|
||||
|
||||
License: MIT
|
||||
@ -18,9 +18,6 @@ Source2: commitid
|
||||
Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz
|
||||
%endif
|
||||
|
||||
# Not upstream, keep until kernel 4.2 or 4.1.x with dbf3c37086
|
||||
Patch01: 0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch
|
||||
|
||||
BuildRequires: git
|
||||
BuildRequires: autoconf automake libtool pkgconfig
|
||||
BuildRequires: libevdev-devel
|
||||
@ -97,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Sep 14 2016 Peter Hutterer <peter.hutterer@redhat.com> 1.5.0-2
|
||||
- Drop the synaptics 3-slot workaround
|
||||
|
||||
* Wed Sep 14 2016 Peter Hutterer <peter.hutterer@redhat.com> 1.5.0-1
|
||||
- libinput 1.5.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user