diff options
| -rw-r--r-- | meta/recipes-graphics/wayland/libinput/touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch | 72 | ||||
| -rw-r--r-- | meta/recipes-graphics/wayland/libinput_0.21.0.bb (renamed from meta/recipes-graphics/wayland/libinput_0.18.0.bb) | 5 |
2 files changed, 75 insertions, 2 deletions
diff --git a/meta/recipes-graphics/wayland/libinput/touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch b/meta/recipes-graphics/wayland/libinput/touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch new file mode 100644 index 0000000000..97c63bd377 --- /dev/null +++ b/meta/recipes-graphics/wayland/libinput/touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | This is a workaround upstream suggests for use with kernel 4.1. | ||
| 2 | |||
| 3 | Upstream-Status: Inappropriate [temporary work-around] | ||
| 4 | Signed-Off-By: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
| 5 | |||
| 6 | |||
| 7 | |||
| 8 | From: Peter Hutterer <peter.hutterer@who-t.net> | ||
| 9 | Date: Mon Aug 3 18:23:12 PDT 2015 | ||
| 10 | Subject: [PATCH v3 libinput] touchpad: serial synaptics need to fake new touches on TRIPLETAP | ||
| 11 | |||
| 12 | On the 4.1 kernels synaptics pretends to have 3 slots (the serial fw only does | ||
| 13 | 2). This was added to avoid cursor jumps but has since been reverted for 4.2 | ||
| 14 | (kernel commit dbf3c37086, 4.1.3 is still buggy). In some cases a TRIPLETAP | ||
| 15 | may be triggered without slot 2 ever activating. | ||
| 16 | |||
| 17 | While there are still those kernels out there, work around this bug by opening | ||
| 18 | a new touch point where none exists if the fake finger count exceeds the slot | ||
| 19 | count. | ||
| 20 | |||
| 21 | Reported-by: Jan Alexander Steffens <jan.steffens at gmail.com> | ||
| 22 | Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net> | ||
| 23 | Tested-by: Jan Alexander Steffens <jan.steffens at gmail.com> | ||
| 24 | Reviewed-by: Hans de Goede <hdegoede at redhat.com> | ||
| 25 | --- | ||
| 26 | Changes to v2: | ||
| 27 | - split out the handling instead of having a tmp state variable, see Hans' | ||
| 28 | comments from v2 | ||
| 29 | |||
| 30 | Mainly sending this to the list again so I have a link to point people to. | ||
| 31 | If you're on 4.1.x add this patch to your distribution package. | ||
| 32 | |||
| 33 | src/evdev-mt-touchpad.c | 22 ++++++++++++++++------ | ||
| 34 | 1 file changed, 16 insertions(+), 6 deletions(-) | ||
| 35 | |||
| 36 | diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c | ||
| 37 | index a683d9a..5ef03d5 100644 | ||
| 38 | --- a/src/evdev-mt-touchpad.c | ||
| 39 | +++ b/src/evdev-mt-touchpad.c | ||
| 40 | @@ -369,13 +369,23 @@ tp_restore_synaptics_touches(struct tp_dispatch *tp, | ||
| 41 | for (i = 0; i < tp->num_slots; i++) { | ||
| 42 | struct tp_touch *t = tp_get_touch(tp, i); | ||
| 43 | |||
| 44 | - if (t->state != TOUCH_END) | ||
| 45 | + switch(t->state) { | ||
| 46 | + case TOUCH_HOVERING: | ||
| 47 | + case TOUCH_BEGIN: | ||
| 48 | + case TOUCH_UPDATE: | ||
| 49 | continue; | ||
| 50 | - | ||
| 51 | - /* new touch, move it through begin to update immediately */ | ||
| 52 | - tp_new_touch(tp, t, time); | ||
| 53 | - tp_begin_touch(tp, t, time); | ||
| 54 | - t->state = TOUCH_UPDATE; | ||
| 55 | + case TOUCH_NONE: | ||
| 56 | + /* new touch, move it through to begin immediately */ | ||
| 57 | + tp_new_touch(tp, t, time); | ||
| 58 | + tp_begin_touch(tp, t, time); | ||
| 59 | + break; | ||
| 60 | + case TOUCH_END: | ||
| 61 | + /* touch just ended ,we need need to restore it to update */ | ||
| 62 | + tp_new_touch(tp, t, time); | ||
| 63 | + tp_begin_touch(tp, t, time); | ||
| 64 | + t->state = TOUCH_UPDATE; | ||
| 65 | + break; | ||
| 66 | + } | ||
| 67 | } | ||
| 68 | } | ||
| 69 | |||
| 70 | -- | ||
| 71 | 2.4.3 | ||
| 72 | |||
diff --git a/meta/recipes-graphics/wayland/libinput_0.18.0.bb b/meta/recipes-graphics/wayland/libinput_0.21.0.bb index 8e8e6a7c41..d51fb372d7 100644 --- a/meta/recipes-graphics/wayland/libinput_0.18.0.bb +++ b/meta/recipes-graphics/wayland/libinput_0.21.0.bb | |||
| @@ -9,9 +9,10 @@ DEPENDS = "libevdev udev mtdev" | |||
| 9 | 9 | ||
| 10 | SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \ | 10 | SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \ |
| 11 | file://libinput-configure.ac-add-arg-with-libunwind.patch \ | 11 | file://libinput-configure.ac-add-arg-with-libunwind.patch \ |
| 12 | file://touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch \ | ||
| 12 | " | 13 | " |
| 13 | SRC_URI[md5sum] = "0ddbb0d53d58dec0a86de6791560011a" | 14 | SRC_URI[md5sum] = "f91d8f4ced986f1ae16d52ea02bc7837" |
| 14 | SRC_URI[sha256sum] = "64a70f96bab17a22eaf2fd7af17cf83def3388374096c7623be9448f62808cda" | 15 | SRC_URI[sha256sum] = "7cce7a9e510dfe5c4a19ad00e9350808d4f59f8611fd2b5e87213c507283f550" |
| 15 | 16 | ||
| 16 | inherit autotools pkgconfig | 17 | inherit autotools pkgconfig |
| 17 | 18 | ||
