From e635b1e23974e2608a5398d1d09951ee7b37ed93 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 16 Jan 2015 14:40:08 +1000 Subject: [PATCH 001/317] libinput 0.8.0 --- .gitignore | 1 + libinput.spec | 9 ++++++--- sources | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 89a7f09..6eba3d3 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /libinput-20141124.tar.xz /libinput-0.7.0.tar.xz /libinput-20141211.tar.xz +/libinput-0.8.0.tar.xz diff --git a/libinput.spec b/libinput.spec index 8b58d10..378c65e 100644 --- a/libinput.spec +++ b/libinput.spec @@ -1,9 +1,9 @@ -%global gitdate 20141211 +#global gitdate 20141211 %global gitversion 58abea394 Name: libinput -Version: 0.7.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 0.8.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -80,6 +80,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Jan 19 2015 Peter Hutterer 0.8.0-1 +- libinput 0.8.0 + * Thu Dec 11 2014 Peter Hutterer 0.7.0-2.20141211git58abea394 - git snapshot, fixes a crasher and fd confusion after suspending a device diff --git a/sources b/sources index 8d518f9..e42d94e 100644 --- a/sources +++ b/sources @@ -2,3 +2,4 @@ f63a656eb93117da43302566df0de874 libinput-20141124.tar.xz 381b61396de28c12716ef7a5475fea50 libinput-0.7.0.tar.xz e632f825162535bac32e9087d8281c7e libinput-20141211.tar.xz +9ac28ca42670d38d8f785e96506c9227 libinput-0.8.0.tar.xz From bb75bfec12c6255617e82500c23961bcf774357e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 22 Jan 2015 07:29:11 +1000 Subject: [PATCH 002/317] Trim sources file Signed-off-by: Peter Hutterer --- sources | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sources b/sources index e42d94e..84af50e 100644 --- a/sources +++ b/sources @@ -1,5 +1 @@ -3afaf9f66d8796323a79edb879c10ba3 libinput-0.6.0.tar.xz -f63a656eb93117da43302566df0de874 libinput-20141124.tar.xz -381b61396de28c12716ef7a5475fea50 libinput-0.7.0.tar.xz -e632f825162535bac32e9087d8281c7e libinput-20141211.tar.xz 9ac28ca42670d38d8f785e96506c9227 libinput-0.8.0.tar.xz From 6c5096bae57edaa8335acdd054da38c14f749a3d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 30 Jan 2015 14:29:07 +1000 Subject: [PATCH 003/317] libinput 0.9.0 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6eba3d3..575d59a 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /libinput-0.7.0.tar.xz /libinput-20141211.tar.xz /libinput-0.8.0.tar.xz +/libinput-0.9.0.tar.xz diff --git a/libinput.spec b/libinput.spec index 378c65e..dfbf039 100644 --- a/libinput.spec +++ b/libinput.spec @@ -2,7 +2,7 @@ %global gitversion 58abea394 Name: libinput -Version: 0.8.0 +Version: 0.9.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -80,6 +80,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Jan 30 2015 Peter Hutterer 0.9.0-1 +- libinput 0.9.0 + * Mon Jan 19 2015 Peter Hutterer 0.8.0-1 - libinput 0.8.0 diff --git a/sources b/sources index 84af50e..50cbf0a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9ac28ca42670d38d8f785e96506c9227 libinput-0.8.0.tar.xz +9995e0f8f13966674f4f7130ad83fa85 libinput-0.9.0.tar.xz From 9c9d37a2ec115d78ee4aec54336e8b39b01f9057 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 6 Feb 2015 10:49:15 +1000 Subject: [PATCH 004/317] libinput 0.10.0 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 575d59a..da3c959 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /libinput-20141211.tar.xz /libinput-0.8.0.tar.xz /libinput-0.9.0.tar.xz +/libinput-0.10.0.tar.xz diff --git a/libinput.spec b/libinput.spec index dfbf039..6b2b186 100644 --- a/libinput.spec +++ b/libinput.spec @@ -2,7 +2,7 @@ %global gitversion 58abea394 Name: libinput -Version: 0.9.0 +Version: 0.10.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -80,6 +80,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Feb 06 2015 Peter Hutterer 0.10.0-1 +- libinput 0.10.0 + * Fri Jan 30 2015 Peter Hutterer 0.9.0-1 - libinput 0.9.0 diff --git a/sources b/sources index 50cbf0a..deb94f0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9995e0f8f13966674f4f7130ad83fa85 libinput-0.9.0.tar.xz +05f7d54380ff033d421944d906dc1ecb libinput-0.10.0.tar.xz From 2b6aa58f36784be58d30f775bcfc92bcd23b0f41 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 23 Feb 2015 11:07:22 +1000 Subject: [PATCH 005/317] libinput 0.11.0 --- .gitignore | 1 + libinput.spec | 7 ++++++- sources | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index da3c959..d8f58b5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /libinput-0.8.0.tar.xz /libinput-0.9.0.tar.xz /libinput-0.10.0.tar.xz +/libinput-0.11.0.tar.xz diff --git a/libinput.spec b/libinput.spec index 6b2b186..7dadddd 100644 --- a/libinput.spec +++ b/libinput.spec @@ -2,7 +2,7 @@ %global gitversion 58abea394 Name: libinput -Version: 0.10.0 +Version: 0.11.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -72,6 +72,8 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %files %doc COPYING %{_libdir}/libinput.so.* +%{_libdir}/udev/libinput-device-group +%{_libdir}/udev/rules.d/80-libinput-device-groups.rules %files devel %{_includedir}/libinput.h @@ -80,6 +82,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Feb 23 2015 Peter Hutterer 0.11.0-1 +- libinput 0.11.0 + * Fri Feb 06 2015 Peter Hutterer 0.10.0-1 - libinput 0.10.0 diff --git a/sources b/sources index deb94f0..08cfbd0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -05f7d54380ff033d421944d906dc1ecb libinput-0.10.0.tar.xz +59fef57c3a3151d6f4be539469d67e37 libinput-0.11.0.tar.xz From ff3b4cb46c272b9eba15464d314aa106bb21b1d5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 10 Mar 2015 09:57:07 +1000 Subject: [PATCH 006/317] libinput 0.12.0 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d8f58b5..d919da8 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /libinput-0.9.0.tar.xz /libinput-0.10.0.tar.xz /libinput-0.11.0.tar.xz +/libinput-0.12.0.tar.xz diff --git a/libinput.spec b/libinput.spec index 7dadddd..15b7420 100644 --- a/libinput.spec +++ b/libinput.spec @@ -2,7 +2,7 @@ %global gitversion 58abea394 Name: libinput -Version: 0.11.0 +Version: 0.12.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -82,6 +82,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Mar 10 2015 Peter Hutterer 0.12.0-1 +- libinput 0.12.0 + * Mon Feb 23 2015 Peter Hutterer 0.11.0-1 - libinput 0.11.0 diff --git a/sources b/sources index 08cfbd0..decc8ee 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -59fef57c3a3151d6f4be539469d67e37 libinput-0.11.0.tar.xz +cc1a8c710a90264d1464c81d657064d2 libinput-0.12.0.tar.xz From 48d863fbb3f85a8b32d6e70969881b72c58d5663 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 20 Mar 2015 07:50:52 +1000 Subject: [PATCH 007/317] Install the udev rules in the udevdir, not libdir (#1203645) --- libinput.spec | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libinput.spec b/libinput.spec index 15b7420..6a5b214 100644 --- a/libinput.spec +++ b/libinput.spec @@ -1,9 +1,11 @@ +%global udevdir %(pkg-config --variable=udevdir udev) + #global gitdate 20141211 %global gitversion 58abea394 Name: libinput Version: 0.12.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -55,7 +57,7 @@ git am -p1 %{patches} < /dev/null %build autoreconf -v --install --force || exit 1 -%configure --disable-static --disable-silent-rules +%configure --disable-static --disable-silent-rules --with-udev-dir=%{udevdir} make %{?_smp_mflags} @@ -72,8 +74,8 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %files %doc COPYING %{_libdir}/libinput.so.* -%{_libdir}/udev/libinput-device-group -%{_libdir}/udev/rules.d/80-libinput-device-groups.rules +%{udevdir}/libinput-device-group +%{udevdir}/rules.d/80-libinput-device-groups.rules %files devel %{_includedir}/libinput.h @@ -82,6 +84,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Mar 20 2015 Peter Hutterer 0.12.0-2 +- Install the udev rules in the udevdir, not libdir (#1203645) + * Tue Mar 10 2015 Peter Hutterer 0.12.0-1 - libinput 0.12.0 From f974be87a0dde6182e9922d8f40478db66a42448 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 24 Mar 2015 16:26:43 +1000 Subject: [PATCH 008/317] libinput 0.13.0 --- .gitignore | 1 + libinput.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d919da8..114e2ba 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /libinput-0.10.0.tar.xz /libinput-0.11.0.tar.xz /libinput-0.12.0.tar.xz +/libinput-0.13.0.tar.xz diff --git a/libinput.spec b/libinput.spec index 6a5b214..6cf9d58 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 0.12.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 0.13.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -84,6 +84,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Mar 24 2015 Peter Hutterer 0.13.0-1 +- libinput 0.13.0 + * Fri Mar 20 2015 Peter Hutterer 0.12.0-2 - Install the udev rules in the udevdir, not libdir (#1203645) diff --git a/sources b/sources index decc8ee..e7ac0bd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cc1a8c710a90264d1464c81d657064d2 libinput-0.12.0.tar.xz +bb58f489b9ce99f6b89bf087b67d4a69 libinput-0.13.0.tar.xz From f8ec5f9c7bebd698f5c0a7b8c2f871b947a83686 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 8 Apr 2015 09:20:22 +1000 Subject: [PATCH 009/317] Fix crasher triggered by fake MT devices without ABS_X/Y (#1207574) --- ...-evdev-fix-crash-for-missing-ABS_X-Y.patch | 35 +++++++ ...ng-of-fake-MT-devices-without-ABS_X-.patch | 94 +++++++++++++++++++ libinput.spec | 8 +- 3 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 0001-evdev-fix-crash-for-missing-ABS_X-Y.patch create mode 100644 0002-evdev-fix-handling-of-fake-MT-devices-without-ABS_X-.patch diff --git a/0001-evdev-fix-crash-for-missing-ABS_X-Y.patch b/0001-evdev-fix-crash-for-missing-ABS_X-Y.patch new file mode 100644 index 0000000..2865ded --- /dev/null +++ b/0001-evdev-fix-crash-for-missing-ABS_X-Y.patch @@ -0,0 +1,35 @@ +From 06fbf985f8d63572a0674f1904680d275fe2b2f3 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 8 Apr 2015 07:43:54 +1000 +Subject: [PATCH libinput] evdev: fix crash for missing ABS_X/Y + +libevdev_set_abs_info() is a noop if the event code isn't enabled on the +device. This leaves ABS_X/Y on NULL, causing a crash later when dereferencing +the absinfo. + +https://bugs.freedesktop.org/show_bug.cgi?id=89783 + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index a972b9d..115dc99 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1444,9 +1444,9 @@ evdev_fix_android_mt(struct evdev_device *device) + !libevdev_has_event_code(evdev, EV_ABS, ABS_MT_POSITION_Y)) + return; + +- libevdev_set_abs_info(evdev, ABS_X, ++ libevdev_enable_event_code(evdev, EV_ABS, ABS_X, + libevdev_get_abs_info(evdev, ABS_MT_POSITION_X)); +- libevdev_set_abs_info(evdev, ABS_Y, ++ libevdev_enable_event_code(evdev, EV_ABS, ABS_Y, + libevdev_get_abs_info(evdev, ABS_MT_POSITION_Y)); + } + +-- +2.3.4 + diff --git a/0002-evdev-fix-handling-of-fake-MT-devices-without-ABS_X-.patch b/0002-evdev-fix-handling-of-fake-MT-devices-without-ABS_X-.patch new file mode 100644 index 0000000..9d9e9a8 --- /dev/null +++ b/0002-evdev-fix-handling-of-fake-MT-devices-without-ABS_X-.patch @@ -0,0 +1,94 @@ +From a0834969d166285714bf18041044aa23a38a8413 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 8 Apr 2015 08:11:54 +1000 +Subject: [PATCH libinput] evdev: fix handling of fake MT devices without + ABS_X/Y + +The previous code didn't handle fake MT devices without ABS_X/Y axes at all +(like the Razer BlackWidow keyboard). Those devices usually start at ABS_MISC +and go up to ABS_MAX, thus triggering the Android check. + +Split the condition up: if the device is not a fake MT device we check for the +Android missing axes first and add them. Then we proceed, but now we know that +the ABS_X axis must exist. + +https://bugs.freedesktop.org/show_bug.cgi?id=89783 + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 29 +++++++++++++++++++++-------- + 1 file changed, 21 insertions(+), 8 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index 115dc99..1712a8d 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1374,6 +1374,10 @@ evdev_fix_abs_resolution(struct evdev_device *device, + return 0; + } + ++ if (!libevdev_has_event_code(evdev, EV_ABS, xcode) || ++ !libevdev_has_event_code(evdev, EV_ABS, ycode)) ++ return 0; ++ + absx = libevdev_get_abs_info(evdev, xcode); + absy = libevdev_get_abs_info(evdev, ycode); + +@@ -1431,6 +1435,18 @@ evdev_device_get_udev_tags(struct evdev_device *device, + return tags; + } + ++/* Fake MT devices have the ABS_MT_SLOT bit set because of ++ the limited ABS_* range - they aren't MT devices, they ++ just have too many ABS_ axes */ ++static inline bool ++evdev_is_fake_mt_device(struct evdev_device *device) ++{ ++ struct libevdev *evdev = device->evdev; ++ ++ return libevdev_has_event_code(evdev, EV_ABS, ABS_MT_SLOT) && ++ libevdev_get_num_slots(evdev) == -1; ++} ++ + static inline void + evdev_fix_android_mt(struct evdev_device *device) + { +@@ -1441,7 +1457,8 @@ evdev_fix_android_mt(struct evdev_device *device) + return; + + if (!libevdev_has_event_code(evdev, EV_ABS, ABS_MT_POSITION_X) || +- !libevdev_has_event_code(evdev, EV_ABS, ABS_MT_POSITION_Y)) ++ !libevdev_has_event_code(evdev, EV_ABS, ABS_MT_POSITION_Y) || ++ !evdev_is_fake_mt_device(device)) + return; + + libevdev_enable_event_code(evdev, EV_ABS, ABS_X, +@@ -1611,10 +1628,10 @@ evdev_configure_device(struct evdev_device *device) + return -1; + } + +- if (libevdev_has_event_code(evdev, EV_ABS, ABS_X) || +- libevdev_has_event_code(evdev, EV_ABS, ABS_MT_POSITION_X)) { ++ if (!evdev_is_fake_mt_device(device)) + evdev_fix_android_mt(device); + ++ if (libevdev_has_event_code(evdev, EV_ABS, ABS_X)) { + if (evdev_fix_abs_resolution(device, + ABS_X, + ABS_Y, +@@ -1624,11 +1641,7 @@ evdev_configure_device(struct evdev_device *device) + device->abs.absinfo_x = libevdev_get_abs_info(evdev, ABS_X); + device->abs.absinfo_y = libevdev_get_abs_info(evdev, ABS_Y); + +- /* Fake MT devices have the ABS_MT_SLOT bit set because of +- the limited ABS_* range - they aren't MT devices, they +- just have too many ABS_ axes */ +- if (libevdev_has_event_code(evdev, EV_ABS, ABS_MT_SLOT) && +- libevdev_get_num_slots(evdev) == -1) { ++ if (evdev_is_fake_mt_device(device)) { + udev_tags &= ~EVDEV_UDEV_TAG_TOUCHSCREEN; + } else if (evdev_configure_mt_device(device) == -1) { + return -1; +-- +2.3.4 + diff --git a/libinput.spec b/libinput.spec index 6cf9d58..f068374 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.13.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,9 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-evdev-fix-crash-for-missing-ABS_X-Y.patch +Patch02: 0002-evdev-fix-handling-of-fake-MT-devices-without-ABS_X-.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -84,6 +87,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Apr 08 2015 Peter Hutterer 0.13.0-2 +- Fix crasher triggered by fake MT devices without ABS_X/Y (#1207574) + * Tue Mar 24 2015 Peter Hutterer 0.13.0-1 - libinput 0.13.0 From 3164021ea1ef20e11ba334b95405f99668c30d58 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 8 Apr 2015 16:04:06 +1000 Subject: [PATCH 010/317] Fix mouse slowdown (#1208992) --- ...dev-fix-inverted-mouse-normalization.patch | 32 +++++++++++++++++++ libinput.spec | 6 +++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 0001-evdev-fix-inverted-mouse-normalization.patch diff --git a/0001-evdev-fix-inverted-mouse-normalization.patch b/0001-evdev-fix-inverted-mouse-normalization.patch new file mode 100644 index 0000000..581e39b --- /dev/null +++ b/0001-evdev-fix-inverted-mouse-normalization.patch @@ -0,0 +1,32 @@ +From 64b5e52868db96be9b899ba98b02d061a838304e Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 8 Apr 2015 15:52:58 +1000 +Subject: [PATCH libinput] evdev: fix inverted mouse normalization + +Regression introduced in 9f8edc5fd880e0a9c482b36e6b4120ccc056ee0b where it +changed from delta / (dpi/default) to delta * dpi/default, causing the inverse +effect of what the dpi setting is supposed to achieve. + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index 00450bf..243cd22 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -230,8 +230,8 @@ normalize_delta(struct evdev_device *device, + const struct device_coords *delta, + struct normalized_coords *normalized) + { +- normalized->x = delta->x * (double)device->dpi / DEFAULT_MOUSE_DPI; +- normalized->y = delta->y * (double)device->dpi / DEFAULT_MOUSE_DPI; ++ normalized->x = delta->x * DEFAULT_MOUSE_DPI / (double)device->dpi; ++ normalized->y = delta->y * DEFAULT_MOUSE_DPI / (double)device->dpi; + } + + static void +-- +2.3.4 + diff --git a/libinput.spec b/libinput.spec index f068374..66eda63 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.13.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -20,6 +20,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} Patch01: 0001-evdev-fix-crash-for-missing-ABS_X-Y.patch Patch02: 0002-evdev-fix-handling-of-fake-MT-devices-without-ABS_X-.patch +Patch03: 0001-evdev-fix-inverted-mouse-normalization.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -87,6 +88,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Apr 08 2015 Peter Hutterer 0.13.0-3 +- Fix mouse slowdown (#1208992) + * Wed Apr 08 2015 Peter Hutterer 0.13.0-2 - Fix crasher triggered by fake MT devices without ABS_X/Y (#1207574) From 65a366de895f203b717e69ee2c3232cbbd2a5a10 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 9 Apr 2015 07:53:33 +1000 Subject: [PATCH 011/317] Fix finger miscounts on single-touch touchpads (#1209151) --- ...ake-finger-processing-until-the-EV_S.patch | 66 +++++++++++++++++++ libinput.spec | 6 +- 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-delay-fake-finger-processing-until-the-EV_S.patch diff --git a/0001-touchpad-delay-fake-finger-processing-until-the-EV_S.patch b/0001-touchpad-delay-fake-finger-processing-until-the-EV_S.patch new file mode 100644 index 0000000..2cd156a --- /dev/null +++ b/0001-touchpad-delay-fake-finger-processing-until-the-EV_S.patch @@ -0,0 +1,66 @@ +From 82dc1fae18038d04506e154fb36af66bc66c8960 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 8 Apr 2015 17:00:50 +1000 +Subject: [PATCH libinput] touchpad: delay fake finger processing until the + EV_SYN + +A switch from BTN_TOOL_FINGER to BTN_TOOL_DOUBLETAP sets the former to 0, then +the latter to 1, within the same frame. In the previous code we'd end the +first touchpoint, then start two new ones immediately after when the DOUBLETAP +comes in. This causes bug notices in the edge scrolling code and finger +miscounts in the tapping code (since neither processes the change, there is no +SYN_REPORT between the two). + +Only update the state bits when we get the events, handle the fake touch +sequence start/end on SYN_REPORT instead. + +https://bugs.freedesktop.org/show_bug.cgi?id=89949 + +Signed-off-by: Peter Hutterer +--- + src/evdev-mt-touchpad.c | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 7d6d838..724fd32 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -317,16 +317,13 @@ tp_process_absolute_st(struct tp_dispatch *tp, + } + + static void +-tp_process_fake_touch(struct tp_dispatch *tp, +- const struct input_event *e, +- uint64_t time) ++tp_process_fake_touches(struct tp_dispatch *tp, ++ uint64_t time) + { + struct tp_touch *t; + unsigned int nfake_touches; + unsigned int i, start; + +- tp_fake_finger_set(tp, e->code, e->value != 0); +- + nfake_touches = tp_fake_finger_count(tp); + + start = tp->has_mt ? tp->real_touches : 0; +@@ -390,7 +387,7 @@ tp_process_key(struct tp_dispatch *tp, + case BTN_TOOL_DOUBLETAP: + case BTN_TOOL_TRIPLETAP: + case BTN_TOOL_QUADTAP: +- tp_process_fake_touch(tp, e, time); ++ tp_fake_finger_set(tp, e->code, !!e->value); + break; + case BTN_0: + case BTN_1: +@@ -548,6 +545,7 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time) + struct tp_touch *first = tp_get_touch(tp, 0); + unsigned int i; + ++ tp_process_fake_touches(tp, time); + tp_unhover_touches(tp, time); + + for (i = 0; i < tp->ntouches; i++) { +-- +2.3.4 + diff --git a/libinput.spec b/libinput.spec index 66eda63..1b85bcf 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.13.0 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,6 +21,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} Patch01: 0001-evdev-fix-crash-for-missing-ABS_X-Y.patch Patch02: 0002-evdev-fix-handling-of-fake-MT-devices-without-ABS_X-.patch Patch03: 0001-evdev-fix-inverted-mouse-normalization.patch +Patch04: 0001-touchpad-delay-fake-finger-processing-until-the-EV_S.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -88,6 +89,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Apr 09 2015 Peter Hutterer 0.13.0-4 +- Fix finger miscounts on single-touch touchpads (#1209151) + * Wed Apr 08 2015 Peter Hutterer 0.13.0-3 - Fix mouse slowdown (#1208992) From f1e2a7fd36f7d7fd80621be44c072a22c2e786b4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 16 Apr 2015 18:10:34 +1000 Subject: [PATCH 012/317] Reduce palm detection threshold to 70mm (#1209753) - Don't allow taps in the top part of the palm zone (#1209753) --- ...llow-taps-in-the-top-half-of-the-pal.patch | 456 ++++++++++++++++++ libinput.spec | 8 +- 2 files changed, 463 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-don-t-allow-taps-in-the-top-half-of-the-pal.patch diff --git a/0001-touchpad-don-t-allow-taps-in-the-top-half-of-the-pal.patch b/0001-touchpad-don-t-allow-taps-in-the-top-half-of-the-pal.patch new file mode 100644 index 0000000..f165425 --- /dev/null +++ b/0001-touchpad-don-t-allow-taps-in-the-top-half-of-the-pal.patch @@ -0,0 +1,456 @@ +From c03ce1cab3c19dabd12d7b0886a9ef98107a958e Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 15 Apr 2015 15:21:08 +1000 +Subject: [PATCH] touchpad: don't allow taps in the top half of the palm + exclusion zone. + +Touches in the exclusion zone are ignored for palm detection and don't move +the cursor. Tapping however triggers before we know whether something is a +palm or not, so we get erroneous button clickst. + +If a tap happens in the top half of the touchpad, within the palm exclusion +zones, ignore it for tap purposes. To avoid further complicating the state +machine simply pretend there was a movement > threshold on that finger. This +advances the tap state machine properly that no button events are sent for +this finger. + +https://bugs.freedesktop.org/show_bug.cgi?id=89625 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + doc/palm-detection.dox | 9 ++ + doc/svg/palm-detection.svg | 213 ++++++++++++++++++++++++++++++++------------ + src/evdev-mt-touchpad-tap.c | 8 ++ + src/evdev-mt-touchpad.c | 24 ++++- + src/evdev-mt-touchpad.h | 4 + + test/touchpad.c | 44 +++++++++ + 6 files changed, 244 insertions(+), 58 deletions(-) + +diff --git a/doc/palm-detection.dox b/doc/palm-detection.dox +index 4e839e6..a5b578b 100644 +--- a/doc/palm-detection.dox ++++ b/doc/palm-detection.dox +@@ -23,6 +23,10 @@ screen, it is common for a finger to start inside an exclusion zone and move + rapidly across the touchpad. libinput detects such movements and avoids palm + detection on such touch sequences. + ++Each exclusion zone is divided into a top part and a bottom part. A touch ++starting in the top part of the exclusion zone does not trigger a ++tap (see @ref tapping). ++ + In the diagram below, the exclusion zones are painted red. + Touch 'A' starts inside the exclusion zone and moves + almost vertically. It is considered a palm and ignored for cursor movement, +@@ -31,6 +35,11 @@ despite moving out of the exclusion zone. + Touch 'B' starts inside the exclusion zone but moves horizontally out of the + zone. It is considered a valid touch and controls the cursor. + ++Touch 'C' occurs in the top part of the exclusion zone. Despite being a ++tapping motion, it does not generate an emulated button event. Touch 'D' ++likewise occurs within the exclusion zone but in the bottom half. libinput ++will generate a button event for this touch. ++ + @image html palm-detection.svg + + @section trackpoint-disabling Palm detection during trackpoint use +diff --git a/doc/svg/palm-detection.svg b/doc/svg/palm-detection.svg +index 9fb6077..c3e45f4 100644 +--- a/doc/svg/palm-detection.svg ++++ b/doc/svg/palm-detection.svg +@@ -2,15 +2,67 @@ + + + ++ id="svg2" ++ inkscape:version="0.91 r13725" ++ sodipodi:docname="palm-detection.svg"> ++ ++ ++ ++ image/svg+xml ++ ++ ++ ++ ++ + + ++ ++ ++ + + +- +- +- +- +- +- A +- B +- +- ++ ++ ++ ++ ++ ++ A ++ ++ B ++ + ++ C ++ D ++ ++ + +diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c +index 6bd7c58..ae66c22 100644 +--- a/src/evdev-mt-touchpad-tap.c ++++ b/src/evdev-mt-touchpad-tap.c +@@ -575,6 +575,14 @@ tp_tap_handle_state(struct tp_dispatch *tp, uint64_t time) + t->tap.state = TAP_TOUCH_STATE_TOUCH; + t->tap.initial = t->point; + tp_tap_handle_event(tp, t, TAP_EVENT_TOUCH, time); ++ ++ /* If we think this is a palm, pretend there's a ++ * motion event which will prevent tap clicks ++ * without requiring extra states in the FSM. ++ */ ++ if (tp_palm_tap_is_palm(tp, t)) ++ tp_tap_handle_event(tp, t, TAP_EVENT_MOTION, time); ++ + } else if (t->state == TOUCH_END) { + tp_tap_handle_event(tp, t, TAP_EVENT_RELEASE, time); + t->tap.state = TAP_TOUCH_STATE_IDLE; +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 356133f..53d80b2 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -458,6 +458,24 @@ tp_touch_active(struct tp_dispatch *tp, struct tp_touch *t) + tp_edge_scroll_touch_active(tp, t); + } + ++bool ++tp_palm_tap_is_palm(struct tp_dispatch *tp, struct tp_touch *t) ++{ ++ if (t->state != TOUCH_BEGIN) ++ return false; ++ ++ if (t->point.x > tp->palm.left_edge && ++ t->point.x < tp->palm.right_edge) ++ return false; ++ ++ /* We're inside the left/right palm edge and in the northern half of ++ * the touchpad - this tap is a palm */ ++ if (t->point.y < tp->palm.vert_center) ++ return true; ++ ++ return false; ++} ++ + static void + tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + { +@@ -1084,13 +1102,16 @@ static int + tp_init_palmdetect(struct tp_dispatch *tp, + struct evdev_device *device) + { +- int width; ++ int width, height; + + tp->palm.right_edge = INT_MAX; + tp->palm.left_edge = INT_MIN; ++ tp->palm.vert_center = INT_MIN; + + width = abs(device->abs.absinfo_x->maximum - + device->abs.absinfo_x->minimum); ++ height = abs(device->abs.absinfo_y->maximum - ++ device->abs.absinfo_y->minimum); + + /* Apple touchpads are always big enough to warrant palm detection */ + if (evdev_device_get_id_vendor(device) != VENDOR_ID_APPLE) { +@@ -1107,6 +1128,7 @@ tp_init_palmdetect(struct tp_dispatch *tp, + /* palm edges are 5% of the width on each side */ + tp->palm.right_edge = device->abs.absinfo_x->maximum - width * 0.05; + tp->palm.left_edge = device->abs.absinfo_x->minimum + width * 0.05; ++ tp->palm.vert_center = device->abs.absinfo_y->minimum + height/2; + + return 0; + } +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index 9980f90..6de999f 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -260,6 +260,7 @@ struct tp_dispatch { + struct { + int32_t right_edge; /* in device coordinates */ + int32_t left_edge; /* in device coordinates */ ++ int32_t vert_center; /* in device coordinates */ + } palm; + + struct { +@@ -385,4 +386,7 @@ tp_gesture_post_events(struct tp_dispatch *tp, uint64_t time); + void + tp_gesture_stop_twofinger_scroll(struct tp_dispatch *tp, uint64_t time); + ++bool ++tp_palm_tap_is_palm(struct tp_dispatch *tp, struct tp_touch *t); ++ + #endif +diff --git a/test/touchpad.c b/test/touchpad.c +index 6fa2301..882e689 100644 +--- a/test/touchpad.c ++++ b/test/touchpad.c +@@ -2399,6 +2399,49 @@ START_TEST(touchpad_palm_detect_no_palm_moving_into_edges) + } + END_TEST + ++START_TEST(touchpad_palm_detect_tap) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput *li = dev->libinput; ++ ++ if (!touchpad_has_palm_detect_size(dev)) ++ return; ++ ++ libinput_device_config_tap_set_enabled(dev->libinput_device, ++ LIBINPUT_CONFIG_TAP_ENABLED); ++ ++ litest_drain_events(li); ++ ++ litest_touch_down(dev, 0, 95, 5); ++ litest_touch_up(dev, 0); ++ litest_assert_empty_queue(li); ++ ++ litest_touch_down(dev, 0, 5, 5); ++ litest_touch_up(dev, 0); ++ litest_assert_empty_queue(li); ++ ++ litest_touch_down(dev, 0, 5, 90); ++ litest_touch_up(dev, 0); ++ litest_assert_button_event(li, ++ BTN_LEFT, ++ LIBINPUT_BUTTON_STATE_PRESSED); ++ litest_assert_button_event(li, ++ BTN_LEFT, ++ LIBINPUT_BUTTON_STATE_RELEASED); ++ litest_assert_empty_queue(li); ++ ++ litest_touch_down(dev, 0, 95, 90); ++ litest_touch_up(dev, 0); ++ litest_assert_button_event(li, ++ BTN_LEFT, ++ LIBINPUT_BUTTON_STATE_PRESSED); ++ litest_assert_button_event(li, ++ BTN_LEFT, ++ LIBINPUT_BUTTON_STATE_RELEASED); ++ litest_assert_empty_queue(li); ++} ++END_TEST ++ + START_TEST(touchpad_left_handed) + { + struct litest_device *dev = litest_current_device(); +@@ -3448,6 +3491,7 @@ int main(int argc, char **argv) { + litest_add("touchpad:palm", touchpad_palm_detect_palm_becomes_pointer, LITEST_TOUCHPAD, LITEST_ANY); + litest_add("touchpad:palm", touchpad_palm_detect_palm_stays_palm, LITEST_TOUCHPAD, LITEST_ANY); + litest_add("touchpad:palm", touchpad_palm_detect_no_palm_moving_into_edges, LITEST_TOUCHPAD, LITEST_ANY); ++ litest_add("touchpad:palm", touchpad_palm_detect_tap, LITEST_TOUCHPAD, LITEST_ANY); + + litest_add("touchpad:left-handed", touchpad_left_handed, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_CLICKPAD); + litest_add("touchpad:left-handed", touchpad_left_handed_clickpad, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD); +-- +2.3.4 + diff --git a/libinput.spec b/libinput.spec index 1b85bcf..abf7c99 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.13.0 -Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 5%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -22,6 +22,8 @@ Patch01: 0001-evdev-fix-crash-for-missing-ABS_X-Y.patch Patch02: 0002-evdev-fix-handling-of-fake-MT-devices-without-ABS_X-.patch Patch03: 0001-evdev-fix-inverted-mouse-normalization.patch Patch04: 0001-touchpad-delay-fake-finger-processing-until-the-EV_S.patch +Patch05: 0001-touchpad-Reduce-palm-detection-threshold-to-70mm.patch +Patch06: 0001-touchpad-don-t-allow-taps-in-the-top-half-of-the-pal.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -89,6 +91,10 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Apr 16 2015 Peter Hutterer 0.13.0-5 +- Reduce palm detection threshold to 70mm (#1209753) +- Don't allow taps in the top part of the palm zone (#1209753) + * Thu Apr 09 2015 Peter Hutterer 0.13.0-4 - Fix finger miscounts on single-touch touchpads (#1209151) From c0c551f1586c02dc4425343f3569398f4cfa1e13 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 16 Apr 2015 18:21:36 +1000 Subject: [PATCH 013/317] git add the patch... --- ...uce-palm-detection-threshold-to-70mm.patch | 29 +++++++++++++++++++ libinput.spec | 5 +++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-Reduce-palm-detection-threshold-to-70mm.patch diff --git a/0001-touchpad-Reduce-palm-detection-threshold-to-70mm.patch b/0001-touchpad-Reduce-palm-detection-threshold-to-70mm.patch new file mode 100644 index 0000000..835c702 --- /dev/null +++ b/0001-touchpad-Reduce-palm-detection-threshold-to-70mm.patch @@ -0,0 +1,29 @@ +From 18feed4a85d9553b2d600f487c1f00f346f8fb53 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 14 Apr 2015 15:18:19 +1000 +Subject: [PATCH libinput] touchpad: Reduce palm detection threshold to 70mm + +Signed-off-by: Peter Hutterer +--- + src/evdev-mt-touchpad.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 68070c2..a663db9 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1105,9 +1105,9 @@ tp_init_palmdetect(struct tp_dispatch *tp, + if (device->abs.absinfo_x->resolution == 1) + return 0; + +- /* Enable palm detection on touchpads >= 80 mm. Anything smaller ++ /* Enable palm detection on touchpads >= 70 mm. Anything smaller + probably won't need it, until we find out it does */ +- if (width/device->abs.absinfo_x->resolution < 80) ++ if (width/device->abs.absinfo_x->resolution < 70) + return 0; + } + +-- +2.3.4 + diff --git a/libinput.spec b/libinput.spec index abf7c99..e1d079d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.13.0 -Release: 5%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 6%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -91,6 +91,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Apr 16 2015 Peter Hutterer 0.13.0-6 +- git add the patch... + * Thu Apr 16 2015 Peter Hutterer 0.13.0-5 - Reduce palm detection threshold to 70mm (#1209753) - Don't allow taps in the top part of the palm zone (#1209753) From 1bd3c48c9840056d55d6df616dbbb8bd51a2b4ef Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 22 Apr 2015 09:11:12 +1000 Subject: [PATCH 014/317] libinput 0.14.1 --- .gitignore | 1 + ...-evdev-fix-crash-for-missing-ABS_X-Y.patch | 35 -- ...dev-fix-inverted-mouse-normalization.patch | 32 -- ...uce-palm-detection-threshold-to-70mm.patch | 29 -- ...ake-finger-processing-until-the-EV_S.patch | 66 --- ...llow-taps-in-the-top-half-of-the-pal.patch | 456 ------------------ ...ng-of-fake-MT-devices-without-ABS_X-.patch | 94 ---- libinput.spec | 16 +- sources | 2 +- 9 files changed, 9 insertions(+), 722 deletions(-) delete mode 100644 0001-evdev-fix-crash-for-missing-ABS_X-Y.patch delete mode 100644 0001-evdev-fix-inverted-mouse-normalization.patch delete mode 100644 0001-touchpad-Reduce-palm-detection-threshold-to-70mm.patch delete mode 100644 0001-touchpad-delay-fake-finger-processing-until-the-EV_S.patch delete mode 100644 0001-touchpad-don-t-allow-taps-in-the-top-half-of-the-pal.patch delete mode 100644 0002-evdev-fix-handling-of-fake-MT-devices-without-ABS_X-.patch diff --git a/.gitignore b/.gitignore index 114e2ba..cf3e0b3 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /libinput-0.11.0.tar.xz /libinput-0.12.0.tar.xz /libinput-0.13.0.tar.xz +/libinput-0.14.1.tar.xz diff --git a/0001-evdev-fix-crash-for-missing-ABS_X-Y.patch b/0001-evdev-fix-crash-for-missing-ABS_X-Y.patch deleted file mode 100644 index 2865ded..0000000 --- a/0001-evdev-fix-crash-for-missing-ABS_X-Y.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 06fbf985f8d63572a0674f1904680d275fe2b2f3 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 8 Apr 2015 07:43:54 +1000 -Subject: [PATCH libinput] evdev: fix crash for missing ABS_X/Y - -libevdev_set_abs_info() is a noop if the event code isn't enabled on the -device. This leaves ABS_X/Y on NULL, causing a crash later when dereferencing -the absinfo. - -https://bugs.freedesktop.org/show_bug.cgi?id=89783 - -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/evdev.c b/src/evdev.c -index a972b9d..115dc99 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1444,9 +1444,9 @@ evdev_fix_android_mt(struct evdev_device *device) - !libevdev_has_event_code(evdev, EV_ABS, ABS_MT_POSITION_Y)) - return; - -- libevdev_set_abs_info(evdev, ABS_X, -+ libevdev_enable_event_code(evdev, EV_ABS, ABS_X, - libevdev_get_abs_info(evdev, ABS_MT_POSITION_X)); -- libevdev_set_abs_info(evdev, ABS_Y, -+ libevdev_enable_event_code(evdev, EV_ABS, ABS_Y, - libevdev_get_abs_info(evdev, ABS_MT_POSITION_Y)); - } - --- -2.3.4 - diff --git a/0001-evdev-fix-inverted-mouse-normalization.patch b/0001-evdev-fix-inverted-mouse-normalization.patch deleted file mode 100644 index 581e39b..0000000 --- a/0001-evdev-fix-inverted-mouse-normalization.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 64b5e52868db96be9b899ba98b02d061a838304e Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 8 Apr 2015 15:52:58 +1000 -Subject: [PATCH libinput] evdev: fix inverted mouse normalization - -Regression introduced in 9f8edc5fd880e0a9c482b36e6b4120ccc056ee0b where it -changed from delta / (dpi/default) to delta * dpi/default, causing the inverse -effect of what the dpi setting is supposed to achieve. - -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/evdev.c b/src/evdev.c -index 00450bf..243cd22 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -230,8 +230,8 @@ normalize_delta(struct evdev_device *device, - const struct device_coords *delta, - struct normalized_coords *normalized) - { -- normalized->x = delta->x * (double)device->dpi / DEFAULT_MOUSE_DPI; -- normalized->y = delta->y * (double)device->dpi / DEFAULT_MOUSE_DPI; -+ normalized->x = delta->x * DEFAULT_MOUSE_DPI / (double)device->dpi; -+ normalized->y = delta->y * DEFAULT_MOUSE_DPI / (double)device->dpi; - } - - static void --- -2.3.4 - diff --git a/0001-touchpad-Reduce-palm-detection-threshold-to-70mm.patch b/0001-touchpad-Reduce-palm-detection-threshold-to-70mm.patch deleted file mode 100644 index 835c702..0000000 --- a/0001-touchpad-Reduce-palm-detection-threshold-to-70mm.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 18feed4a85d9553b2d600f487c1f00f346f8fb53 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 14 Apr 2015 15:18:19 +1000 -Subject: [PATCH libinput] touchpad: Reduce palm detection threshold to 70mm - -Signed-off-by: Peter Hutterer ---- - src/evdev-mt-touchpad.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 68070c2..a663db9 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -1105,9 +1105,9 @@ tp_init_palmdetect(struct tp_dispatch *tp, - if (device->abs.absinfo_x->resolution == 1) - return 0; - -- /* Enable palm detection on touchpads >= 80 mm. Anything smaller -+ /* Enable palm detection on touchpads >= 70 mm. Anything smaller - probably won't need it, until we find out it does */ -- if (width/device->abs.absinfo_x->resolution < 80) -+ if (width/device->abs.absinfo_x->resolution < 70) - return 0; - } - --- -2.3.4 - diff --git a/0001-touchpad-delay-fake-finger-processing-until-the-EV_S.patch b/0001-touchpad-delay-fake-finger-processing-until-the-EV_S.patch deleted file mode 100644 index 2cd156a..0000000 --- a/0001-touchpad-delay-fake-finger-processing-until-the-EV_S.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 82dc1fae18038d04506e154fb36af66bc66c8960 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 8 Apr 2015 17:00:50 +1000 -Subject: [PATCH libinput] touchpad: delay fake finger processing until the - EV_SYN - -A switch from BTN_TOOL_FINGER to BTN_TOOL_DOUBLETAP sets the former to 0, then -the latter to 1, within the same frame. In the previous code we'd end the -first touchpoint, then start two new ones immediately after when the DOUBLETAP -comes in. This causes bug notices in the edge scrolling code and finger -miscounts in the tapping code (since neither processes the change, there is no -SYN_REPORT between the two). - -Only update the state bits when we get the events, handle the fake touch -sequence start/end on SYN_REPORT instead. - -https://bugs.freedesktop.org/show_bug.cgi?id=89949 - -Signed-off-by: Peter Hutterer ---- - src/evdev-mt-touchpad.c | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 7d6d838..724fd32 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -317,16 +317,13 @@ tp_process_absolute_st(struct tp_dispatch *tp, - } - - static void --tp_process_fake_touch(struct tp_dispatch *tp, -- const struct input_event *e, -- uint64_t time) -+tp_process_fake_touches(struct tp_dispatch *tp, -+ uint64_t time) - { - struct tp_touch *t; - unsigned int nfake_touches; - unsigned int i, start; - -- tp_fake_finger_set(tp, e->code, e->value != 0); -- - nfake_touches = tp_fake_finger_count(tp); - - start = tp->has_mt ? tp->real_touches : 0; -@@ -390,7 +387,7 @@ tp_process_key(struct tp_dispatch *tp, - case BTN_TOOL_DOUBLETAP: - case BTN_TOOL_TRIPLETAP: - case BTN_TOOL_QUADTAP: -- tp_process_fake_touch(tp, e, time); -+ tp_fake_finger_set(tp, e->code, !!e->value); - break; - case BTN_0: - case BTN_1: -@@ -548,6 +545,7 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time) - struct tp_touch *first = tp_get_touch(tp, 0); - unsigned int i; - -+ tp_process_fake_touches(tp, time); - tp_unhover_touches(tp, time); - - for (i = 0; i < tp->ntouches; i++) { --- -2.3.4 - diff --git a/0001-touchpad-don-t-allow-taps-in-the-top-half-of-the-pal.patch b/0001-touchpad-don-t-allow-taps-in-the-top-half-of-the-pal.patch deleted file mode 100644 index f165425..0000000 --- a/0001-touchpad-don-t-allow-taps-in-the-top-half-of-the-pal.patch +++ /dev/null @@ -1,456 +0,0 @@ -From c03ce1cab3c19dabd12d7b0886a9ef98107a958e Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 15 Apr 2015 15:21:08 +1000 -Subject: [PATCH] touchpad: don't allow taps in the top half of the palm - exclusion zone. - -Touches in the exclusion zone are ignored for palm detection and don't move -the cursor. Tapping however triggers before we know whether something is a -palm or not, so we get erroneous button clickst. - -If a tap happens in the top half of the touchpad, within the palm exclusion -zones, ignore it for tap purposes. To avoid further complicating the state -machine simply pretend there was a movement > threshold on that finger. This -advances the tap state machine properly that no button events are sent for -this finger. - -https://bugs.freedesktop.org/show_bug.cgi?id=89625 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - doc/palm-detection.dox | 9 ++ - doc/svg/palm-detection.svg | 213 ++++++++++++++++++++++++++++++++------------ - src/evdev-mt-touchpad-tap.c | 8 ++ - src/evdev-mt-touchpad.c | 24 ++++- - src/evdev-mt-touchpad.h | 4 + - test/touchpad.c | 44 +++++++++ - 6 files changed, 244 insertions(+), 58 deletions(-) - -diff --git a/doc/palm-detection.dox b/doc/palm-detection.dox -index 4e839e6..a5b578b 100644 ---- a/doc/palm-detection.dox -+++ b/doc/palm-detection.dox -@@ -23,6 +23,10 @@ screen, it is common for a finger to start inside an exclusion zone and move - rapidly across the touchpad. libinput detects such movements and avoids palm - detection on such touch sequences. - -+Each exclusion zone is divided into a top part and a bottom part. A touch -+starting in the top part of the exclusion zone does not trigger a -+tap (see @ref tapping). -+ - In the diagram below, the exclusion zones are painted red. - Touch 'A' starts inside the exclusion zone and moves - almost vertically. It is considered a palm and ignored for cursor movement, -@@ -31,6 +35,11 @@ despite moving out of the exclusion zone. - Touch 'B' starts inside the exclusion zone but moves horizontally out of the - zone. It is considered a valid touch and controls the cursor. - -+Touch 'C' occurs in the top part of the exclusion zone. Despite being a -+tapping motion, it does not generate an emulated button event. Touch 'D' -+likewise occurs within the exclusion zone but in the bottom half. libinput -+will generate a button event for this touch. -+ - @image html palm-detection.svg - - @section trackpoint-disabling Palm detection during trackpoint use -diff --git a/doc/svg/palm-detection.svg b/doc/svg/palm-detection.svg -index 9fb6077..c3e45f4 100644 ---- a/doc/svg/palm-detection.svg -+++ b/doc/svg/palm-detection.svg -@@ -2,15 +2,67 @@ - - - -+ id="svg2" -+ inkscape:version="0.91 r13725" -+ sodipodi:docname="palm-detection.svg"> -+ -+ -+ -+ image/svg+xml -+ -+ -+ -+ -+ - - -+ -+ -+ - - -- -- -- -- -- -- A -- B -- -- -+ -+ -+ -+ -+ -+ A -+ -+ B -+ - -+ C -+ D -+ -+ - -diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c -index 6bd7c58..ae66c22 100644 ---- a/src/evdev-mt-touchpad-tap.c -+++ b/src/evdev-mt-touchpad-tap.c -@@ -575,6 +575,14 @@ tp_tap_handle_state(struct tp_dispatch *tp, uint64_t time) - t->tap.state = TAP_TOUCH_STATE_TOUCH; - t->tap.initial = t->point; - tp_tap_handle_event(tp, t, TAP_EVENT_TOUCH, time); -+ -+ /* If we think this is a palm, pretend there's a -+ * motion event which will prevent tap clicks -+ * without requiring extra states in the FSM. -+ */ -+ if (tp_palm_tap_is_palm(tp, t)) -+ tp_tap_handle_event(tp, t, TAP_EVENT_MOTION, time); -+ - } else if (t->state == TOUCH_END) { - tp_tap_handle_event(tp, t, TAP_EVENT_RELEASE, time); - t->tap.state = TAP_TOUCH_STATE_IDLE; -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 356133f..53d80b2 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -458,6 +458,24 @@ tp_touch_active(struct tp_dispatch *tp, struct tp_touch *t) - tp_edge_scroll_touch_active(tp, t); - } - -+bool -+tp_palm_tap_is_palm(struct tp_dispatch *tp, struct tp_touch *t) -+{ -+ if (t->state != TOUCH_BEGIN) -+ return false; -+ -+ if (t->point.x > tp->palm.left_edge && -+ t->point.x < tp->palm.right_edge) -+ return false; -+ -+ /* We're inside the left/right palm edge and in the northern half of -+ * the touchpad - this tap is a palm */ -+ if (t->point.y < tp->palm.vert_center) -+ return true; -+ -+ return false; -+} -+ - static void - tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - { -@@ -1084,13 +1102,16 @@ static int - tp_init_palmdetect(struct tp_dispatch *tp, - struct evdev_device *device) - { -- int width; -+ int width, height; - - tp->palm.right_edge = INT_MAX; - tp->palm.left_edge = INT_MIN; -+ tp->palm.vert_center = INT_MIN; - - width = abs(device->abs.absinfo_x->maximum - - device->abs.absinfo_x->minimum); -+ height = abs(device->abs.absinfo_y->maximum - -+ device->abs.absinfo_y->minimum); - - /* Apple touchpads are always big enough to warrant palm detection */ - if (evdev_device_get_id_vendor(device) != VENDOR_ID_APPLE) { -@@ -1107,6 +1128,7 @@ tp_init_palmdetect(struct tp_dispatch *tp, - /* palm edges are 5% of the width on each side */ - tp->palm.right_edge = device->abs.absinfo_x->maximum - width * 0.05; - tp->palm.left_edge = device->abs.absinfo_x->minimum + width * 0.05; -+ tp->palm.vert_center = device->abs.absinfo_y->minimum + height/2; - - return 0; - } -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index 9980f90..6de999f 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -260,6 +260,7 @@ struct tp_dispatch { - struct { - int32_t right_edge; /* in device coordinates */ - int32_t left_edge; /* in device coordinates */ -+ int32_t vert_center; /* in device coordinates */ - } palm; - - struct { -@@ -385,4 +386,7 @@ tp_gesture_post_events(struct tp_dispatch *tp, uint64_t time); - void - tp_gesture_stop_twofinger_scroll(struct tp_dispatch *tp, uint64_t time); - -+bool -+tp_palm_tap_is_palm(struct tp_dispatch *tp, struct tp_touch *t); -+ - #endif -diff --git a/test/touchpad.c b/test/touchpad.c -index 6fa2301..882e689 100644 ---- a/test/touchpad.c -+++ b/test/touchpad.c -@@ -2399,6 +2399,49 @@ START_TEST(touchpad_palm_detect_no_palm_moving_into_edges) - } - END_TEST - -+START_TEST(touchpad_palm_detect_tap) -+{ -+ struct litest_device *dev = litest_current_device(); -+ struct libinput *li = dev->libinput; -+ -+ if (!touchpad_has_palm_detect_size(dev)) -+ return; -+ -+ libinput_device_config_tap_set_enabled(dev->libinput_device, -+ LIBINPUT_CONFIG_TAP_ENABLED); -+ -+ litest_drain_events(li); -+ -+ litest_touch_down(dev, 0, 95, 5); -+ litest_touch_up(dev, 0); -+ litest_assert_empty_queue(li); -+ -+ litest_touch_down(dev, 0, 5, 5); -+ litest_touch_up(dev, 0); -+ litest_assert_empty_queue(li); -+ -+ litest_touch_down(dev, 0, 5, 90); -+ litest_touch_up(dev, 0); -+ litest_assert_button_event(li, -+ BTN_LEFT, -+ LIBINPUT_BUTTON_STATE_PRESSED); -+ litest_assert_button_event(li, -+ BTN_LEFT, -+ LIBINPUT_BUTTON_STATE_RELEASED); -+ litest_assert_empty_queue(li); -+ -+ litest_touch_down(dev, 0, 95, 90); -+ litest_touch_up(dev, 0); -+ litest_assert_button_event(li, -+ BTN_LEFT, -+ LIBINPUT_BUTTON_STATE_PRESSED); -+ litest_assert_button_event(li, -+ BTN_LEFT, -+ LIBINPUT_BUTTON_STATE_RELEASED); -+ litest_assert_empty_queue(li); -+} -+END_TEST -+ - START_TEST(touchpad_left_handed) - { - struct litest_device *dev = litest_current_device(); -@@ -3448,6 +3491,7 @@ int main(int argc, char **argv) { - litest_add("touchpad:palm", touchpad_palm_detect_palm_becomes_pointer, LITEST_TOUCHPAD, LITEST_ANY); - litest_add("touchpad:palm", touchpad_palm_detect_palm_stays_palm, LITEST_TOUCHPAD, LITEST_ANY); - litest_add("touchpad:palm", touchpad_palm_detect_no_palm_moving_into_edges, LITEST_TOUCHPAD, LITEST_ANY); -+ litest_add("touchpad:palm", touchpad_palm_detect_tap, LITEST_TOUCHPAD, LITEST_ANY); - - litest_add("touchpad:left-handed", touchpad_left_handed, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_CLICKPAD); - litest_add("touchpad:left-handed", touchpad_left_handed_clickpad, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD); --- -2.3.4 - diff --git a/0002-evdev-fix-handling-of-fake-MT-devices-without-ABS_X-.patch b/0002-evdev-fix-handling-of-fake-MT-devices-without-ABS_X-.patch deleted file mode 100644 index 9d9e9a8..0000000 --- a/0002-evdev-fix-handling-of-fake-MT-devices-without-ABS_X-.patch +++ /dev/null @@ -1,94 +0,0 @@ -From a0834969d166285714bf18041044aa23a38a8413 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 8 Apr 2015 08:11:54 +1000 -Subject: [PATCH libinput] evdev: fix handling of fake MT devices without - ABS_X/Y - -The previous code didn't handle fake MT devices without ABS_X/Y axes at all -(like the Razer BlackWidow keyboard). Those devices usually start at ABS_MISC -and go up to ABS_MAX, thus triggering the Android check. - -Split the condition up: if the device is not a fake MT device we check for the -Android missing axes first and add them. Then we proceed, but now we know that -the ABS_X axis must exist. - -https://bugs.freedesktop.org/show_bug.cgi?id=89783 - -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 29 +++++++++++++++++++++-------- - 1 file changed, 21 insertions(+), 8 deletions(-) - -diff --git a/src/evdev.c b/src/evdev.c -index 115dc99..1712a8d 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1374,6 +1374,10 @@ evdev_fix_abs_resolution(struct evdev_device *device, - return 0; - } - -+ if (!libevdev_has_event_code(evdev, EV_ABS, xcode) || -+ !libevdev_has_event_code(evdev, EV_ABS, ycode)) -+ return 0; -+ - absx = libevdev_get_abs_info(evdev, xcode); - absy = libevdev_get_abs_info(evdev, ycode); - -@@ -1431,6 +1435,18 @@ evdev_device_get_udev_tags(struct evdev_device *device, - return tags; - } - -+/* Fake MT devices have the ABS_MT_SLOT bit set because of -+ the limited ABS_* range - they aren't MT devices, they -+ just have too many ABS_ axes */ -+static inline bool -+evdev_is_fake_mt_device(struct evdev_device *device) -+{ -+ struct libevdev *evdev = device->evdev; -+ -+ return libevdev_has_event_code(evdev, EV_ABS, ABS_MT_SLOT) && -+ libevdev_get_num_slots(evdev) == -1; -+} -+ - static inline void - evdev_fix_android_mt(struct evdev_device *device) - { -@@ -1441,7 +1457,8 @@ evdev_fix_android_mt(struct evdev_device *device) - return; - - if (!libevdev_has_event_code(evdev, EV_ABS, ABS_MT_POSITION_X) || -- !libevdev_has_event_code(evdev, EV_ABS, ABS_MT_POSITION_Y)) -+ !libevdev_has_event_code(evdev, EV_ABS, ABS_MT_POSITION_Y) || -+ !evdev_is_fake_mt_device(device)) - return; - - libevdev_enable_event_code(evdev, EV_ABS, ABS_X, -@@ -1611,10 +1628,10 @@ evdev_configure_device(struct evdev_device *device) - return -1; - } - -- if (libevdev_has_event_code(evdev, EV_ABS, ABS_X) || -- libevdev_has_event_code(evdev, EV_ABS, ABS_MT_POSITION_X)) { -+ if (!evdev_is_fake_mt_device(device)) - evdev_fix_android_mt(device); - -+ if (libevdev_has_event_code(evdev, EV_ABS, ABS_X)) { - if (evdev_fix_abs_resolution(device, - ABS_X, - ABS_Y, -@@ -1624,11 +1641,7 @@ evdev_configure_device(struct evdev_device *device) - device->abs.absinfo_x = libevdev_get_abs_info(evdev, ABS_X); - device->abs.absinfo_y = libevdev_get_abs_info(evdev, ABS_Y); - -- /* Fake MT devices have the ABS_MT_SLOT bit set because of -- the limited ABS_* range - they aren't MT devices, they -- just have too many ABS_ axes */ -- if (libevdev_has_event_code(evdev, EV_ABS, ABS_MT_SLOT) && -- libevdev_get_num_slots(evdev) == -1) { -+ if (evdev_is_fake_mt_device(device)) { - udev_tags &= ~EVDEV_UDEV_TAG_TOUCHSCREEN; - } else if (evdev_configure_mt_device(device) == -1) { - return -1; --- -2.3.4 - diff --git a/libinput.spec b/libinput.spec index e1d079d..a71aae9 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 0.13.0 -Release: 6%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 0.14.1 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,13 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-evdev-fix-crash-for-missing-ABS_X-Y.patch -Patch02: 0002-evdev-fix-handling-of-fake-MT-devices-without-ABS_X-.patch -Patch03: 0001-evdev-fix-inverted-mouse-normalization.patch -Patch04: 0001-touchpad-delay-fake-finger-processing-until-the-EV_S.patch -Patch05: 0001-touchpad-Reduce-palm-detection-threshold-to-70mm.patch -Patch06: 0001-touchpad-don-t-allow-taps-in-the-top-half-of-the-pal.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -83,6 +76,8 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %{_libdir}/libinput.so.* %{udevdir}/libinput-device-group %{udevdir}/rules.d/80-libinput-device-groups.rules +%{_bindir}/libinput-list-devices +%{_mandir}/man1/libinput-list-devices.1* %files devel %{_includedir}/libinput.h @@ -91,6 +86,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Apr 22 2015 Peter Hutterer 0.14.1-1 +- libinput 0.14.1 + * Thu Apr 16 2015 Peter Hutterer 0.13.0-6 - git add the patch... diff --git a/sources b/sources index e7ac0bd..4e0ad6b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bb58f489b9ce99f6b89bf087b67d4a69 libinput-0.13.0.tar.xz +18f6e1d6ab58db9a66c5ee8ca20aa876 libinput-0.14.1.tar.xz From c2dbcdf9a2618ba2386bf9333249cfb7214a6893 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 24 Apr 2015 15:45:34 +1000 Subject: [PATCH 015/317] Fix crash with the MS Surface Type Cover (#1206869) --- ...er-accel-filters-when-we-have-rel-x-.patch | 71 +++++++++++++++++++ libinput.spec | 7 +- 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 0001-evdev-init-pointer-accel-filters-when-we-have-rel-x-.patch diff --git a/0001-evdev-init-pointer-accel-filters-when-we-have-rel-x-.patch b/0001-evdev-init-pointer-accel-filters-when-we-have-rel-x-.patch new file mode 100644 index 0000000..c031688 --- /dev/null +++ b/0001-evdev-init-pointer-accel-filters-when-we-have-rel-x-.patch @@ -0,0 +1,71 @@ +From 5703a748e1fdaab5cc76705fd4518bc33c65e207 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 24 Apr 2015 14:59:18 +1000 +Subject: [PATCH libinput] evdev: init pointer accel filters when we have rel + x/y axes + +Some devices provide abs x/y and rel x/y. We can't know which event the device +will send. The Microsoft Surface Type Cover sends relative devices, which +then crashes libinput when we don't have an accel filter set up. + +So instead of checking that the device doesn't have ABS_X/Y, check for the +device to have REL_X/Y instead. + +https://bugzilla.redhat.com/show_bug.cgi?id=1206869 + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 4 ++-- + test/pointer.c | 14 +++++++++++++- + 2 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index 8ca7a76..e16747b 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1791,8 +1791,8 @@ evdev_configure_device(struct evdev_device *device) + } + + if (udev_tags & EVDEV_UDEV_TAG_MOUSE) { +- if (!libevdev_has_event_code(evdev, EV_ABS, ABS_X) && +- !libevdev_has_event_code(evdev, EV_ABS, ABS_Y) && ++ if (libevdev_has_event_code(evdev, EV_REL, REL_X) && ++ libevdev_has_event_code(evdev, EV_REL, REL_Y) && + evdev_device_init_pointer_acceleration( + device, + pointer_accel_profile_linear) == -1) +diff --git a/test/pointer.c b/test/pointer.c +index 01ea2fd..9d3dda6 100644 +--- a/test/pointer.c ++++ b/test/pointer.c +@@ -825,6 +825,17 @@ START_TEST(pointer_accel_defaults_absolute) + } + END_TEST + ++START_TEST(pointer_accel_defaults_absolute_relative) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput_device *device = dev->libinput_device; ++ ++ ck_assert(libinput_device_config_accel_is_available(device)); ++ ck_assert(libinput_device_config_accel_get_default_speed(device) == 0.0); ++ ck_assert(libinput_device_config_accel_get_speed(device) == 0.0); ++} ++END_TEST ++ + START_TEST(pointer_accel_direction_change) + { + struct litest_device *dev = litest_current_device(); +@@ -1223,7 +1234,8 @@ int main (int argc, char **argv) { + + litest_add("pointer:accel", pointer_accel_defaults, LITEST_RELATIVE, LITEST_ANY); + litest_add("pointer:accel", pointer_accel_invalid, LITEST_RELATIVE, LITEST_ANY); +- litest_add("pointer:accel", pointer_accel_defaults_absolute, LITEST_ABSOLUTE, LITEST_ANY); ++ litest_add("pointer:accel", pointer_accel_defaults_absolute, LITEST_ABSOLUTE, LITEST_RELATIVE); ++ litest_add("pointer:accel", pointer_accel_defaults_absolute_relative, LITEST_ABSOLUTE|LITEST_RELATIVE, LITEST_ANY); + litest_add("pointer:accel", pointer_accel_direction_change, LITEST_RELATIVE, LITEST_ANY); + + litest_add("pointer:middlebutton", middlebutton, LITEST_BUTTON, LITEST_POINTINGSTICK); +-- +2.3.5 + diff --git a/libinput.spec b/libinput.spec index a71aae9..f9c3db4 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.14.1 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-evdev-init-pointer-accel-filters-when-we-have-rel-x-.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -86,6 +88,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Apr 24 2015 Peter Hutterer 0.14.1-2 +- Fix crash with the MS Surface Type Cover (#1206869) + * Wed Apr 22 2015 Peter Hutterer 0.14.1-1 - libinput 0.14.1 From 089f1ffb69e0e17cb45fe9e6595e15af0e143aca Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 5 May 2015 17:23:23 +1000 Subject: [PATCH 016/317] libinput 0.15.0 --- .gitignore | 1 + ...er-accel-filters-when-we-have-rel-x-.patch | 71 ------------------- libinput.spec | 18 +++-- sources | 2 +- 4 files changed, 15 insertions(+), 77 deletions(-) delete mode 100644 0001-evdev-init-pointer-accel-filters-when-we-have-rel-x-.patch diff --git a/.gitignore b/.gitignore index cf3e0b3..c19cac5 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /libinput-0.12.0.tar.xz /libinput-0.13.0.tar.xz /libinput-0.14.1.tar.xz +/libinput-0.15.0.tar.xz diff --git a/0001-evdev-init-pointer-accel-filters-when-we-have-rel-x-.patch b/0001-evdev-init-pointer-accel-filters-when-we-have-rel-x-.patch deleted file mode 100644 index c031688..0000000 --- a/0001-evdev-init-pointer-accel-filters-when-we-have-rel-x-.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 5703a748e1fdaab5cc76705fd4518bc33c65e207 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 24 Apr 2015 14:59:18 +1000 -Subject: [PATCH libinput] evdev: init pointer accel filters when we have rel - x/y axes - -Some devices provide abs x/y and rel x/y. We can't know which event the device -will send. The Microsoft Surface Type Cover sends relative devices, which -then crashes libinput when we don't have an accel filter set up. - -So instead of checking that the device doesn't have ABS_X/Y, check for the -device to have REL_X/Y instead. - -https://bugzilla.redhat.com/show_bug.cgi?id=1206869 - -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 4 ++-- - test/pointer.c | 14 +++++++++++++- - 2 files changed, 15 insertions(+), 3 deletions(-) - -diff --git a/src/evdev.c b/src/evdev.c -index 8ca7a76..e16747b 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1791,8 +1791,8 @@ evdev_configure_device(struct evdev_device *device) - } - - if (udev_tags & EVDEV_UDEV_TAG_MOUSE) { -- if (!libevdev_has_event_code(evdev, EV_ABS, ABS_X) && -- !libevdev_has_event_code(evdev, EV_ABS, ABS_Y) && -+ if (libevdev_has_event_code(evdev, EV_REL, REL_X) && -+ libevdev_has_event_code(evdev, EV_REL, REL_Y) && - evdev_device_init_pointer_acceleration( - device, - pointer_accel_profile_linear) == -1) -diff --git a/test/pointer.c b/test/pointer.c -index 01ea2fd..9d3dda6 100644 ---- a/test/pointer.c -+++ b/test/pointer.c -@@ -825,6 +825,17 @@ START_TEST(pointer_accel_defaults_absolute) - } - END_TEST - -+START_TEST(pointer_accel_defaults_absolute_relative) -+{ -+ struct litest_device *dev = litest_current_device(); -+ struct libinput_device *device = dev->libinput_device; -+ -+ ck_assert(libinput_device_config_accel_is_available(device)); -+ ck_assert(libinput_device_config_accel_get_default_speed(device) == 0.0); -+ ck_assert(libinput_device_config_accel_get_speed(device) == 0.0); -+} -+END_TEST -+ - START_TEST(pointer_accel_direction_change) - { - struct litest_device *dev = litest_current_device(); -@@ -1223,7 +1234,8 @@ int main (int argc, char **argv) { - - litest_add("pointer:accel", pointer_accel_defaults, LITEST_RELATIVE, LITEST_ANY); - litest_add("pointer:accel", pointer_accel_invalid, LITEST_RELATIVE, LITEST_ANY); -- litest_add("pointer:accel", pointer_accel_defaults_absolute, LITEST_ABSOLUTE, LITEST_ANY); -+ litest_add("pointer:accel", pointer_accel_defaults_absolute, LITEST_ABSOLUTE, LITEST_RELATIVE); -+ litest_add("pointer:accel", pointer_accel_defaults_absolute_relative, LITEST_ABSOLUTE|LITEST_RELATIVE, LITEST_ANY); - litest_add("pointer:accel", pointer_accel_direction_change, LITEST_RELATIVE, LITEST_ANY); - - litest_add("pointer:middlebutton", middlebutton, LITEST_BUTTON, LITEST_POINTINGSTICK); --- -2.3.5 - diff --git a/libinput.spec b/libinput.spec index f9c3db4..d24e8c6 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 0.14.1 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 0.15.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,8 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-evdev-init-pointer-accel-filters-when-we-have-rel-x-.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -68,7 +66,9 @@ make %{?_smp_mflags} find $RPM_BUILD_ROOT -name '*.la' -delete -%post -p /sbin/ldconfig +%post +/sbin/ldconfig +/usr/bin/udevadm hwdb --update >/dev/null 2>&1 || : %postun -p /sbin/ldconfig @@ -78,8 +78,13 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %{_libdir}/libinput.so.* %{udevdir}/libinput-device-group %{udevdir}/rules.d/80-libinput-device-groups.rules +%{udevdir}/rules.d/80-libinput-device-groups.rules +%{udevdir}/rules.d/90-libinput-model-quirks.rules +%{udevdir}/hwdb.d/90-libinput-model-quirks.hwdb %{_bindir}/libinput-list-devices +%{_bindir}/libinput-debug-events %{_mandir}/man1/libinput-list-devices.1* +%{_mandir}/man1/libinput-debug-events.1* %files devel %{_includedir}/libinput.h @@ -88,6 +93,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue May 05 2015 Peter Hutterer 0.15.0-1 +- libinput 0.15.0 + * Fri Apr 24 2015 Peter Hutterer 0.14.1-2 - Fix crash with the MS Surface Type Cover (#1206869) diff --git a/sources b/sources index 4e0ad6b..c74cc35 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -18f6e1d6ab58db9a66c5ee8ca20aa876 libinput-0.14.1.tar.xz +f2e559ac926cb4afac6951e097364ab1 libinput-0.15.0.tar.xz From 3a8be7cb5d53fae03ccebeb32d65b4880594f108 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 May 2015 16:22:26 +1000 Subject: [PATCH 017/317] Add disable-while-typing feature (#1209753) --- ...chpad-switch-from-is_palm-to-an-enum.patch | 91 ++++++++ ...d-timeout-based-disable-while-typing.patch | 209 ++++++++++++++++++ ...wo-stage-timeout-for-disable-while-t.patch | 71 ++++++ libinput.spec | 9 +- 4 files changed, 379 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-switch-from-is_palm-to-an-enum.patch create mode 100644 0002-touchpad-add-timeout-based-disable-while-typing.patch create mode 100644 0003-touchpad-use-a-two-stage-timeout-for-disable-while-t.patch diff --git a/0001-touchpad-switch-from-is_palm-to-an-enum.patch b/0001-touchpad-switch-from-is_palm-to-an-enum.patch new file mode 100644 index 0000000..ca14e5a --- /dev/null +++ b/0001-touchpad-switch-from-is_palm-to-an-enum.patch @@ -0,0 +1,91 @@ +From d288eb0a63793ebb64de041960336d6fb57060b0 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 20 Apr 2015 16:09:31 +1000 +Subject: [PATCH libinput 1/3] touchpad: switch from is_palm to an enum + +Preparation to add different palm detection types. Not all of them need to be +un-done when leaving the edge area so a boolean is not enough. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad.c | 10 +++++----- + src/evdev-mt-touchpad.h | 7 ++++++- + 2 files changed, 11 insertions(+), 6 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 79177fb..d8b44fa 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -231,7 +231,7 @@ tp_end_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + } + + t->dirty = true; +- t->palm.is_palm = false; ++ t->palm.state = PALM_NONE; + t->state = TOUCH_END; + t->pinned.is_pinned = false; + t->millis = time; +@@ -455,7 +455,7 @@ int + tp_touch_active(struct tp_dispatch *tp, struct tp_touch *t) + { + return (t->state == TOUCH_BEGIN || t->state == TOUCH_UPDATE) && +- !t->palm.is_palm && ++ t->palm.state == PALM_NONE && + !t->pinned.is_pinned && + tp_button_touch_active(tp, t) && + tp_edge_scroll_touch_active(tp, t); +@@ -491,14 +491,14 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + we move out of the palm edge zone within the timeout, provided + the direction is within 45 degrees of the horizontal. + */ +- if (t->palm.is_palm) { ++ if (t->palm.state == PALM_EDGE) { + if (time < t->palm.time + PALM_TIMEOUT && + (t->point.x > tp->palm.left_edge && t->point.x < tp->palm.right_edge)) { + delta = device_delta(t->point, t->palm.first); + dirs = normalized_get_direction( + tp_normalize_delta(tp, delta)); + if ((dirs & DIRECTIONS) && !(dirs & ~DIRECTIONS)) { +- t->palm.is_palm = false; ++ t->palm.state = PALM_NONE; + } + } + return; +@@ -517,7 +517,7 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + tp_button_is_inside_softbutton_area(tp, t)) + return; + +- t->palm.is_palm = true; ++ t->palm.state = PALM_EDGE; + t->palm.time = time; + t->palm.first = t->point; + } +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index f602359..ba65e41 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -61,6 +61,11 @@ enum touch_state { + TOUCH_END + }; + ++enum touch_palm_state { ++ PALM_NONE = 0, ++ PALM_EDGE, ++}; ++ + enum button_event { + BUTTON_EVENT_IN_BOTTOM_R = 30, + BUTTON_EVENT_IN_BOTTOM_L, +@@ -171,7 +176,7 @@ struct tp_touch { + } scroll; + + struct { +- bool is_palm; ++ enum touch_palm_state state; + struct device_coords first; /* first coordinates if is_palm == true */ + uint32_t time; /* first timestamp if is_palm == true */ + } palm; +-- +2.3.5 + diff --git a/0002-touchpad-add-timeout-based-disable-while-typing.patch b/0002-touchpad-add-timeout-based-disable-while-typing.patch new file mode 100644 index 0000000..6e7208d --- /dev/null +++ b/0002-touchpad-add-timeout-based-disable-while-typing.patch @@ -0,0 +1,209 @@ +From d02b670e3796c10fa75b94165886901a0a0c41f4 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 20 Apr 2015 15:51:20 +1000 +Subject: [PATCH libinput 2/3] touchpad: add timeout-based disable-while-typing + +On some touchpads, typing triggers touches in areas of the touchpad that +cannot easily be distinguished from other fingers. Pressure information is +useless too, so we have to go back to a timeout-based handling of touch data. + +If we see non-modifier key events, disable the touchpad for a timeout and set +any touches starting during that timeout as palm. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++-- + src/evdev-mt-touchpad.h | 7 ++++ + 2 files changed, 94 insertions(+), 3 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index d8b44fa..32d8e25 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -34,6 +34,7 @@ + #define DEFAULT_ACCEL_NUMERATOR 3000.0 + #define DEFAULT_HYSTERESIS_MARGIN_DENOMINATOR 700.0 + #define DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT 500 /* ms */ ++#define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT 500 /* ms */ + #define FAKE_FINGER_OVERFLOW (1 << 7) + + static inline int +@@ -487,6 +488,14 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + struct device_float_coords delta; + int dirs; + ++ if (tp->sendevents.keyboard_active && ++ t->state == TOUCH_BEGIN) { ++ t->palm.state = PALM_TYPING; ++ t->palm.time = time; ++ t->palm.first = t->point; ++ return; ++ } ++ + /* If labelled a touch as palm, we unlabel as palm when + we move out of the palm edge zone within the timeout, provided + the direction is within 45 degrees of the horizontal. +@@ -705,7 +714,9 @@ tp_post_events(struct tp_dispatch *tp, uint64_t time) + filter_motion |= tp_tap_handle_state(tp, time); + filter_motion |= tp_post_button_events(tp, time); + +- if (filter_motion || tp->sendevents.trackpoint_active) { ++ if (filter_motion || ++ tp->sendevents.trackpoint_active || ++ tp->sendevents.keyboard_active) { + tp_edge_scroll_stop_events(tp, time); + tp_gesture_stop(tp, time); + return; +@@ -755,10 +766,15 @@ static void + tp_remove_sendevents(struct tp_dispatch *tp) + { + libinput_timer_cancel(&tp->sendevents.trackpoint_timer); ++ libinput_timer_cancel(&tp->sendevents.keyboard_timer); + + if (tp->buttons.trackpoint) + libinput_device_remove_event_listener( + &tp->sendevents.trackpoint_listener); ++ ++ if (tp->sendevents.keyboard) ++ libinput_device_remove_event_listener( ++ &tp->sendevents.keyboard_listener); + } + + static void +@@ -881,13 +897,59 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data) + } + + static void ++tp_keyboard_timeout(uint64_t now, void *data) ++{ ++ struct tp_dispatch *tp = data; ++ ++ tp_tap_resume(tp, now); ++ tp->sendevents.keyboard_active = false; ++} ++ ++static void ++tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) ++{ ++ struct tp_dispatch *tp = data; ++ struct libinput_event_keyboard *kbdev; ++ ++ if (event->type != LIBINPUT_EVENT_KEYBOARD_KEY) ++ return; ++ ++ kbdev = libinput_event_get_keyboard_event(event); ++ /* modifier keys don't trigger disable-while-typing so things like ++ * ctrl+zoom or ctrl+click are possible */ ++ switch (libinput_event_keyboard_get_key(kbdev)) { ++ case KEY_LEFTCTRL: ++ case KEY_RIGHTCTRL: ++ case KEY_LEFTALT: ++ case KEY_RIGHTALT: ++ case KEY_LEFTSHIFT: ++ case KEY_RIGHTSHIFT: ++ case KEY_FN: ++ return; ++ default: ++ break; ++ } ++ ++ if (!tp->sendevents.keyboard_active) { ++ tp_edge_scroll_stop_events(tp, time); ++ tp_gesture_stop(tp, time); ++ tp_tap_suspend(tp, time); ++ tp->sendevents.keyboard_active = true; ++ } ++ ++ libinput_timer_set(&tp->sendevents.keyboard_timer, ++ time + DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT); ++} ++ ++static void + tp_device_added(struct evdev_device *device, + struct evdev_device *added_device) + { + struct tp_dispatch *tp = (struct tp_dispatch*)device->dispatch; + unsigned int bus_tp = libevdev_get_id_bustype(device->evdev), +- bus_trp = libevdev_get_id_bustype(added_device->evdev); +- bool tp_is_internal, trp_is_internal; ++ bus_trp = libevdev_get_id_bustype(added_device->evdev), ++ bus_kbd = libevdev_get_id_bustype(added_device->evdev); ++ bool tp_is_internal, trp_is_internal, kbd_is_internal; + + tp_is_internal = bus_tp != BUS_USB && bus_tp != BUS_BLUETOOTH; + trp_is_internal = bus_trp != BUS_USB && bus_trp != BUS_BLUETOOTH; +@@ -903,6 +965,18 @@ tp_device_added(struct evdev_device *device, + tp_trackpoint_event, tp); + } + ++ /* FIXME: detect external keyboard better */ ++ kbd_is_internal = bus_tp != BUS_BLUETOOTH && ++ bus_kbd == bus_tp; ++ if (tp_is_internal && kbd_is_internal && ++ tp->sendevents.keyboard == NULL) { ++ libinput_device_add_event_listener(&added_device->base, ++ &tp->sendevents.keyboard_listener, ++ tp_keyboard_event, tp); ++ tp->sendevents.keyboard = added_device; ++ tp->sendevents.keyboard_active = false; ++ } ++ + if (tp->sendevents.current_mode != + LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE) + return; +@@ -929,6 +1003,12 @@ tp_device_removed(struct evdev_device *device, + tp->buttons.trackpoint = NULL; + } + ++ if (removed_device == tp->sendevents.keyboard) { ++ libinput_device_remove_event_listener( ++ &tp->sendevents.keyboard_listener); ++ tp->sendevents.keyboard = NULL; ++ } ++ + if (tp->sendevents.current_mode != + LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE) + return; +@@ -1204,6 +1284,10 @@ tp_init_sendevents(struct tp_dispatch *tp, + libinput_timer_init(&tp->sendevents.trackpoint_timer, + tp->device->base.seat->libinput, + tp_trackpoint_timeout, tp); ++ ++ libinput_timer_init(&tp->sendevents.keyboard_timer, ++ tp->device->base.seat->libinput, ++ tp_keyboard_timeout, tp); + return 0; + } + +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index ba65e41..3d51a39 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -64,6 +64,7 @@ enum touch_state { + enum touch_palm_state { + PALM_NONE = 0, + PALM_EDGE, ++ PALM_TYPING, + }; + + enum button_event { +@@ -277,9 +278,15 @@ struct tp_dispatch { + struct { + struct libinput_device_config_send_events config; + enum libinput_config_send_events_mode current_mode; ++ + bool trackpoint_active; + struct libinput_event_listener trackpoint_listener; + struct libinput_timer trackpoint_timer; ++ ++ bool keyboard_active; ++ struct libinput_event_listener keyboard_listener; ++ struct libinput_timer keyboard_timer; ++ struct evdev_device *keyboard; + } sendevents; + }; + +-- +2.3.5 + diff --git a/0003-touchpad-use-a-two-stage-timeout-for-disable-while-t.patch b/0003-touchpad-use-a-two-stage-timeout-for-disable-while-t.patch new file mode 100644 index 0000000..de0aa6f --- /dev/null +++ b/0003-touchpad-use-a-two-stage-timeout-for-disable-while-t.patch @@ -0,0 +1,71 @@ +From c2f8b508b9fc661967516ca07d2100ca8749c101 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 20 Apr 2015 16:20:00 +1000 +Subject: [PATCH libinput 3/3] touchpad: use a two-stage timeout for + disable-while-typing + +Hitting a single key triggers a short timeout, just enough to cover the time +to the next key event. Hitting more than one key triggers the longer timeout. + +This should improve responsiveness after single key events when the touchpad is +still the main interaction mode and a key needs to be pressed to advance in +the UI. When typing the hands require physical movement to get back to the +touchpad anyway so a longer timeout is acceptable and more reliable. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 32d8e25..3ebb559 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -34,7 +34,8 @@ + #define DEFAULT_ACCEL_NUMERATOR 3000.0 + #define DEFAULT_HYSTERESIS_MARGIN_DENOMINATOR 700.0 + #define DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT 500 /* ms */ +-#define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT 500 /* ms */ ++#define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_1 200 /* ms */ ++#define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_2 500 /* ms */ + #define FAKE_FINGER_OVERFLOW (1 << 7) + + static inline int +@@ -910,11 +911,18 @@ tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) + { + struct tp_dispatch *tp = data; + struct libinput_event_keyboard *kbdev; ++ unsigned int timeout; + + if (event->type != LIBINPUT_EVENT_KEYBOARD_KEY) + return; + + kbdev = libinput_event_get_keyboard_event(event); ++ ++ /* Only trigger the timer on key down. */ ++ if (libinput_event_keyboard_get_key_state(kbdev) != ++ LIBINPUT_KEY_STATE_PRESSED) ++ return; ++ + /* modifier keys don't trigger disable-while-typing so things like + * ctrl+zoom or ctrl+click are possible */ + switch (libinput_event_keyboard_get_key(kbdev)) { +@@ -935,10 +943,13 @@ tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) + tp_gesture_stop(tp, time); + tp_tap_suspend(tp, time); + tp->sendevents.keyboard_active = true; ++ timeout = DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_1; ++ } else { ++ timeout = DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_2; + } + + libinput_timer_set(&tp->sendevents.keyboard_timer, +- time + DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT); ++ time + timeout); + } + + static void +-- +2.3.5 + diff --git a/libinput.spec b/libinput.spec index d24e8c6..a1c5751 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.15.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,10 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-touchpad-switch-from-is_palm-to-an-enum.patch +Patch02: 0002-touchpad-add-timeout-based-disable-while-typing.patch +Patch03: 0003-touchpad-use-a-two-stage-timeout-for-disable-while-t.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -93,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon May 18 2015 Peter Hutterer 0.15.0-2 +- Add disable-while-typing feature (#1209753) + * Tue May 05 2015 Peter Hutterer 0.15.0-1 - libinput 0.15.0 From 9418372b5dee5bba4ca1ed4fcaebc8a6c038432b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 27 May 2015 14:32:52 +1000 Subject: [PATCH 018/317] Refine disable-while-typing (#1209753) --- ...sable-while-typing-into-its-own-stru.patch | 148 ++++++++++++ ...the-key-blacklist-for-disable-while-.patch | 84 +++++++ ...per-function-to-get-from-tp-to-the-l.patch | 220 ++++++++++++++++++ ...eck-keyboards-for-disable-while-typi.patch | 104 +++++++++ ...r-grained-about-when-to-pair-touchpa.patch | 154 ++++++++++++ ...isable-while-typing-handling-into-a-.patch | 59 +++++ 0007-touchpad-add-palm-state-debugging.patch | 85 +++++++ ...he-touch-state-when-edge-scrolling-i.patch | 31 +++ ...nable-edge-palm-detection-on-Wacom-t.patch | 64 +++++ ...-after-the-last-key-press-can-be-rel.patch | 122 ++++++++++ libinput.spec | 16 +- 11 files changed, 1086 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-move-disable-while-typing-into-its-own-stru.patch create mode 100644 0002-touchpad-extend-the-key-blacklist-for-disable-while-.patch create mode 100644 0003-touchpad-add-helper-function-to-get-from-tp-to-the-l.patch create mode 100644 0004-touchpad-only-check-keyboards-for-disable-while-typi.patch create mode 100644 0005-touchpad-be-finer-grained-about-when-to-pair-touchpa.patch create mode 100644 0006-touchpad-split-disable-while-typing-handling-into-a-.patch create mode 100644 0007-touchpad-add-palm-state-debugging.patch create mode 100644 0008-touchpad-reset-the-touch-state-when-edge-scrolling-i.patch create mode 100644 0009-touchpad-don-t-enable-edge-palm-detection-on-Wacom-t.patch create mode 100644 0010-touchpad-touches-after-the-last-key-press-can-be-rel.patch diff --git a/0001-touchpad-move-disable-while-typing-into-its-own-stru.patch b/0001-touchpad-move-disable-while-typing-into-its-own-stru.patch new file mode 100644 index 0000000..b2ce138 --- /dev/null +++ b/0001-touchpad-move-disable-while-typing-into-its-own-stru.patch @@ -0,0 +1,148 @@ +From 09c597a3a782d1eb82f5e911f91114eb7ef44002 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 25 May 2015 10:07:51 +1000 +Subject: [PATCH libinput 01/10] touchpad: move disable-while-typing into its + own struct + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +Tested-by: Benjamin Tissoires +--- + src/evdev-mt-touchpad.c | 34 +++++++++++++++++----------------- + src/evdev-mt-touchpad.h | 4 +++- + 2 files changed, 20 insertions(+), 18 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 821e645..89d24f3 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -486,7 +486,7 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + struct device_float_coords delta; + int dirs; + +- if (tp->sendevents.keyboard_active && ++ if (tp->dwt.keyboard_active && + t->state == TOUCH_BEGIN) { + t->palm.state = PALM_TYPING; + t->palm.time = time; +@@ -682,7 +682,7 @@ tp_post_events(struct tp_dispatch *tp, uint64_t time) + + if (filter_motion || + tp->sendevents.trackpoint_active || +- tp->sendevents.keyboard_active) { ++ tp->dwt.keyboard_active) { + tp_edge_scroll_stop_events(tp, time); + tp_gesture_stop(tp, time); + return; +@@ -732,15 +732,15 @@ static void + tp_remove_sendevents(struct tp_dispatch *tp) + { + libinput_timer_cancel(&tp->sendevents.trackpoint_timer); +- libinput_timer_cancel(&tp->sendevents.keyboard_timer); ++ libinput_timer_cancel(&tp->dwt.keyboard_timer); + + if (tp->buttons.trackpoint) + libinput_device_remove_event_listener( + &tp->sendevents.trackpoint_listener); + +- if (tp->sendevents.keyboard) ++ if (tp->dwt.keyboard) + libinput_device_remove_event_listener( +- &tp->sendevents.keyboard_listener); ++ &tp->dwt.keyboard_listener); + } + + static void +@@ -868,7 +868,7 @@ tp_keyboard_timeout(uint64_t now, void *data) + struct tp_dispatch *tp = data; + + tp_tap_resume(tp, now); +- tp->sendevents.keyboard_active = false; ++ tp->dwt.keyboard_active = false; + } + + static void +@@ -903,17 +903,17 @@ tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) + break; + } + +- if (!tp->sendevents.keyboard_active) { ++ if (!tp->dwt.keyboard_active) { + tp_edge_scroll_stop_events(tp, time); + tp_gesture_stop(tp, time); + tp_tap_suspend(tp, time); +- tp->sendevents.keyboard_active = true; ++ tp->dwt.keyboard_active = true; + timeout = DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_1; + } else { + timeout = DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_2; + } + +- libinput_timer_set(&tp->sendevents.keyboard_timer, ++ libinput_timer_set(&tp->dwt.keyboard_timer, + time + timeout); + } + +@@ -945,12 +945,12 @@ tp_device_added(struct evdev_device *device, + kbd_is_internal = bus_tp != BUS_BLUETOOTH && + bus_kbd == bus_tp; + if (tp_is_internal && kbd_is_internal && +- tp->sendevents.keyboard == NULL) { ++ tp->dwt.keyboard == NULL) { + libinput_device_add_event_listener(&added_device->base, +- &tp->sendevents.keyboard_listener, ++ &tp->dwt.keyboard_listener, + tp_keyboard_event, tp); +- tp->sendevents.keyboard = added_device; +- tp->sendevents.keyboard_active = false; ++ tp->dwt.keyboard = added_device; ++ tp->dwt.keyboard_active = false; + } + + if (tp->sendevents.current_mode != +@@ -979,10 +979,10 @@ tp_device_removed(struct evdev_device *device, + tp->buttons.trackpoint = NULL; + } + +- if (removed_device == tp->sendevents.keyboard) { ++ if (removed_device == tp->dwt.keyboard) { + libinput_device_remove_event_listener( +- &tp->sendevents.keyboard_listener); +- tp->sendevents.keyboard = NULL; ++ &tp->dwt.keyboard_listener); ++ tp->dwt.keyboard = NULL; + } + + if (tp->sendevents.current_mode != +@@ -1261,7 +1261,7 @@ tp_init_sendevents(struct tp_dispatch *tp, + tp->device->base.seat->libinput, + tp_trackpoint_timeout, tp); + +- libinput_timer_init(&tp->sendevents.keyboard_timer, ++ libinput_timer_init(&tp->dwt.keyboard_timer, + tp->device->base.seat->libinput, + tp_keyboard_timeout, tp); + return 0; +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index 1413945..70b35f4 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -279,12 +279,14 @@ struct tp_dispatch { + bool trackpoint_active; + struct libinput_event_listener trackpoint_listener; + struct libinput_timer trackpoint_timer; ++ } sendevents; + ++ struct { + bool keyboard_active; + struct libinput_event_listener keyboard_listener; + struct libinput_timer keyboard_timer; + struct evdev_device *keyboard; +- } sendevents; ++ } dwt; + }; + + #define tp_for_each_touch(_tp, _t) \ +-- +2.4.1 + diff --git a/0002-touchpad-extend-the-key-blacklist-for-disable-while-.patch b/0002-touchpad-extend-the-key-blacklist-for-disable-while-.patch new file mode 100644 index 0000000..c8d983d --- /dev/null +++ b/0002-touchpad-extend-the-key-blacklist-for-disable-while-.patch @@ -0,0 +1,84 @@ +From 640c17cb8102a1833e0366eaf3f7bd5325147741 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 25 May 2015 08:48:25 +1000 +Subject: [PATCH libinput 02/10] touchpad: extend the key blacklist for + disable-while-typing + +Alt-tab should not trigger the disable-while-typing timeout, likewise with the +F-keys, multimedia keys, the windows and menu key, etc. + +https://bugs.freedesktop.org/show_bug.cgi?id=90613 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +Tested-by: Benjamin Tissoires +--- + src/evdev-mt-touchpad.c | 45 +++++++++++++++++++++++++++++++++------------ + 1 file changed, 33 insertions(+), 12 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 89d24f3..26edcb4 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -871,6 +871,37 @@ tp_keyboard_timeout(uint64_t now, void *data) + tp->dwt.keyboard_active = false; + } + ++static inline bool ++tp_key_ignore_for_dwt(unsigned int keycode) ++{ ++ switch (keycode) { ++ /* Ignore modifiers to be responsive to ctrl-click, alt-tab, etc. */ ++ case KEY_LEFTCTRL: ++ case KEY_RIGHTCTRL: ++ case KEY_LEFTALT: ++ case KEY_RIGHTALT: ++ case KEY_LEFTSHIFT: ++ case KEY_RIGHTSHIFT: ++ case KEY_FN: ++ case KEY_CAPSLOCK: ++ case KEY_TAB: ++ case KEY_COMPOSE: ++ case KEY_RIGHTMETA: ++ case KEY_LEFTMETA: ++ return true; ++ default: ++ break; ++ } ++ ++ /* Ignore keys not part of the "typewriter set", i.e. F-keys, ++ * multimedia keys, numpad, etc. ++ */ ++ if (keycode >= KEY_F1) ++ return true; ++ ++ return false; ++} ++ + static void + tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) + { +@@ -890,18 +921,8 @@ tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) + + /* modifier keys don't trigger disable-while-typing so things like + * ctrl+zoom or ctrl+click are possible */ +- switch (libinput_event_keyboard_get_key(kbdev)) { +- case KEY_LEFTCTRL: +- case KEY_RIGHTCTRL: +- case KEY_LEFTALT: +- case KEY_RIGHTALT: +- case KEY_LEFTSHIFT: +- case KEY_RIGHTSHIFT: +- case KEY_FN: +- return; +- default: +- break; +- } ++ if (tp_key_ignore_for_dwt(libinput_event_keyboard_get_key(kbdev))) ++ return; + + if (!tp->dwt.keyboard_active) { + tp_edge_scroll_stop_events(tp, time); +-- +2.4.1 + diff --git a/0003-touchpad-add-helper-function-to-get-from-tp-to-the-l.patch b/0003-touchpad-add-helper-function-to-get-from-tp-to-the-l.patch new file mode 100644 index 0000000..e8c44b0 --- /dev/null +++ b/0003-touchpad-add-helper-function-to-get-from-tp-to-the-l.patch @@ -0,0 +1,220 @@ +From c007b9aa435bb04066874fada4e5ef35147a3f4d Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 22 May 2015 15:16:31 +1000 +Subject: [PATCH libinput 03/10] touchpad: add helper function to get from tp + to the libinput context + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +Tested-by: Benjamin Tissoires +--- + src/evdev-mt-touchpad-buttons.c | 8 ++++---- + src/evdev-mt-touchpad-edge-scroll.c | 12 ++++++------ + src/evdev-mt-touchpad-tap.c | 10 +++++----- + src/evdev-mt-touchpad.c | 8 ++++---- + src/evdev-mt-touchpad.h | 6 ++++++ + 5 files changed, 25 insertions(+), 19 deletions(-) + +diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c +index d6acbf0..2f24ee6 100644 +--- a/src/evdev-mt-touchpad-buttons.c ++++ b/src/evdev-mt-touchpad-buttons.c +@@ -392,7 +392,7 @@ tp_button_handle_event(struct tp_dispatch *tp, + enum button_event event, + uint64_t time) + { +- struct libinput *libinput = tp->device->base.seat->libinput; ++ struct libinput *libinput = tp_libinput_context(tp); + enum button_state current = t->button.state; + + switch(t->button.state) { +@@ -478,7 +478,7 @@ tp_process_button(struct tp_dispatch *tp, + const struct input_event *e, + uint64_t time) + { +- struct libinput *libinput = tp->device->base.seat->libinput; ++ struct libinput *libinput = tp_libinput_context(tp); + uint32_t mask = 1 << (e->code - BTN_LEFT); + + /* Ignore other buttons on clickpads */ +@@ -680,7 +680,7 @@ int + tp_init_buttons(struct tp_dispatch *tp, + struct evdev_device *device) + { +- struct libinput *libinput = tp->device->base.seat->libinput; ++ struct libinput *libinput = tp_libinput_context(tp); + struct tp_touch *t; + int width, height; + double diagonal; +@@ -731,7 +731,7 @@ tp_init_buttons(struct tp_dispatch *tp, + tp_for_each_touch(tp, t) { + t->button.state = BUTTON_STATE_NONE; + libinput_timer_init(&t->button.timer, +- tp->device->base.seat->libinput, ++ tp_libinput_context(tp), + tp_button_handle_timeout, t); + } + +diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c +index 369fded..9bf3f0c 100644 +--- a/src/evdev-mt-touchpad-edge-scroll.c ++++ b/src/evdev-mt-touchpad-edge-scroll.c +@@ -121,7 +121,7 @@ tp_edge_scroll_handle_none(struct tp_dispatch *tp, + struct tp_touch *t, + enum scroll_event event) + { +- struct libinput *libinput = tp->device->base.seat->libinput; ++ struct libinput *libinput = tp_libinput_context(tp); + + switch (event) { + case SCROLL_EVENT_TOUCH: +@@ -149,7 +149,7 @@ tp_edge_scroll_handle_edge_new(struct tp_dispatch *tp, + struct tp_touch *t, + enum scroll_event event) + { +- struct libinput *libinput = tp->device->base.seat->libinput; ++ struct libinput *libinput = tp_libinput_context(tp); + + switch (event) { + case SCROLL_EVENT_TOUCH: +@@ -178,7 +178,7 @@ tp_edge_scroll_handle_edge(struct tp_dispatch *tp, + struct tp_touch *t, + enum scroll_event event) + { +- struct libinput *libinput = tp->device->base.seat->libinput; ++ struct libinput *libinput = tp_libinput_context(tp); + + switch (event) { + case SCROLL_EVENT_TOUCH: +@@ -209,7 +209,7 @@ tp_edge_scroll_handle_area(struct tp_dispatch *tp, + struct tp_touch *t, + enum scroll_event event) + { +- struct libinput *libinput = tp->device->base.seat->libinput; ++ struct libinput *libinput = tp_libinput_context(tp); + + switch (event) { + case SCROLL_EVENT_TOUCH: +@@ -232,7 +232,7 @@ tp_edge_scroll_handle_event(struct tp_dispatch *tp, + struct tp_touch *t, + enum scroll_event event) + { +- struct libinput *libinput = tp->device->base.seat->libinput; ++ struct libinput *libinput = tp_libinput_context(tp); + enum tp_edge_scroll_touch_state current = t->scroll.edge_state; + + switch (current) { +@@ -301,7 +301,7 @@ tp_edge_scroll_init(struct tp_dispatch *tp, struct evdev_device *device) + tp_for_each_touch(tp, t) { + t->scroll.direction = -1; + libinput_timer_init(&t->scroll.timer, +- device->base.seat->libinput, ++ tp_libinput_context(tp), + tp_edge_scroll_handle_timeout, t); + } + +diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c +index 61f94e5..21b2e29 100644 +--- a/src/evdev-mt-touchpad-tap.c ++++ b/src/evdev-mt-touchpad-tap.c +@@ -146,7 +146,7 @@ tp_tap_idle_handle_event(struct tp_dispatch *tp, + struct tp_touch *t, + enum tap_event event, uint64_t time) + { +- struct libinput *libinput = tp->device->base.seat->libinput; ++ struct libinput *libinput = tp_libinput_context(tp); + + switch (event) { + case TAP_EVENT_TOUCH: +@@ -222,7 +222,7 @@ tp_tap_tapped_handle_event(struct tp_dispatch *tp, + struct tp_touch *t, + enum tap_event event, uint64_t time) + { +- struct libinput *libinput = tp->device->base.seat->libinput; ++ struct libinput *libinput = tp_libinput_context(tp); + + switch (event) { + case TAP_EVENT_MOTION: +@@ -456,7 +456,7 @@ tp_tap_multitap_handle_event(struct tp_dispatch *tp, + struct tp_touch *t, + enum tap_event event, uint64_t time) + { +- struct libinput *libinput = tp->device->base.seat->libinput; ++ struct libinput *libinput = tp_libinput_context(tp); + + switch (event) { + case TAP_EVENT_RELEASE: +@@ -549,7 +549,7 @@ tp_tap_handle_event(struct tp_dispatch *tp, + enum tap_event event, + uint64_t time) + { +- struct libinput *libinput = tp->device->base.seat->libinput; ++ struct libinput *libinput = tp_libinput_context(tp); + enum tp_tap_state current; + + current = tp->tap.state; +@@ -826,7 +826,7 @@ tp_init_tap(struct tp_dispatch *tp) + tp->tap.enabled = tp_tap_default(tp->device); + + libinput_timer_init(&tp->tap.timer, +- tp->device->base.seat->libinput, ++ tp_libinput_context(tp), + tp_tap_handle_timeout, tp); + + return 0; +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 26edcb4..6c0daf0 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -775,7 +775,7 @@ tp_release_fake_touches(struct tp_dispatch *tp) + static void + tp_clear_state(struct tp_dispatch *tp) + { +- uint64_t now = libinput_now(tp->device->base.seat->libinput); ++ uint64_t now = libinput_now(tp_libinput_context(tp)); + struct tp_touch *t; + + /* Unroll the touchpad state. +@@ -1178,7 +1178,7 @@ tp_scroll_config_scroll_method_set_method(struct libinput_device *device, + { + struct evdev_device *evdev = (struct evdev_device*)device; + struct tp_dispatch *tp = (struct tp_dispatch*)evdev->dispatch; +- uint64_t time = libinput_now(device->seat->libinput); ++ uint64_t time = libinput_now(tp_libinput_context(tp)); + + if (method == tp->scroll.method) + return LIBINPUT_CONFIG_STATUS_SUCCESS; +@@ -1279,11 +1279,11 @@ tp_init_sendevents(struct tp_dispatch *tp, + struct evdev_device *device) + { + libinput_timer_init(&tp->sendevents.trackpoint_timer, +- tp->device->base.seat->libinput, ++ tp_libinput_context(tp), + tp_trackpoint_timeout, tp); + + libinput_timer_init(&tp->dwt.keyboard_timer, +- tp->device->base.seat->libinput, ++ tp_libinput_context(tp), + tp_keyboard_timeout, tp); + return 0; + } +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index 70b35f4..f8c837d 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -292,6 +292,12 @@ struct tp_dispatch { + #define tp_for_each_touch(_tp, _t) \ + for (unsigned int _i = 0; _i < (_tp)->ntouches && (_t = &(_tp)->touches[_i]); _i++) + ++static inline struct libinput* ++tp_libinput_context(struct tp_dispatch *tp) ++{ ++ return tp->device->base.seat->libinput; ++} ++ + static inline struct normalized_coords + tp_normalize_delta(struct tp_dispatch *tp, struct device_float_coords delta) + { +-- +2.4.1 + diff --git a/0004-touchpad-only-check-keyboards-for-disable-while-typi.patch b/0004-touchpad-only-check-keyboards-for-disable-while-typi.patch new file mode 100644 index 0000000..8871177 --- /dev/null +++ b/0004-touchpad-only-check-keyboards-for-disable-while-typi.patch @@ -0,0 +1,104 @@ +From 5a18344bbc0a47f13752d8e39a22450f89624980 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 22 May 2015 15:51:18 +1000 +Subject: [PATCH libinput 04/10] touchpad: only check keyboards for + disable-while-typing + +The keyboard test is a simple one, if we have the first row of alphabetic +keys, we assume it's a full keyboard. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +Tested-by: Benjamin Tissoires +--- + src/evdev-mt-touchpad.c | 22 ++++++++++++---------- + src/evdev.c | 20 ++++++++++++++++++++ + src/evdev.h | 1 + + 3 files changed, 33 insertions(+), 10 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 6c0daf0..5a05129 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -962,16 +962,18 @@ tp_device_added(struct evdev_device *device, + tp_trackpoint_event, tp); + } + +- /* FIXME: detect external keyboard better */ +- kbd_is_internal = bus_tp != BUS_BLUETOOTH && +- bus_kbd == bus_tp; +- if (tp_is_internal && kbd_is_internal && +- tp->dwt.keyboard == NULL) { +- libinput_device_add_event_listener(&added_device->base, +- &tp->dwt.keyboard_listener, +- tp_keyboard_event, tp); +- tp->dwt.keyboard = added_device; +- tp->dwt.keyboard_active = false; ++ if (added_device->tags & EVDEV_TAG_KEYBOARD) { ++ /* FIXME: detect external keyboard better */ ++ kbd_is_internal = bus_tp != BUS_BLUETOOTH && ++ bus_kbd == bus_tp; ++ if (tp_is_internal && kbd_is_internal && ++ tp->dwt.keyboard == NULL) { ++ libinput_device_add_event_listener(&added_device->base, ++ &tp->dwt.keyboard_listener, ++ tp_keyboard_event, tp); ++ tp->dwt.keyboard = added_device; ++ tp->dwt.keyboard_active = false; ++ } + } + + if (tp->sendevents.current_mode != +diff --git a/src/evdev.c b/src/evdev.c +index 4ce9250..a98e801 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -734,6 +734,25 @@ evdev_tag_trackpoint(struct evdev_device *device, + } + + static void ++evdev_tag_keyboard(struct evdev_device *device, ++ struct udev_device *udev_device) ++{ ++ int code; ++ ++ if (!libevdev_has_event_type(device->evdev, EV_KEY)) ++ return; ++ ++ for (code = KEY_Q; code <= KEY_P; code++) { ++ if (!libevdev_has_event_code(device->evdev, ++ EV_KEY, ++ code)) ++ return; ++ } ++ ++ device->tags |= EVDEV_TAG_KEYBOARD; ++} ++ ++static void + fallback_process(struct evdev_dispatch *dispatch, + struct evdev_device *device, + struct input_event *event, +@@ -772,6 +791,7 @@ fallback_tag_device(struct evdev_device *device, + { + evdev_tag_external_mouse(device, udev_device); + evdev_tag_trackpoint(device, udev_device); ++ evdev_tag_keyboard(device, udev_device); + } + + static int +diff --git a/src/evdev.h b/src/evdev.h +index 20c0b55..bd398de 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -68,6 +68,7 @@ enum evdev_device_tags { + EVDEV_TAG_INTERNAL_TOUCHPAD = (1 << 1), + EVDEV_TAG_TRACKPOINT = (1 << 2), + EVDEV_TAG_TOUCHPAD_TRACKPOINT = (1 << 3), ++ EVDEV_TAG_KEYBOARD = (1 << 4), + }; + + enum evdev_middlebutton_state { +-- +2.4.1 + diff --git a/0005-touchpad-be-finer-grained-about-when-to-pair-touchpa.patch b/0005-touchpad-be-finer-grained-about-when-to-pair-touchpa.patch new file mode 100644 index 0000000..0cadc69 --- /dev/null +++ b/0005-touchpad-be-finer-grained-about-when-to-pair-touchpa.patch @@ -0,0 +1,154 @@ +From f1a89760aa814787f0e1df43658b95bf88195592 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 22 May 2015 16:07:10 +1000 +Subject: [PATCH libinput 05/10] touchpad: be finer-grained about when to pair + touchpads/keyboard for DWT + +Check a couple of easy yes/no definitives that cover most Lenovo laptops, +and avoid false positives on Wacoms. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +Tested-by: Benjamin Tissoires +--- + src/evdev-mt-touchpad.c | 54 +++++++++++++++++++++++++++++++++++-------------- + src/evdev-mt-touchpad.h | 2 -- + src/libinput-util.h | 3 +++ + test/device.c | 2 +- + test/touchpad.c | 2 +- + 5 files changed, 44 insertions(+), 19 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 5a05129..3a0985d 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -938,15 +938,43 @@ tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) + time + timeout); + } + ++static bool ++tp_want_dwt(struct evdev_device *touchpad, ++ struct evdev_device *keyboard) ++{ ++ unsigned int bus_tp = libevdev_get_id_bustype(touchpad->evdev), ++ bus_kbd = libevdev_get_id_bustype(keyboard->evdev); ++ ++ if (bus_tp == BUS_BLUETOOTH || bus_kbd == BUS_BLUETOOTH) ++ return false; ++ ++ /* evemu will set the right bus type */ ++ if (bus_tp == BUS_VIRTUAL || bus_kbd == BUS_VIRTUAL) ++ return false; ++ ++ /* If the touchpad is on serio, the keyboard is too, so ignore any ++ other devices */ ++ if (bus_tp == BUS_I8042 && bus_kbd != bus_tp) ++ return false; ++ ++ /* Wacom makes touchpads, but not internal ones */ ++ if (libevdev_get_id_vendor(touchpad->evdev) == VENDOR_ID_WACOM) ++ return false; ++ ++ /* everything else we don't really know, so we have to assume ++ they go together */ ++ ++ return true; ++} ++ + static void + tp_device_added(struct evdev_device *device, + struct evdev_device *added_device) + { + struct tp_dispatch *tp = (struct tp_dispatch*)device->dispatch; + unsigned int bus_tp = libevdev_get_id_bustype(device->evdev), +- bus_trp = libevdev_get_id_bustype(added_device->evdev), +- bus_kbd = libevdev_get_id_bustype(added_device->evdev); +- bool tp_is_internal, trp_is_internal, kbd_is_internal; ++ bus_trp = libevdev_get_id_bustype(added_device->evdev); ++ bool tp_is_internal, trp_is_internal; + + tp_is_internal = bus_tp != BUS_USB && bus_tp != BUS_BLUETOOTH; + trp_is_internal = bus_trp != BUS_USB && bus_trp != BUS_BLUETOOTH; +@@ -962,18 +990,14 @@ tp_device_added(struct evdev_device *device, + tp_trackpoint_event, tp); + } + +- if (added_device->tags & EVDEV_TAG_KEYBOARD) { +- /* FIXME: detect external keyboard better */ +- kbd_is_internal = bus_tp != BUS_BLUETOOTH && +- bus_kbd == bus_tp; +- if (tp_is_internal && kbd_is_internal && +- tp->dwt.keyboard == NULL) { +- libinput_device_add_event_listener(&added_device->base, +- &tp->dwt.keyboard_listener, +- tp_keyboard_event, tp); +- tp->dwt.keyboard = added_device; +- tp->dwt.keyboard_active = false; +- } ++ if (added_device->tags & EVDEV_TAG_KEYBOARD && ++ tp->dwt.keyboard == NULL && ++ tp_want_dwt(device, added_device)) { ++ libinput_device_add_event_listener(&added_device->base, ++ &tp->dwt.keyboard_listener, ++ tp_keyboard_event, tp); ++ tp->dwt.keyboard = added_device; ++ tp->dwt.keyboard_active = false; + } + + if (tp->sendevents.current_mode != +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index f8c837d..db877c7 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -32,8 +32,6 @@ + #define TOUCHPAD_HISTORY_LENGTH 4 + #define TOUCHPAD_MIN_SAMPLES 4 + +-#define VENDOR_ID_APPLE 0x5ac +- + /* Convert mm to a distance normalized to DEFAULT_MOUSE_DPI */ + #define TP_MM_TO_DPI_NORMALIZED(mm) (DEFAULT_MOUSE_DPI/25.4 * mm) + +diff --git a/src/libinput-util.h b/src/libinput-util.h +index 74226b9..89f5230 100644 +--- a/src/libinput-util.h ++++ b/src/libinput-util.h +@@ -30,6 +30,9 @@ + + #include "libinput.h" + ++#define VENDOR_ID_APPLE 0x5ac ++#define VENDOR_ID_WACOM 0x56a ++ + void + set_logging_enabled(int enabled); + +diff --git a/test/device.c b/test/device.c +index 1c277ba..0e494c4 100644 +--- a/test/device.c ++++ b/test/device.c +@@ -69,7 +69,7 @@ START_TEST(device_sendevents_config_touchpad) + expected = LIBINPUT_CONFIG_SEND_EVENTS_DISABLED; + + /* The wacom devices in the test suite are external */ +- if (libevdev_get_id_vendor(dev->evdev) != 0x56a) /* wacom */ ++ if (libevdev_get_id_vendor(dev->evdev) != VENDOR_ID_WACOM) + expected |= + LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE; + +diff --git a/test/touchpad.c b/test/touchpad.c +index 576b2bd..2624dda 100644 +--- a/test/touchpad.c ++++ b/test/touchpad.c +@@ -2951,7 +2951,7 @@ touchpad_has_palm_detect_size(struct litest_device *dev) + double width, height; + int rc; + +- if (libinput_device_get_id_vendor(dev->libinput_device) == 0x5ac) /* Apple */ ++ if (libinput_device_get_id_vendor(dev->libinput_device) == ID_VENDOR_APPLE) + return 1; + + rc = libinput_device_get_size(dev->libinput_device, &width, &height); +-- +2.4.1 + diff --git a/0006-touchpad-split-disable-while-typing-handling-into-a-.patch b/0006-touchpad-split-disable-while-typing-handling-into-a-.patch new file mode 100644 index 0000000..56e10de --- /dev/null +++ b/0006-touchpad-split-disable-while-typing-handling-into-a-.patch @@ -0,0 +1,59 @@ +From c98229492ce59faf402f446da200658454ace9d5 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 21 May 2015 13:30:24 +1000 +Subject: [PATCH libinput 06/10] touchpad: split disable-while-typing handling + into a helper function + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +Tested-by: Benjamin Tissoires +--- + src/evdev-mt-touchpad.c | 25 ++++++++++++++++++------- + 1 file changed, 18 insertions(+), 7 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 3a0985d..ad20fb9 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -478,6 +478,22 @@ tp_palm_tap_is_palm(struct tp_dispatch *tp, struct tp_touch *t) + return false; + } + ++static int ++tp_palm_detect_dwt(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) ++{ ++ if (!tp->dwt.keyboard_active) ++ return 0; ++ ++ if (t->state == TOUCH_BEGIN) { ++ t->palm.state = PALM_TYPING; ++ t->palm.time = time; ++ t->palm.first = t->point; ++ return 1; ++ } ++ ++ return 0; ++} ++ + static void + tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + { +@@ -486,13 +502,8 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + struct device_float_coords delta; + int dirs; + +- if (tp->dwt.keyboard_active && +- t->state == TOUCH_BEGIN) { +- t->palm.state = PALM_TYPING; +- t->palm.time = time; +- t->palm.first = t->point; +- return; +- } ++ if (tp_palm_detect_dwt(tp, t, time)) ++ return; + + /* If labelled a touch as palm, we unlabel as palm when + we move out of the palm edge zone within the timeout, provided +-- +2.4.1 + diff --git a/0007-touchpad-add-palm-state-debugging.patch b/0007-touchpad-add-palm-state-debugging.patch new file mode 100644 index 0000000..4f8ef49 --- /dev/null +++ b/0007-touchpad-add-palm-state-debugging.patch @@ -0,0 +1,85 @@ +From 09a79656a27c42699f4a9c8d97df171938e009ef Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 22 May 2015 15:14:04 +1000 +Subject: [PATCH libinput 07/10] touchpad: add palm state debugging + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +Tested-by: Benjamin Tissoires +--- + src/evdev-mt-touchpad.c | 22 ++++++++++++++++++++-- + 1 file changed, 20 insertions(+), 2 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index ad20fb9..56a70cc 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -472,8 +472,11 @@ tp_palm_tap_is_palm(struct tp_dispatch *tp, struct tp_touch *t) + + /* We're inside the left/right palm edge and in the northern half of + * the touchpad - this tap is a palm */ +- if (t->point.y < tp->palm.vert_center) ++ if (t->point.y < tp->palm.vert_center) { ++ log_debug(tp_libinput_context(tp), ++ "palm: palm-tap detected\n"); + return true; ++ } + + return false; + } +@@ -503,7 +506,7 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + int dirs; + + if (tp_palm_detect_dwt(tp, t, time)) +- return; ++ goto out; + + /* If labelled a touch as palm, we unlabel as palm when + we move out of the palm edge zone within the timeout, provided +@@ -517,6 +520,8 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + tp_normalize_delta(tp, delta)); + if ((dirs & DIRECTIONS) && !(dirs & ~DIRECTIONS)) { + t->palm.state = PALM_NONE; ++ log_debug(tp_libinput_context(tp), ++ "palm: touch released, out of edge zone\n"); + } + } + return; +@@ -538,6 +543,11 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + t->palm.state = PALM_EDGE; + t->palm.time = time; + t->palm.first = t->point; ++ ++out: ++ log_debug(tp_libinput_context(tp), ++ "palm: palm detected (%s)\n", ++ t->palm.state == PALM_EDGE ? "edge" : "typing"); + } + + static void +@@ -879,7 +889,10 @@ tp_keyboard_timeout(uint64_t now, void *data) + struct tp_dispatch *tp = data; + + tp_tap_resume(tp, now); ++ + tp->dwt.keyboard_active = false; ++ ++ log_debug(tp_libinput_context(tp), "palm: keyboard timeout\n"); + } + + static inline bool +@@ -1004,6 +1017,11 @@ tp_device_added(struct evdev_device *device, + if (added_device->tags & EVDEV_TAG_KEYBOARD && + tp->dwt.keyboard == NULL && + tp_want_dwt(device, added_device)) { ++ log_debug(tp_libinput_context(tp), ++ "palm: dwt activated with %s<->%s\n", ++ device->devname, ++ added_device->devname); ++ + libinput_device_add_event_listener(&added_device->base, + &tp->dwt.keyboard_listener, + tp_keyboard_event, tp); +-- +2.4.1 + diff --git a/0008-touchpad-reset-the-touch-state-when-edge-scrolling-i.patch b/0008-touchpad-reset-the-touch-state-when-edge-scrolling-i.patch new file mode 100644 index 0000000..603fcaf --- /dev/null +++ b/0008-touchpad-reset-the-touch-state-when-edge-scrolling-i.patch @@ -0,0 +1,31 @@ +From 46bb2e4d7583fe7d6b07a3f9fd2270d1e54e2129 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 25 May 2015 11:36:34 +1000 +Subject: [PATCH libinput 08/10] touchpad: reset the touch state when edge + scrolling is stopped + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +Tested-by: Benjamin Tissoires +--- + src/evdev-mt-touchpad-edge-scroll.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c +index 9bf3f0c..f7eae9e 100644 +--- a/src/evdev-mt-touchpad-edge-scroll.c ++++ b/src/evdev-mt-touchpad-edge-scroll.c +@@ -438,6 +438,10 @@ tp_edge_scroll_stop_events(struct tp_dispatch *tp, uint64_t time) + &zero, + &zero_discrete); + t->scroll.direction = -1; ++ /* reset touch to area state, avoids loading the ++ * state machine with special case handling */ ++ t->scroll.edge = EDGE_NONE; ++ t->scroll.edge_state = EDGE_SCROLL_TOUCH_STATE_AREA; + } + } + } +-- +2.4.1 + diff --git a/0009-touchpad-don-t-enable-edge-palm-detection-on-Wacom-t.patch b/0009-touchpad-don-t-enable-edge-palm-detection-on-Wacom-t.patch new file mode 100644 index 0000000..bee74eb --- /dev/null +++ b/0009-touchpad-don-t-enable-edge-palm-detection-on-Wacom-t.patch @@ -0,0 +1,64 @@ +From 322d7f2302c61def6deb6c7cc7a406b4f85b880d Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 25 May 2015 16:02:56 +1000 +Subject: [PATCH libinput 09/10] touchpad: don't enable edge palm detection on + Wacom touchpads + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +Tested-by: Benjamin Tissoires +--- + src/evdev-mt-touchpad.c | 10 ++++++++-- + test/touchpad.c | 6 +++++- + 2 files changed, 13 insertions(+), 3 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 56a70cc..9a04893 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1299,6 +1299,7 @@ tp_init_palmdetect(struct tp_dispatch *tp, + struct evdev_device *device) + { + int width, height; ++ unsigned int vendor_id; + + tp->palm.right_edge = INT_MAX; + tp->palm.left_edge = INT_MIN; +@@ -1309,8 +1310,13 @@ tp_init_palmdetect(struct tp_dispatch *tp, + height = abs(device->abs.absinfo_y->maximum - + device->abs.absinfo_y->minimum); + +- /* Apple touchpads are always big enough to warrant palm detection */ +- if (evdev_device_get_id_vendor(device) != VENDOR_ID_APPLE) { ++ vendor_id = evdev_device_get_id_vendor(device); ++ ++ /* Wacom doesn't have internal touchpads, ++ * Apple touchpads are always big enough to warrant palm detection */ ++ if (vendor_id == VENDOR_ID_WACOM) { ++ return 0; ++ } else if (vendor_id != VENDOR_ID_APPLE) { + /* We don't know how big the touchpad is */ + if (device->abs.absinfo_x->resolution == 1) + return 0; +diff --git a/test/touchpad.c b/test/touchpad.c +index 2624dda..e33d0e1 100644 +--- a/test/touchpad.c ++++ b/test/touchpad.c +@@ -2949,9 +2949,13 @@ static int + touchpad_has_palm_detect_size(struct litest_device *dev) + { + double width, height; ++ unsigned int vendor; + int rc; + +- if (libinput_device_get_id_vendor(dev->libinput_device) == ID_VENDOR_APPLE) ++ vendor = libinput_device_get_id_vendor(dev->libinput_device); ++ if (vendor == VENDOR_ID_WACOM) ++ return 0; ++ if (vendor == VENDOR_ID_APPLE) + return 1; + + rc = libinput_device_get_size(dev->libinput_device, &width, &height); +-- +2.4.1 + diff --git a/0010-touchpad-touches-after-the-last-key-press-can-be-rel.patch b/0010-touchpad-touches-after-the-last-key-press-can-be-rel.patch new file mode 100644 index 0000000..84a866d --- /dev/null +++ b/0010-touchpad-touches-after-the-last-key-press-can-be-rel.patch @@ -0,0 +1,122 @@ +From 1c02bc3dc932c1df2dada0cb814e7401a23c65e8 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 21 May 2015 16:32:42 +1000 +Subject: [PATCH libinput 10/10] touchpad: touches after the last key press can + be released + +The current code labels a touch as palm if it started within the typing +timeouts. To move the pointer even after the timeout expires, a user has to +lift the finger which is quite annoying and different to the old synaptics +driver behaviour (which had a simple on/off toggle on whether to let events +through or not). + +Be smarter about this: if a touch starts _after_ the last key press event, +release it for pointer motion once the timeout expires. Touches started before +the last key press remain labelled as palms. This makes it possible to rest +the palm on the touchpad while typing without getting interference but also +provides a more responsive UI when moving from typing to using the touchpad +normally. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +Tested-by: Benjamin Tissoires +--- + doc/palm-detection.dox | 1 - + src/evdev-mt-touchpad-edge-scroll.c | 3 +++ + src/evdev-mt-touchpad.c | 24 ++++++++++++++++++++---- + src/evdev-mt-touchpad.h | 2 ++ + 4 files changed, 25 insertions(+), 5 deletions(-) + +diff --git a/doc/palm-detection.dox b/doc/palm-detection.dox +index a5b578b..7c848e3 100644 +--- a/doc/palm-detection.dox ++++ b/doc/palm-detection.dox +@@ -57,5 +57,4 @@ the palm on the touchpad while using the trackstick). + If the touchpad is disabled, the @ref t440_support "top software buttons" + remain enabled. + +- + */ +diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c +index f7eae9e..8a4d892 100644 +--- a/src/evdev-mt-touchpad-edge-scroll.c ++++ b/src/evdev-mt-touchpad-edge-scroll.c +@@ -361,6 +361,9 @@ tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time) + if (!t->dirty) + continue; + ++ if (t->palm.state != PALM_NONE) ++ continue; ++ + switch (t->scroll.edge) { + case EDGE_NONE: + if (t->scroll.direction != -1) { +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 9a04893..94a3376 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -237,6 +237,7 @@ tp_end_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + t->state = TOUCH_END; + t->pinned.is_pinned = false; + t->millis = time; ++ t->palm.time = 0; + assert(tp->nfingers_down >= 1); + tp->nfingers_down--; + tp->queued |= TOUCHPAD_EVENT_MOTION; +@@ -484,14 +485,28 @@ tp_palm_tap_is_palm(struct tp_dispatch *tp, struct tp_touch *t) + static int + tp_palm_detect_dwt(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + { +- if (!tp->dwt.keyboard_active) +- return 0; +- +- if (t->state == TOUCH_BEGIN) { ++ if (tp->dwt.keyboard_active && ++ t->state == TOUCH_BEGIN) { + t->palm.state = PALM_TYPING; + t->palm.time = time; + t->palm.first = t->point; + return 1; ++ } else if (!tp->dwt.keyboard_active && ++ t->state == TOUCH_UPDATE && ++ t->palm.state == PALM_TYPING) ++ { ++ /* If a touch has started before the first or after the last ++ key press, release it on timeout. Benefit: a palm rested ++ while typing on the touchpad will be ignored, but a touch ++ started once we stop typing will be able to control the ++ pointer (alas not tap, etc.). ++ */ ++ if (t->palm.time == 0 || ++ t->palm.time > tp->dwt.keyboard_last_press_time) { ++ t->palm.state = PALM_NONE; ++ log_debug(tp_libinput_context(tp), ++ "palm: touch released, timeout after typing\n"); ++ } + } + + return 0; +@@ -958,6 +973,7 @@ tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) + timeout = DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_2; + } + ++ tp->dwt.keyboard_last_press_time = time; + libinput_timer_set(&tp->dwt.keyboard_timer, + time + timeout); + } +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index db877c7..d086192 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -284,6 +284,8 @@ struct tp_dispatch { + struct libinput_event_listener keyboard_listener; + struct libinput_timer keyboard_timer; + struct evdev_device *keyboard; ++ ++ uint64_t keyboard_last_press_time; + } dwt; + }; + +-- +2.4.1 + diff --git a/libinput.spec b/libinput.spec index a1c5751..9fb5efc 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.15.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -22,6 +22,17 @@ Patch01: 0001-touchpad-switch-from-is_palm-to-an-enum.patch Patch02: 0002-touchpad-add-timeout-based-disable-while-typing.patch Patch03: 0003-touchpad-use-a-two-stage-timeout-for-disable-while-t.patch +Patch04: 0001-touchpad-move-disable-while-typing-into-its-own-stru.patch +Patch05: 0002-touchpad-extend-the-key-blacklist-for-disable-while-.patch +Patch06: 0003-touchpad-add-helper-function-to-get-from-tp-to-the-l.patch +Patch07: 0004-touchpad-only-check-keyboards-for-disable-while-typi.patch +Patch08: 0005-touchpad-be-finer-grained-about-when-to-pair-touchpa.patch +Patch09: 0006-touchpad-split-disable-while-typing-handling-into-a-.patch +Patch10: 0007-touchpad-add-palm-state-debugging.patch +Patch11: 0008-touchpad-reset-the-touch-state-when-edge-scrolling-i.patch +Patch12: 0009-touchpad-don-t-enable-edge-palm-detection-on-Wacom-t.patch +Patch13: 0010-touchpad-touches-after-the-last-key-press-can-be-rel.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -97,6 +108,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed May 27 2015 Peter Hutterer 0.15.0-3 +- Refine disable-while-typing (#1209753) + * Mon May 18 2015 Peter Hutterer 0.15.0-2 - Add disable-while-typing feature (#1209753) From fd5a322727f362210ce46f84f58a7ff8e186725e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 29 May 2015 12:02:25 +1000 Subject: [PATCH 019/317] Add tap-to-end-drag patch (#1225998) --- ...d-end-tap-and-drag-with-an-extra-tap.patch | 1405 +++++++++++++++++ libinput.spec | 8 +- 2 files changed, 1412 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-end-tap-and-drag-with-an-extra-tap.patch diff --git a/0001-touchpad-end-tap-and-drag-with-an-extra-tap.patch b/0001-touchpad-end-tap-and-drag-with-an-extra-tap.patch new file mode 100644 index 0000000..a473cdd --- /dev/null +++ b/0001-touchpad-end-tap-and-drag-with-an-extra-tap.patch @@ -0,0 +1,1405 @@ +From 1ab385bc83504272cf4507d72ac0d6ab448aac9c Mon Sep 17 00:00:00 2001 +From: Velimir Lisec +Date: Thu, 30 Apr 2015 00:13:51 +0200 +Subject: [PATCH libinput] touchpad: end tap-and-drag with an extra tap + +Currently for the tap-and-drag gesture to end user has to wait for a +timeout to expire. Make it possible to end the drag gesture by just tapping. + +The allowed finger sequences to start and end a drag are thus: +tap, down, .... move ...., up +tap, down, .... move ...., up, tap + +https://bugs.freedesktop.org/show_bug.cgi?id=90255 + +Signed-off-by: Velimir Lisec +Reviewed-by: Peter Hutterer + +State diagram changes and a doc change squashed in. + +Signed-off-by: Peter Hutterer +--- + doc/tapping.dox | 4 + + doc/touchpad-tap-state-machine.svg | 479 ++++++++++++++++++++----------------- + src/evdev-mt-touchpad-tap.c | 40 +++- + src/evdev-mt-touchpad.h | 1 + + 4 files changed, 304 insertions(+), 220 deletions(-) + +diff --git a/doc/tapping.dox b/doc/tapping.dox +index f603b7d..7eb81e6 100644 +--- a/doc/tapping.dox ++++ b/doc/tapping.dox +@@ -33,6 +33,10 @@ continue the dragging process, so that multiple touchpad-widths of distance + can be covered easily. If two-fingers are supported by the hardware, a + second finger can be used to drag while the first is held in-place. + ++An alternative method to end a drag process is to tap immediately after ++lifting the finger. The full sequence is thus: tap, finger down, drag, ++finger up, tap. ++ + @section tap_constraints Constraints while tapping + + A couple of constraints apply to the contact to be converted into a press, the most common ones are: +diff --git a/doc/touchpad-tap-state-machine.svg b/doc/touchpad-tap-state-machine.svg +index b168b4f..39b0b86 100644 +--- a/doc/touchpad-tap-state-machine.svg ++++ b/doc/touchpad-tap-state-machine.svg +@@ -14,93 +14,93 @@ + + + +- IDLE ++ IDLE + + + + +- TOUCH ++ TOUCH + + + + +- first ++ first + +- finger down ++ finger down + + + + + + +- finger up ++ finger up + + + + + + +- button 1 ++ button 1 + +- press ++ press + + + + +- timeout ++ timeout + + + + + + +- move > ++ move > + +- threshold ++ threshold + + + + + + +- second ++ second + +- finger down ++ finger down + + + + + + +- TOUCH_2 ++ TOUCH_2 + + + + +- second ++ second + +- finger up ++ finger up + + + + + + +- button 2 ++ button 2 + +- press ++ press + + + + +- move > ++ move > + +- threshold ++ threshold + + + + +- timeout ++ timeout + + + +@@ -109,16 +109,16 @@ + + + +- button 1 ++ button 1 + +- release ++ release + + + + +- button 2 ++ button 2 + +- release ++ release + + + +@@ -127,42 +127,42 @@ + + + +- TAPPED ++ TAPPED + + + + +- timeout ++ timeout + + + + + + +- first ++ first + +- finger down ++ finger down + + + + + + +- DRAGGING ++ DRAGGING + + + + +- first ++ first + +- finger up ++ finger up + + + + +- btn1 ++ btn1 + +- release ++ release + + + +@@ -173,81 +173,81 @@ + + + +- IDLE ++ IDLE + + + + +- third ++ third + +- finger down ++ finger down + + + + + + +- TOUCH_3 ++ TOUCH_3 + + + + + + +- button 3 ++ button 3 + +- press ++ press + + + + +- button 3 ++ button 3 + +- release ++ release + + + + + + +- move > ++ move > + +- threshold ++ threshold + + + + + + +- IDLE ++ IDLE + + + + +- timeout ++ timeout + + + + + + +- first ++ first + +- finger up ++ finger up + + + + + + +- IDLE ++ IDLE + + + + +- fourth ++ fourth + +- finger down ++ finger down + + + +@@ -256,64 +256,64 @@ + + + +- DRAGGING_OR_DOUBLETAP ++ DRAGGING_OR_DOUBLETAP + + + + + + +- timeout ++ timeout + + + + + + +- first ++ first + +- finger up ++ finger up + + + + + + +- button 1 ++ button 1 + +- release ++ release + + + + +- button 1 ++ button 1 + +- press ++ press + + + + +- btn1 ++ btn1 + +- release ++ release + + + + + + +- second ++ second + +- finger down ++ finger down + + + + + + +- move > ++ move > + +- threshold ++ threshold + + + +@@ -322,14 +322,14 @@ + + + +- HOLD ++ HOLD + + + + +- first ++ first + +- finger up ++ finger up + + + +@@ -338,9 +338,9 @@ + + + +- second ++ second + +- finger down ++ finger down + + + +@@ -351,23 +351,23 @@ + + + +- TOUCH_2_HOLD ++ TOUCH_2_HOLD + + + + +- second ++ second + +- finger up ++ finger up + + + + + + +- first ++ first + +- finger up ++ finger up + + + +@@ -378,9 +378,9 @@ + + + +- third ++ third + +- finger down ++ finger down + + + +@@ -391,21 +391,21 @@ + + + +- TOUCH_3_HOLD ++ TOUCH_3_HOLD + + + + + + +- fourth ++ fourth + +- finger down ++ finger down + + + + +- DEAD ++ DEAD + + + +@@ -416,19 +416,19 @@ + + + +- any finger up ++ any finger up + + + + +- fourth ++ fourth + +- finger up ++ finger up + + + + +- any finger up ++ any finger up + + + +@@ -437,12 +437,12 @@ + + + +- yes ++ yes + + + + +- any finger up ++ any finger up + + + +@@ -455,14 +455,14 @@ + + + +- IDLE ++ IDLE + + + + +- if finger ++ if finger + +- count == 0 ++ count == 0 + + + +@@ -473,14 +473,14 @@ + + + +- second ++ second + +- finger up ++ finger up + + + + +- DRAGGING_2 ++ DRAGGING_2 + + + +@@ -489,9 +489,9 @@ + + + +- first ++ first + +- finger up ++ finger up + + + +@@ -502,9 +502,9 @@ + + + +- second ++ second + +- finger down ++ finger down + + + +@@ -515,29 +515,29 @@ + + + +- third ++ third + +- finger down ++ finger down + + + + + + +- btn1 ++ btn1 + +- release ++ release + + + + + + +- phys ++ phys + +- button ++ button + +- press ++ press + + + +@@ -554,23 +554,23 @@ + + + +- phys ++ phys + +- button ++ button + +- press ++ press + + + +- ++ + +- +- button 1 +- +- release ++ ++ button 1 ++ ++ release + +- +- ++ ++ + + + +@@ -582,12 +582,12 @@ + + + +- DRAGGING_WAIT ++ DRAGGING_WAIT + + + + +- timeout ++ timeout + + + +@@ -598,21 +598,21 @@ + + + +- first ++ first + +- finger down ++ finger down + + + + + + +- TOUCH_TOUCH ++ TOUCH_TOUCH + + + + +- TOUCH_IDLE ++ TOUCH_IDLE + + + +@@ -625,7 +625,7 @@ + + + +- TOUCH_DEAD ++ TOUCH_DEAD + + + +@@ -640,12 +640,12 @@ + + + +- yes ++ yes + + + + +- TOUCH_DEAD ++ TOUCH_DEAD + + + +@@ -656,14 +656,14 @@ + + + +- TOUCH_IDLE ++ TOUCH_IDLE + + + + + + +- TOUCH_TOUCH ++ TOUCH_TOUCH + + + +@@ -672,44 +672,44 @@ + + + +- TOUCH_IDLE ++ TOUCH_IDLE + + + + + + +- TOUCH_IDLE ++ TOUCH_IDLE + + + + + + +- TOUCH_IDLE ++ TOUCH_IDLE + + + + + + +- TOUCH_TOUCH ++ TOUCH_TOUCH + + + + + + +- that finger ++ that finger + +- TOUCH_IDLE ++ TOUCH_IDLE + + + + + + +- TOUCH_DEAD ++ TOUCH_DEAD + + + +@@ -720,9 +720,9 @@ + + + +- that finger ++ that finger + +- TOUCH_IDLE ++ TOUCH_IDLE + + + +@@ -731,31 +731,31 @@ + + + +- no ++ no + + + + +- TOUCH_TOUCH ++ TOUCH_TOUCH + + + + + + +- TOUCH_IDLE ++ TOUCH_IDLE + + + + +- TOUCH_TOUCH ++ TOUCH_TOUCH + + + + + + +- TOUCH_DEAD ++ TOUCH_DEAD + + + +@@ -764,175 +764,171 @@ + + + +- TOUCH_IDLE ++ TOUCH_IDLE + + + +- ++ + +- +- TOUCH_TOUCH ++ ++ TOUCH_TOUCH + +- +- +- +- + + + +- TOUCH_TOUCH ++ TOUCH_TOUCH + + + + + + +- TOUCH_IDLE ++ TOUCH_IDLE + + + + + + +- TOUCH_IDLE ++ TOUCH_IDLE + + + + + + +- TOUCH_TOUCH ++ TOUCH_TOUCH + + + + + + +- TOUCH_IDLE ++ TOUCH_IDLE + + + + + + +- TOUCH_TOUCH ++ TOUCH_TOUCH + + + + + + +- that finger ++ that finger + +- TOUCH_IDLE ++ TOUCH_IDLE + + + + + + +- TOUCH_DEAD ++ TOUCH_DEAD + + + + + + +- TOUCH_DEAD ++ TOUCH_DEAD + + + + +- TOUCH_DEAD ++ TOUCH_DEAD + + + + +- TOUCH_DEAD ++ TOUCH_DEAD + +- +- ++ ++ + + + +- TOUCH_DEAD ++ TOUCH_DEAD + + + + + + +- TOUCH_DEAD ++ TOUCH_DEAD + + + + + + +- state == ++ state == + +- TOUCH_TOUCH ++ TOUCH_TOUCH + + + + +- that finger state == ++ that finger state == + +- TOUCH_TOUCH ++ TOUCH_TOUCH + + + + + + +- no ++ no + + + + +- TOUCH_DEAD ++ TOUCH_DEAD + + + + + + +- TOUCH_DEAD ++ TOUCH_DEAD + + + + +- TOUCH_DEAD ++ TOUCH_DEAD + + + + +- first ++ first + +- finger down ++ finger down + +- ++ + +- +- MULTITAP ++ ++ MULTITAP + +- +- +- +- ++ ++ ++ ++ + + + +- timeout ++ timeout + + + +- +- ++ ++ + + + +- IDLE ++ IDLE + + + +@@ -943,14 +939,14 @@ + + + +- MULTITAP_DOWN ++ MULTITAP_DOWN + + + + +- button 1 ++ button 1 + +- press ++ press + + + +@@ -959,39 +955,39 @@ + + + +- first ++ first + +- finger up ++ finger up + + + + + + +- button 1 ++ button 1 + +- release ++ release + + + + + + +- timeout ++ timeout + + + + +- second ++ second + +- finger down ++ finger down + + + + +- move > ++ move > + +- threshold ++ threshold + + + +@@ -1002,16 +998,16 @@ + + + +- button 1 ++ button 1 + +- release ++ release + + + + +- button 1 ++ button 1 + +- press ++ press + + + +@@ -1022,16 +1018,16 @@ + + + +- button 1 ++ button 1 + +- release ++ release + + + + +- button 1 ++ button 1 + +- press ++ press + + + +@@ -1042,16 +1038,16 @@ + + + +- button 1 ++ button 1 + +- release ++ release + + + + +- button 1 ++ button 1 + +- press ++ press + + + +@@ -1059,36 +1055,87 @@ + + + +- +- ++ ++ + + + +- TOUCH_TOUCH ++ TOUCH_TOUCH + + + + + + +- TOUCH_IDLE ++ TOUCH_IDLE + + + + + + +- phys ++ phys + +- button ++ button + +- press ++ press + +- +- ++ ++ + + + + ++ ++ ++ ++ DRAGGING_OR_TAP ++ ++ ++ ++ ++ first ++ ++ finger up ++ ++ ++ ++ ++ ++ ++ timeout ++ ++ ++ ++ ++ ++ ++ ++ ++ move > ++ ++ threshold ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ TOUCH_IDLE ++ ++ ++ ++ ++ ++ ++ + + +diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c +index 61f94e5..fb8c9e4 100644 +--- a/src/evdev-mt-touchpad-tap.c ++++ b/src/evdev-mt-touchpad-tap.c +@@ -74,6 +74,7 @@ tap_state_to_str(enum tp_tap_state state) + CASE_RETURN_STRING(TAP_STATE_DRAGGING); + CASE_RETURN_STRING(TAP_STATE_DRAGGING_WAIT); + CASE_RETURN_STRING(TAP_STATE_DRAGGING_OR_DOUBLETAP); ++ CASE_RETURN_STRING(TAP_STATE_DRAGGING_OR_TAP); + CASE_RETURN_STRING(TAP_STATE_DRAGGING_2); + CASE_RETURN_STRING(TAP_STATE_MULTITAP); + CASE_RETURN_STRING(TAP_STATE_MULTITAP_DOWN); +@@ -409,16 +410,42 @@ tp_tap_dragging_wait_handle_event(struct tp_dispatch *tp, + + switch (event) { + case TAP_EVENT_TOUCH: +- tp->tap.state = TAP_STATE_DRAGGING; ++ tp->tap.state = TAP_STATE_DRAGGING_OR_TAP; ++ tp_tap_set_timer(tp, time); ++ break; ++ case TAP_EVENT_RELEASE: ++ case TAP_EVENT_MOTION: ++ break; ++ case TAP_EVENT_TIMEOUT: ++ tp->tap.state = TAP_STATE_IDLE; ++ tp_tap_notify(tp, time, 1, LIBINPUT_BUTTON_STATE_RELEASED); ++ break; ++ case TAP_EVENT_BUTTON: ++ tp->tap.state = TAP_STATE_DEAD; ++ tp_tap_notify(tp, time, 1, LIBINPUT_BUTTON_STATE_RELEASED); ++ break; ++ } ++} ++ ++static void ++tp_tap_dragging_tap_handle_event(struct tp_dispatch *tp, ++ struct tp_touch *t, ++ enum tap_event event, uint64_t time) ++{ ++ ++ switch (event) { ++ case TAP_EVENT_TOUCH: ++ tp->tap.state = TAP_STATE_DRAGGING_2; + tp_tap_clear_timer(tp); + break; + case TAP_EVENT_RELEASE: +- case TAP_EVENT_MOTION: +- break; +- case TAP_EVENT_TIMEOUT: + tp->tap.state = TAP_STATE_IDLE; + tp_tap_notify(tp, time, 1, LIBINPUT_BUTTON_STATE_RELEASED); + break; ++ case TAP_EVENT_MOTION: ++ case TAP_EVENT_TIMEOUT: ++ tp->tap.state = TAP_STATE_DRAGGING; ++ break; + case TAP_EVENT_BUTTON: + tp->tap.state = TAP_STATE_DEAD; + tp_tap_notify(tp, time, 1, LIBINPUT_BUTTON_STATE_RELEASED); +@@ -588,6 +615,9 @@ tp_tap_handle_event(struct tp_dispatch *tp, + case TAP_STATE_DRAGGING_WAIT: + tp_tap_dragging_wait_handle_event(tp, t, event, time); + break; ++ case TAP_STATE_DRAGGING_OR_TAP: ++ tp_tap_dragging_tap_handle_event(tp, t, event, time); ++ break; + case TAP_STATE_DRAGGING_2: + tp_tap_dragging2_handle_event(tp, t, event, time); + break; +@@ -692,6 +722,7 @@ tp_tap_handle_state(struct tp_dispatch *tp, uint64_t time) + case TAP_STATE_TOUCH: + case TAP_STATE_TAPPED: + case TAP_STATE_DRAGGING_OR_DOUBLETAP: ++ case TAP_STATE_DRAGGING_OR_TAP: + case TAP_STATE_TOUCH_2: + case TAP_STATE_TOUCH_3: + case TAP_STATE_MULTITAP_DOWN: +@@ -870,6 +901,7 @@ tp_tap_dragging(struct tp_dispatch *tp) + case TAP_STATE_DRAGGING: + case TAP_STATE_DRAGGING_2: + case TAP_STATE_DRAGGING_WAIT: ++ case TAP_STATE_DRAGGING_OR_TAP: + return true; + default: + return false; +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index 3711375..f602359 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -94,6 +94,7 @@ enum tp_tap_state { + TAP_STATE_TOUCH_3, + TAP_STATE_TOUCH_3_HOLD, + TAP_STATE_DRAGGING_OR_DOUBLETAP, ++ TAP_STATE_DRAGGING_OR_TAP, + TAP_STATE_DRAGGING, + TAP_STATE_DRAGGING_WAIT, + TAP_STATE_DRAGGING_2, +-- +2.4.1 + diff --git a/libinput.spec b/libinput.spec index 9fb5efc..5651e2a 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.15.0 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -33,6 +33,9 @@ Patch11: 0008-touchpad-reset-the-touch-state-when-edge-scrolling-i.patch Patch12: 0009-touchpad-don-t-enable-edge-palm-detection-on-Wacom-t.patch Patch13: 0010-touchpad-touches-after-the-last-key-press-can-be-rel.patch +# Bug 1225998 - Tap-and-drag touchpad behavior not configurable +Patch14: 0001-touchpad-end-tap-and-drag-with-an-extra-tap.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -108,6 +111,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri May 29 2015 Peter Hutterer 0.15.0-4 +- Add tap-to-end-drag patch (#1225998) + * Wed May 27 2015 Peter Hutterer 0.15.0-3 - Refine disable-while-typing (#1209753) From 1a6d239ed3ffa415ba5b31b938f5d688c5250582 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 2 Jun 2015 08:45:28 +1000 Subject: [PATCH 020/317] libinput 0.16.0 --- .gitignore | 1 + ...d-end-tap-and-drag-with-an-extra-tap.patch | 1405 ----------------- ...sable-while-typing-into-its-own-stru.patch | 148 -- ...chpad-switch-from-is_palm-to-an-enum.patch | 91 -- ...d-timeout-based-disable-while-typing.patch | 209 --- ...the-key-blacklist-for-disable-while-.patch | 84 - ...per-function-to-get-from-tp-to-the-l.patch | 220 --- ...wo-stage-timeout-for-disable-while-t.patch | 71 - ...eck-keyboards-for-disable-while-typi.patch | 104 -- ...r-grained-about-when-to-pair-touchpa.patch | 154 -- ...isable-while-typing-handling-into-a-.patch | 59 - 0007-touchpad-add-palm-state-debugging.patch | 85 - ...he-touch-state-when-edge-scrolling-i.patch | 31 - ...nable-edge-palm-detection-on-Wacom-t.patch | 64 - ...-after-the-last-key-press-can-be-rel.patch | 122 -- libinput.spec | 25 +- sources | 2 +- 17 files changed, 7 insertions(+), 2868 deletions(-) delete mode 100644 0001-touchpad-end-tap-and-drag-with-an-extra-tap.patch delete mode 100644 0001-touchpad-move-disable-while-typing-into-its-own-stru.patch delete mode 100644 0001-touchpad-switch-from-is_palm-to-an-enum.patch delete mode 100644 0002-touchpad-add-timeout-based-disable-while-typing.patch delete mode 100644 0002-touchpad-extend-the-key-blacklist-for-disable-while-.patch delete mode 100644 0003-touchpad-add-helper-function-to-get-from-tp-to-the-l.patch delete mode 100644 0003-touchpad-use-a-two-stage-timeout-for-disable-while-t.patch delete mode 100644 0004-touchpad-only-check-keyboards-for-disable-while-typi.patch delete mode 100644 0005-touchpad-be-finer-grained-about-when-to-pair-touchpa.patch delete mode 100644 0006-touchpad-split-disable-while-typing-handling-into-a-.patch delete mode 100644 0007-touchpad-add-palm-state-debugging.patch delete mode 100644 0008-touchpad-reset-the-touch-state-when-edge-scrolling-i.patch delete mode 100644 0009-touchpad-don-t-enable-edge-palm-detection-on-Wacom-t.patch delete mode 100644 0010-touchpad-touches-after-the-last-key-press-can-be-rel.patch diff --git a/.gitignore b/.gitignore index c19cac5..e7994c6 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /libinput-0.13.0.tar.xz /libinput-0.14.1.tar.xz /libinput-0.15.0.tar.xz +/libinput-0.16.0.tar.xz diff --git a/0001-touchpad-end-tap-and-drag-with-an-extra-tap.patch b/0001-touchpad-end-tap-and-drag-with-an-extra-tap.patch deleted file mode 100644 index a473cdd..0000000 --- a/0001-touchpad-end-tap-and-drag-with-an-extra-tap.patch +++ /dev/null @@ -1,1405 +0,0 @@ -From 1ab385bc83504272cf4507d72ac0d6ab448aac9c Mon Sep 17 00:00:00 2001 -From: Velimir Lisec -Date: Thu, 30 Apr 2015 00:13:51 +0200 -Subject: [PATCH libinput] touchpad: end tap-and-drag with an extra tap - -Currently for the tap-and-drag gesture to end user has to wait for a -timeout to expire. Make it possible to end the drag gesture by just tapping. - -The allowed finger sequences to start and end a drag are thus: -tap, down, .... move ...., up -tap, down, .... move ...., up, tap - -https://bugs.freedesktop.org/show_bug.cgi?id=90255 - -Signed-off-by: Velimir Lisec -Reviewed-by: Peter Hutterer - -State diagram changes and a doc change squashed in. - -Signed-off-by: Peter Hutterer ---- - doc/tapping.dox | 4 + - doc/touchpad-tap-state-machine.svg | 479 ++++++++++++++++++++----------------- - src/evdev-mt-touchpad-tap.c | 40 +++- - src/evdev-mt-touchpad.h | 1 + - 4 files changed, 304 insertions(+), 220 deletions(-) - -diff --git a/doc/tapping.dox b/doc/tapping.dox -index f603b7d..7eb81e6 100644 ---- a/doc/tapping.dox -+++ b/doc/tapping.dox -@@ -33,6 +33,10 @@ continue the dragging process, so that multiple touchpad-widths of distance - can be covered easily. If two-fingers are supported by the hardware, a - second finger can be used to drag while the first is held in-place. - -+An alternative method to end a drag process is to tap immediately after -+lifting the finger. The full sequence is thus: tap, finger down, drag, -+finger up, tap. -+ - @section tap_constraints Constraints while tapping - - A couple of constraints apply to the contact to be converted into a press, the most common ones are: -diff --git a/doc/touchpad-tap-state-machine.svg b/doc/touchpad-tap-state-machine.svg -index b168b4f..39b0b86 100644 ---- a/doc/touchpad-tap-state-machine.svg -+++ b/doc/touchpad-tap-state-machine.svg -@@ -14,93 +14,93 @@ - - - -- IDLE -+ IDLE - - - - -- TOUCH -+ TOUCH - - - - -- first -+ first - -- finger down -+ finger down - - - - - - -- finger up -+ finger up - - - - - - -- button 1 -+ button 1 - -- press -+ press - - - - -- timeout -+ timeout - - - - - - -- move > -+ move > - -- threshold -+ threshold - - - - - - -- second -+ second - -- finger down -+ finger down - - - - - - -- TOUCH_2 -+ TOUCH_2 - - - - -- second -+ second - -- finger up -+ finger up - - - - - - -- button 2 -+ button 2 - -- press -+ press - - - - -- move > -+ move > - -- threshold -+ threshold - - - - -- timeout -+ timeout - - - -@@ -109,16 +109,16 @@ - - - -- button 1 -+ button 1 - -- release -+ release - - - - -- button 2 -+ button 2 - -- release -+ release - - - -@@ -127,42 +127,42 @@ - - - -- TAPPED -+ TAPPED - - - - -- timeout -+ timeout - - - - - - -- first -+ first - -- finger down -+ finger down - - - - - - -- DRAGGING -+ DRAGGING - - - - -- first -+ first - -- finger up -+ finger up - - - - -- btn1 -+ btn1 - -- release -+ release - - - -@@ -173,81 +173,81 @@ - - - -- IDLE -+ IDLE - - - - -- third -+ third - -- finger down -+ finger down - - - - - - -- TOUCH_3 -+ TOUCH_3 - - - - - - -- button 3 -+ button 3 - -- press -+ press - - - - -- button 3 -+ button 3 - -- release -+ release - - - - - - -- move > -+ move > - -- threshold -+ threshold - - - - - - -- IDLE -+ IDLE - - - - -- timeout -+ timeout - - - - - - -- first -+ first - -- finger up -+ finger up - - - - - - -- IDLE -+ IDLE - - - - -- fourth -+ fourth - -- finger down -+ finger down - - - -@@ -256,64 +256,64 @@ - - - -- DRAGGING_OR_DOUBLETAP -+ DRAGGING_OR_DOUBLETAP - - - - - - -- timeout -+ timeout - - - - - - -- first -+ first - -- finger up -+ finger up - - - - - - -- button 1 -+ button 1 - -- release -+ release - - - - -- button 1 -+ button 1 - -- press -+ press - - - - -- btn1 -+ btn1 - -- release -+ release - - - - - - -- second -+ second - -- finger down -+ finger down - - - - - - -- move > -+ move > - -- threshold -+ threshold - - - -@@ -322,14 +322,14 @@ - - - -- HOLD -+ HOLD - - - - -- first -+ first - -- finger up -+ finger up - - - -@@ -338,9 +338,9 @@ - - - -- second -+ second - -- finger down -+ finger down - - - -@@ -351,23 +351,23 @@ - - - -- TOUCH_2_HOLD -+ TOUCH_2_HOLD - - - - -- second -+ second - -- finger up -+ finger up - - - - - - -- first -+ first - -- finger up -+ finger up - - - -@@ -378,9 +378,9 @@ - - - -- third -+ third - -- finger down -+ finger down - - - -@@ -391,21 +391,21 @@ - - - -- TOUCH_3_HOLD -+ TOUCH_3_HOLD - - - - - - -- fourth -+ fourth - -- finger down -+ finger down - - - - -- DEAD -+ DEAD - - - -@@ -416,19 +416,19 @@ - - - -- any finger up -+ any finger up - - - - -- fourth -+ fourth - -- finger up -+ finger up - - - - -- any finger up -+ any finger up - - - -@@ -437,12 +437,12 @@ - - - -- yes -+ yes - - - - -- any finger up -+ any finger up - - - -@@ -455,14 +455,14 @@ - - - -- IDLE -+ IDLE - - - - -- if finger -+ if finger - -- count == 0 -+ count == 0 - - - -@@ -473,14 +473,14 @@ - - - -- second -+ second - -- finger up -+ finger up - - - - -- DRAGGING_2 -+ DRAGGING_2 - - - -@@ -489,9 +489,9 @@ - - - -- first -+ first - -- finger up -+ finger up - - - -@@ -502,9 +502,9 @@ - - - -- second -+ second - -- finger down -+ finger down - - - -@@ -515,29 +515,29 @@ - - - -- third -+ third - -- finger down -+ finger down - - - - - - -- btn1 -+ btn1 - -- release -+ release - - - - - - -- phys -+ phys - -- button -+ button - -- press -+ press - - - -@@ -554,23 +554,23 @@ - - - -- phys -+ phys - -- button -+ button - -- press -+ press - - - -- -+ - -- -- button 1 -- -- release -+ -+ button 1 -+ -+ release - -- -- -+ -+ - - - -@@ -582,12 +582,12 @@ - - - -- DRAGGING_WAIT -+ DRAGGING_WAIT - - - - -- timeout -+ timeout - - - -@@ -598,21 +598,21 @@ - - - -- first -+ first - -- finger down -+ finger down - - - - - - -- TOUCH_TOUCH -+ TOUCH_TOUCH - - - - -- TOUCH_IDLE -+ TOUCH_IDLE - - - -@@ -625,7 +625,7 @@ - - - -- TOUCH_DEAD -+ TOUCH_DEAD - - - -@@ -640,12 +640,12 @@ - - - -- yes -+ yes - - - - -- TOUCH_DEAD -+ TOUCH_DEAD - - - -@@ -656,14 +656,14 @@ - - - -- TOUCH_IDLE -+ TOUCH_IDLE - - - - - - -- TOUCH_TOUCH -+ TOUCH_TOUCH - - - -@@ -672,44 +672,44 @@ - - - -- TOUCH_IDLE -+ TOUCH_IDLE - - - - - - -- TOUCH_IDLE -+ TOUCH_IDLE - - - - - - -- TOUCH_IDLE -+ TOUCH_IDLE - - - - - - -- TOUCH_TOUCH -+ TOUCH_TOUCH - - - - - - -- that finger -+ that finger - -- TOUCH_IDLE -+ TOUCH_IDLE - - - - - - -- TOUCH_DEAD -+ TOUCH_DEAD - - - -@@ -720,9 +720,9 @@ - - - -- that finger -+ that finger - -- TOUCH_IDLE -+ TOUCH_IDLE - - - -@@ -731,31 +731,31 @@ - - - -- no -+ no - - - - -- TOUCH_TOUCH -+ TOUCH_TOUCH - - - - - - -- TOUCH_IDLE -+ TOUCH_IDLE - - - - -- TOUCH_TOUCH -+ TOUCH_TOUCH - - - - - - -- TOUCH_DEAD -+ TOUCH_DEAD - - - -@@ -764,175 +764,171 @@ - - - -- TOUCH_IDLE -+ TOUCH_IDLE - - - -- -+ - -- -- TOUCH_TOUCH -+ -+ TOUCH_TOUCH - -- -- -- -- - - - -- TOUCH_TOUCH -+ TOUCH_TOUCH - - - - - - -- TOUCH_IDLE -+ TOUCH_IDLE - - - - - - -- TOUCH_IDLE -+ TOUCH_IDLE - - - - - - -- TOUCH_TOUCH -+ TOUCH_TOUCH - - - - - - -- TOUCH_IDLE -+ TOUCH_IDLE - - - - - - -- TOUCH_TOUCH -+ TOUCH_TOUCH - - - - - - -- that finger -+ that finger - -- TOUCH_IDLE -+ TOUCH_IDLE - - - - - - -- TOUCH_DEAD -+ TOUCH_DEAD - - - - - - -- TOUCH_DEAD -+ TOUCH_DEAD - - - - -- TOUCH_DEAD -+ TOUCH_DEAD - - - - -- TOUCH_DEAD -+ TOUCH_DEAD - -- -- -+ -+ - - - -- TOUCH_DEAD -+ TOUCH_DEAD - - - - - - -- TOUCH_DEAD -+ TOUCH_DEAD - - - - - - -- state == -+ state == - -- TOUCH_TOUCH -+ TOUCH_TOUCH - - - - -- that finger state == -+ that finger state == - -- TOUCH_TOUCH -+ TOUCH_TOUCH - - - - - - -- no -+ no - - - - -- TOUCH_DEAD -+ TOUCH_DEAD - - - - - - -- TOUCH_DEAD -+ TOUCH_DEAD - - - - -- TOUCH_DEAD -+ TOUCH_DEAD - - - - -- first -+ first - -- finger down -+ finger down - -- -+ - -- -- MULTITAP -+ -+ MULTITAP - -- -- -- -- -+ -+ -+ -+ - - - -- timeout -+ timeout - - - -- -- -+ -+ - - - -- IDLE -+ IDLE - - - -@@ -943,14 +939,14 @@ - - - -- MULTITAP_DOWN -+ MULTITAP_DOWN - - - - -- button 1 -+ button 1 - -- press -+ press - - - -@@ -959,39 +955,39 @@ - - - -- first -+ first - -- finger up -+ finger up - - - - - - -- button 1 -+ button 1 - -- release -+ release - - - - - - -- timeout -+ timeout - - - - -- second -+ second - -- finger down -+ finger down - - - - -- move > -+ move > - -- threshold -+ threshold - - - -@@ -1002,16 +998,16 @@ - - - -- button 1 -+ button 1 - -- release -+ release - - - - -- button 1 -+ button 1 - -- press -+ press - - - -@@ -1022,16 +1018,16 @@ - - - -- button 1 -+ button 1 - -- release -+ release - - - - -- button 1 -+ button 1 - -- press -+ press - - - -@@ -1042,16 +1038,16 @@ - - - -- button 1 -+ button 1 - -- release -+ release - - - - -- button 1 -+ button 1 - -- press -+ press - - - -@@ -1059,36 +1055,87 @@ - - - -- -- -+ -+ - - - -- TOUCH_TOUCH -+ TOUCH_TOUCH - - - - - - -- TOUCH_IDLE -+ TOUCH_IDLE - - - - - - -- phys -+ phys - -- button -+ button - -- press -+ press - -- -- -+ -+ - - - - -+ -+ -+ -+ DRAGGING_OR_TAP -+ -+ -+ -+ -+ first -+ -+ finger up -+ -+ -+ -+ -+ -+ -+ timeout -+ -+ -+ -+ -+ -+ -+ -+ -+ move > -+ -+ threshold -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ TOUCH_IDLE -+ -+ -+ -+ -+ -+ -+ - - -diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c -index 61f94e5..fb8c9e4 100644 ---- a/src/evdev-mt-touchpad-tap.c -+++ b/src/evdev-mt-touchpad-tap.c -@@ -74,6 +74,7 @@ tap_state_to_str(enum tp_tap_state state) - CASE_RETURN_STRING(TAP_STATE_DRAGGING); - CASE_RETURN_STRING(TAP_STATE_DRAGGING_WAIT); - CASE_RETURN_STRING(TAP_STATE_DRAGGING_OR_DOUBLETAP); -+ CASE_RETURN_STRING(TAP_STATE_DRAGGING_OR_TAP); - CASE_RETURN_STRING(TAP_STATE_DRAGGING_2); - CASE_RETURN_STRING(TAP_STATE_MULTITAP); - CASE_RETURN_STRING(TAP_STATE_MULTITAP_DOWN); -@@ -409,16 +410,42 @@ tp_tap_dragging_wait_handle_event(struct tp_dispatch *tp, - - switch (event) { - case TAP_EVENT_TOUCH: -- tp->tap.state = TAP_STATE_DRAGGING; -+ tp->tap.state = TAP_STATE_DRAGGING_OR_TAP; -+ tp_tap_set_timer(tp, time); -+ break; -+ case TAP_EVENT_RELEASE: -+ case TAP_EVENT_MOTION: -+ break; -+ case TAP_EVENT_TIMEOUT: -+ tp->tap.state = TAP_STATE_IDLE; -+ tp_tap_notify(tp, time, 1, LIBINPUT_BUTTON_STATE_RELEASED); -+ break; -+ case TAP_EVENT_BUTTON: -+ tp->tap.state = TAP_STATE_DEAD; -+ tp_tap_notify(tp, time, 1, LIBINPUT_BUTTON_STATE_RELEASED); -+ break; -+ } -+} -+ -+static void -+tp_tap_dragging_tap_handle_event(struct tp_dispatch *tp, -+ struct tp_touch *t, -+ enum tap_event event, uint64_t time) -+{ -+ -+ switch (event) { -+ case TAP_EVENT_TOUCH: -+ tp->tap.state = TAP_STATE_DRAGGING_2; - tp_tap_clear_timer(tp); - break; - case TAP_EVENT_RELEASE: -- case TAP_EVENT_MOTION: -- break; -- case TAP_EVENT_TIMEOUT: - tp->tap.state = TAP_STATE_IDLE; - tp_tap_notify(tp, time, 1, LIBINPUT_BUTTON_STATE_RELEASED); - break; -+ case TAP_EVENT_MOTION: -+ case TAP_EVENT_TIMEOUT: -+ tp->tap.state = TAP_STATE_DRAGGING; -+ break; - case TAP_EVENT_BUTTON: - tp->tap.state = TAP_STATE_DEAD; - tp_tap_notify(tp, time, 1, LIBINPUT_BUTTON_STATE_RELEASED); -@@ -588,6 +615,9 @@ tp_tap_handle_event(struct tp_dispatch *tp, - case TAP_STATE_DRAGGING_WAIT: - tp_tap_dragging_wait_handle_event(tp, t, event, time); - break; -+ case TAP_STATE_DRAGGING_OR_TAP: -+ tp_tap_dragging_tap_handle_event(tp, t, event, time); -+ break; - case TAP_STATE_DRAGGING_2: - tp_tap_dragging2_handle_event(tp, t, event, time); - break; -@@ -692,6 +722,7 @@ tp_tap_handle_state(struct tp_dispatch *tp, uint64_t time) - case TAP_STATE_TOUCH: - case TAP_STATE_TAPPED: - case TAP_STATE_DRAGGING_OR_DOUBLETAP: -+ case TAP_STATE_DRAGGING_OR_TAP: - case TAP_STATE_TOUCH_2: - case TAP_STATE_TOUCH_3: - case TAP_STATE_MULTITAP_DOWN: -@@ -870,6 +901,7 @@ tp_tap_dragging(struct tp_dispatch *tp) - case TAP_STATE_DRAGGING: - case TAP_STATE_DRAGGING_2: - case TAP_STATE_DRAGGING_WAIT: -+ case TAP_STATE_DRAGGING_OR_TAP: - return true; - default: - return false; -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index 3711375..f602359 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -94,6 +94,7 @@ enum tp_tap_state { - TAP_STATE_TOUCH_3, - TAP_STATE_TOUCH_3_HOLD, - TAP_STATE_DRAGGING_OR_DOUBLETAP, -+ TAP_STATE_DRAGGING_OR_TAP, - TAP_STATE_DRAGGING, - TAP_STATE_DRAGGING_WAIT, - TAP_STATE_DRAGGING_2, --- -2.4.1 - diff --git a/0001-touchpad-move-disable-while-typing-into-its-own-stru.patch b/0001-touchpad-move-disable-while-typing-into-its-own-stru.patch deleted file mode 100644 index b2ce138..0000000 --- a/0001-touchpad-move-disable-while-typing-into-its-own-stru.patch +++ /dev/null @@ -1,148 +0,0 @@ -From 09c597a3a782d1eb82f5e911f91114eb7ef44002 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 25 May 2015 10:07:51 +1000 -Subject: [PATCH libinput 01/10] touchpad: move disable-while-typing into its - own struct - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -Tested-by: Benjamin Tissoires ---- - src/evdev-mt-touchpad.c | 34 +++++++++++++++++----------------- - src/evdev-mt-touchpad.h | 4 +++- - 2 files changed, 20 insertions(+), 18 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 821e645..89d24f3 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -486,7 +486,7 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - struct device_float_coords delta; - int dirs; - -- if (tp->sendevents.keyboard_active && -+ if (tp->dwt.keyboard_active && - t->state == TOUCH_BEGIN) { - t->palm.state = PALM_TYPING; - t->palm.time = time; -@@ -682,7 +682,7 @@ tp_post_events(struct tp_dispatch *tp, uint64_t time) - - if (filter_motion || - tp->sendevents.trackpoint_active || -- tp->sendevents.keyboard_active) { -+ tp->dwt.keyboard_active) { - tp_edge_scroll_stop_events(tp, time); - tp_gesture_stop(tp, time); - return; -@@ -732,15 +732,15 @@ static void - tp_remove_sendevents(struct tp_dispatch *tp) - { - libinput_timer_cancel(&tp->sendevents.trackpoint_timer); -- libinput_timer_cancel(&tp->sendevents.keyboard_timer); -+ libinput_timer_cancel(&tp->dwt.keyboard_timer); - - if (tp->buttons.trackpoint) - libinput_device_remove_event_listener( - &tp->sendevents.trackpoint_listener); - -- if (tp->sendevents.keyboard) -+ if (tp->dwt.keyboard) - libinput_device_remove_event_listener( -- &tp->sendevents.keyboard_listener); -+ &tp->dwt.keyboard_listener); - } - - static void -@@ -868,7 +868,7 @@ tp_keyboard_timeout(uint64_t now, void *data) - struct tp_dispatch *tp = data; - - tp_tap_resume(tp, now); -- tp->sendevents.keyboard_active = false; -+ tp->dwt.keyboard_active = false; - } - - static void -@@ -903,17 +903,17 @@ tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) - break; - } - -- if (!tp->sendevents.keyboard_active) { -+ if (!tp->dwt.keyboard_active) { - tp_edge_scroll_stop_events(tp, time); - tp_gesture_stop(tp, time); - tp_tap_suspend(tp, time); -- tp->sendevents.keyboard_active = true; -+ tp->dwt.keyboard_active = true; - timeout = DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_1; - } else { - timeout = DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_2; - } - -- libinput_timer_set(&tp->sendevents.keyboard_timer, -+ libinput_timer_set(&tp->dwt.keyboard_timer, - time + timeout); - } - -@@ -945,12 +945,12 @@ tp_device_added(struct evdev_device *device, - kbd_is_internal = bus_tp != BUS_BLUETOOTH && - bus_kbd == bus_tp; - if (tp_is_internal && kbd_is_internal && -- tp->sendevents.keyboard == NULL) { -+ tp->dwt.keyboard == NULL) { - libinput_device_add_event_listener(&added_device->base, -- &tp->sendevents.keyboard_listener, -+ &tp->dwt.keyboard_listener, - tp_keyboard_event, tp); -- tp->sendevents.keyboard = added_device; -- tp->sendevents.keyboard_active = false; -+ tp->dwt.keyboard = added_device; -+ tp->dwt.keyboard_active = false; - } - - if (tp->sendevents.current_mode != -@@ -979,10 +979,10 @@ tp_device_removed(struct evdev_device *device, - tp->buttons.trackpoint = NULL; - } - -- if (removed_device == tp->sendevents.keyboard) { -+ if (removed_device == tp->dwt.keyboard) { - libinput_device_remove_event_listener( -- &tp->sendevents.keyboard_listener); -- tp->sendevents.keyboard = NULL; -+ &tp->dwt.keyboard_listener); -+ tp->dwt.keyboard = NULL; - } - - if (tp->sendevents.current_mode != -@@ -1261,7 +1261,7 @@ tp_init_sendevents(struct tp_dispatch *tp, - tp->device->base.seat->libinput, - tp_trackpoint_timeout, tp); - -- libinput_timer_init(&tp->sendevents.keyboard_timer, -+ libinput_timer_init(&tp->dwt.keyboard_timer, - tp->device->base.seat->libinput, - tp_keyboard_timeout, tp); - return 0; -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index 1413945..70b35f4 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -279,12 +279,14 @@ struct tp_dispatch { - bool trackpoint_active; - struct libinput_event_listener trackpoint_listener; - struct libinput_timer trackpoint_timer; -+ } sendevents; - -+ struct { - bool keyboard_active; - struct libinput_event_listener keyboard_listener; - struct libinput_timer keyboard_timer; - struct evdev_device *keyboard; -- } sendevents; -+ } dwt; - }; - - #define tp_for_each_touch(_tp, _t) \ --- -2.4.1 - diff --git a/0001-touchpad-switch-from-is_palm-to-an-enum.patch b/0001-touchpad-switch-from-is_palm-to-an-enum.patch deleted file mode 100644 index ca14e5a..0000000 --- a/0001-touchpad-switch-from-is_palm-to-an-enum.patch +++ /dev/null @@ -1,91 +0,0 @@ -From d288eb0a63793ebb64de041960336d6fb57060b0 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 20 Apr 2015 16:09:31 +1000 -Subject: [PATCH libinput 1/3] touchpad: switch from is_palm to an enum - -Preparation to add different palm detection types. Not all of them need to be -un-done when leaving the edge area so a boolean is not enough. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad.c | 10 +++++----- - src/evdev-mt-touchpad.h | 7 ++++++- - 2 files changed, 11 insertions(+), 6 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 79177fb..d8b44fa 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -231,7 +231,7 @@ tp_end_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - } - - t->dirty = true; -- t->palm.is_palm = false; -+ t->palm.state = PALM_NONE; - t->state = TOUCH_END; - t->pinned.is_pinned = false; - t->millis = time; -@@ -455,7 +455,7 @@ int - tp_touch_active(struct tp_dispatch *tp, struct tp_touch *t) - { - return (t->state == TOUCH_BEGIN || t->state == TOUCH_UPDATE) && -- !t->palm.is_palm && -+ t->palm.state == PALM_NONE && - !t->pinned.is_pinned && - tp_button_touch_active(tp, t) && - tp_edge_scroll_touch_active(tp, t); -@@ -491,14 +491,14 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - we move out of the palm edge zone within the timeout, provided - the direction is within 45 degrees of the horizontal. - */ -- if (t->palm.is_palm) { -+ if (t->palm.state == PALM_EDGE) { - if (time < t->palm.time + PALM_TIMEOUT && - (t->point.x > tp->palm.left_edge && t->point.x < tp->palm.right_edge)) { - delta = device_delta(t->point, t->palm.first); - dirs = normalized_get_direction( - tp_normalize_delta(tp, delta)); - if ((dirs & DIRECTIONS) && !(dirs & ~DIRECTIONS)) { -- t->palm.is_palm = false; -+ t->palm.state = PALM_NONE; - } - } - return; -@@ -517,7 +517,7 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - tp_button_is_inside_softbutton_area(tp, t)) - return; - -- t->palm.is_palm = true; -+ t->palm.state = PALM_EDGE; - t->palm.time = time; - t->palm.first = t->point; - } -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index f602359..ba65e41 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -61,6 +61,11 @@ enum touch_state { - TOUCH_END - }; - -+enum touch_palm_state { -+ PALM_NONE = 0, -+ PALM_EDGE, -+}; -+ - enum button_event { - BUTTON_EVENT_IN_BOTTOM_R = 30, - BUTTON_EVENT_IN_BOTTOM_L, -@@ -171,7 +176,7 @@ struct tp_touch { - } scroll; - - struct { -- bool is_palm; -+ enum touch_palm_state state; - struct device_coords first; /* first coordinates if is_palm == true */ - uint32_t time; /* first timestamp if is_palm == true */ - } palm; --- -2.3.5 - diff --git a/0002-touchpad-add-timeout-based-disable-while-typing.patch b/0002-touchpad-add-timeout-based-disable-while-typing.patch deleted file mode 100644 index 6e7208d..0000000 --- a/0002-touchpad-add-timeout-based-disable-while-typing.patch +++ /dev/null @@ -1,209 +0,0 @@ -From d02b670e3796c10fa75b94165886901a0a0c41f4 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 20 Apr 2015 15:51:20 +1000 -Subject: [PATCH libinput 2/3] touchpad: add timeout-based disable-while-typing - -On some touchpads, typing triggers touches in areas of the touchpad that -cannot easily be distinguished from other fingers. Pressure information is -useless too, so we have to go back to a timeout-based handling of touch data. - -If we see non-modifier key events, disable the touchpad for a timeout and set -any touches starting during that timeout as palm. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++-- - src/evdev-mt-touchpad.h | 7 ++++ - 2 files changed, 94 insertions(+), 3 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index d8b44fa..32d8e25 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -34,6 +34,7 @@ - #define DEFAULT_ACCEL_NUMERATOR 3000.0 - #define DEFAULT_HYSTERESIS_MARGIN_DENOMINATOR 700.0 - #define DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT 500 /* ms */ -+#define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT 500 /* ms */ - #define FAKE_FINGER_OVERFLOW (1 << 7) - - static inline int -@@ -487,6 +488,14 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - struct device_float_coords delta; - int dirs; - -+ if (tp->sendevents.keyboard_active && -+ t->state == TOUCH_BEGIN) { -+ t->palm.state = PALM_TYPING; -+ t->palm.time = time; -+ t->palm.first = t->point; -+ return; -+ } -+ - /* If labelled a touch as palm, we unlabel as palm when - we move out of the palm edge zone within the timeout, provided - the direction is within 45 degrees of the horizontal. -@@ -705,7 +714,9 @@ tp_post_events(struct tp_dispatch *tp, uint64_t time) - filter_motion |= tp_tap_handle_state(tp, time); - filter_motion |= tp_post_button_events(tp, time); - -- if (filter_motion || tp->sendevents.trackpoint_active) { -+ if (filter_motion || -+ tp->sendevents.trackpoint_active || -+ tp->sendevents.keyboard_active) { - tp_edge_scroll_stop_events(tp, time); - tp_gesture_stop(tp, time); - return; -@@ -755,10 +766,15 @@ static void - tp_remove_sendevents(struct tp_dispatch *tp) - { - libinput_timer_cancel(&tp->sendevents.trackpoint_timer); -+ libinput_timer_cancel(&tp->sendevents.keyboard_timer); - - if (tp->buttons.trackpoint) - libinput_device_remove_event_listener( - &tp->sendevents.trackpoint_listener); -+ -+ if (tp->sendevents.keyboard) -+ libinput_device_remove_event_listener( -+ &tp->sendevents.keyboard_listener); - } - - static void -@@ -881,13 +897,59 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data) - } - - static void -+tp_keyboard_timeout(uint64_t now, void *data) -+{ -+ struct tp_dispatch *tp = data; -+ -+ tp_tap_resume(tp, now); -+ tp->sendevents.keyboard_active = false; -+} -+ -+static void -+tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) -+{ -+ struct tp_dispatch *tp = data; -+ struct libinput_event_keyboard *kbdev; -+ -+ if (event->type != LIBINPUT_EVENT_KEYBOARD_KEY) -+ return; -+ -+ kbdev = libinput_event_get_keyboard_event(event); -+ /* modifier keys don't trigger disable-while-typing so things like -+ * ctrl+zoom or ctrl+click are possible */ -+ switch (libinput_event_keyboard_get_key(kbdev)) { -+ case KEY_LEFTCTRL: -+ case KEY_RIGHTCTRL: -+ case KEY_LEFTALT: -+ case KEY_RIGHTALT: -+ case KEY_LEFTSHIFT: -+ case KEY_RIGHTSHIFT: -+ case KEY_FN: -+ return; -+ default: -+ break; -+ } -+ -+ if (!tp->sendevents.keyboard_active) { -+ tp_edge_scroll_stop_events(tp, time); -+ tp_gesture_stop(tp, time); -+ tp_tap_suspend(tp, time); -+ tp->sendevents.keyboard_active = true; -+ } -+ -+ libinput_timer_set(&tp->sendevents.keyboard_timer, -+ time + DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT); -+} -+ -+static void - tp_device_added(struct evdev_device *device, - struct evdev_device *added_device) - { - struct tp_dispatch *tp = (struct tp_dispatch*)device->dispatch; - unsigned int bus_tp = libevdev_get_id_bustype(device->evdev), -- bus_trp = libevdev_get_id_bustype(added_device->evdev); -- bool tp_is_internal, trp_is_internal; -+ bus_trp = libevdev_get_id_bustype(added_device->evdev), -+ bus_kbd = libevdev_get_id_bustype(added_device->evdev); -+ bool tp_is_internal, trp_is_internal, kbd_is_internal; - - tp_is_internal = bus_tp != BUS_USB && bus_tp != BUS_BLUETOOTH; - trp_is_internal = bus_trp != BUS_USB && bus_trp != BUS_BLUETOOTH; -@@ -903,6 +965,18 @@ tp_device_added(struct evdev_device *device, - tp_trackpoint_event, tp); - } - -+ /* FIXME: detect external keyboard better */ -+ kbd_is_internal = bus_tp != BUS_BLUETOOTH && -+ bus_kbd == bus_tp; -+ if (tp_is_internal && kbd_is_internal && -+ tp->sendevents.keyboard == NULL) { -+ libinput_device_add_event_listener(&added_device->base, -+ &tp->sendevents.keyboard_listener, -+ tp_keyboard_event, tp); -+ tp->sendevents.keyboard = added_device; -+ tp->sendevents.keyboard_active = false; -+ } -+ - if (tp->sendevents.current_mode != - LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE) - return; -@@ -929,6 +1003,12 @@ tp_device_removed(struct evdev_device *device, - tp->buttons.trackpoint = NULL; - } - -+ if (removed_device == tp->sendevents.keyboard) { -+ libinput_device_remove_event_listener( -+ &tp->sendevents.keyboard_listener); -+ tp->sendevents.keyboard = NULL; -+ } -+ - if (tp->sendevents.current_mode != - LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE) - return; -@@ -1204,6 +1284,10 @@ tp_init_sendevents(struct tp_dispatch *tp, - libinput_timer_init(&tp->sendevents.trackpoint_timer, - tp->device->base.seat->libinput, - tp_trackpoint_timeout, tp); -+ -+ libinput_timer_init(&tp->sendevents.keyboard_timer, -+ tp->device->base.seat->libinput, -+ tp_keyboard_timeout, tp); - return 0; - } - -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index ba65e41..3d51a39 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -64,6 +64,7 @@ enum touch_state { - enum touch_palm_state { - PALM_NONE = 0, - PALM_EDGE, -+ PALM_TYPING, - }; - - enum button_event { -@@ -277,9 +278,15 @@ struct tp_dispatch { - struct { - struct libinput_device_config_send_events config; - enum libinput_config_send_events_mode current_mode; -+ - bool trackpoint_active; - struct libinput_event_listener trackpoint_listener; - struct libinput_timer trackpoint_timer; -+ -+ bool keyboard_active; -+ struct libinput_event_listener keyboard_listener; -+ struct libinput_timer keyboard_timer; -+ struct evdev_device *keyboard; - } sendevents; - }; - --- -2.3.5 - diff --git a/0002-touchpad-extend-the-key-blacklist-for-disable-while-.patch b/0002-touchpad-extend-the-key-blacklist-for-disable-while-.patch deleted file mode 100644 index c8d983d..0000000 --- a/0002-touchpad-extend-the-key-blacklist-for-disable-while-.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 640c17cb8102a1833e0366eaf3f7bd5325147741 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 25 May 2015 08:48:25 +1000 -Subject: [PATCH libinput 02/10] touchpad: extend the key blacklist for - disable-while-typing - -Alt-tab should not trigger the disable-while-typing timeout, likewise with the -F-keys, multimedia keys, the windows and menu key, etc. - -https://bugs.freedesktop.org/show_bug.cgi?id=90613 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -Tested-by: Benjamin Tissoires ---- - src/evdev-mt-touchpad.c | 45 +++++++++++++++++++++++++++++++++------------ - 1 file changed, 33 insertions(+), 12 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 89d24f3..26edcb4 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -871,6 +871,37 @@ tp_keyboard_timeout(uint64_t now, void *data) - tp->dwt.keyboard_active = false; - } - -+static inline bool -+tp_key_ignore_for_dwt(unsigned int keycode) -+{ -+ switch (keycode) { -+ /* Ignore modifiers to be responsive to ctrl-click, alt-tab, etc. */ -+ case KEY_LEFTCTRL: -+ case KEY_RIGHTCTRL: -+ case KEY_LEFTALT: -+ case KEY_RIGHTALT: -+ case KEY_LEFTSHIFT: -+ case KEY_RIGHTSHIFT: -+ case KEY_FN: -+ case KEY_CAPSLOCK: -+ case KEY_TAB: -+ case KEY_COMPOSE: -+ case KEY_RIGHTMETA: -+ case KEY_LEFTMETA: -+ return true; -+ default: -+ break; -+ } -+ -+ /* Ignore keys not part of the "typewriter set", i.e. F-keys, -+ * multimedia keys, numpad, etc. -+ */ -+ if (keycode >= KEY_F1) -+ return true; -+ -+ return false; -+} -+ - static void - tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) - { -@@ -890,18 +921,8 @@ tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) - - /* modifier keys don't trigger disable-while-typing so things like - * ctrl+zoom or ctrl+click are possible */ -- switch (libinput_event_keyboard_get_key(kbdev)) { -- case KEY_LEFTCTRL: -- case KEY_RIGHTCTRL: -- case KEY_LEFTALT: -- case KEY_RIGHTALT: -- case KEY_LEFTSHIFT: -- case KEY_RIGHTSHIFT: -- case KEY_FN: -- return; -- default: -- break; -- } -+ if (tp_key_ignore_for_dwt(libinput_event_keyboard_get_key(kbdev))) -+ return; - - if (!tp->dwt.keyboard_active) { - tp_edge_scroll_stop_events(tp, time); --- -2.4.1 - diff --git a/0003-touchpad-add-helper-function-to-get-from-tp-to-the-l.patch b/0003-touchpad-add-helper-function-to-get-from-tp-to-the-l.patch deleted file mode 100644 index e8c44b0..0000000 --- a/0003-touchpad-add-helper-function-to-get-from-tp-to-the-l.patch +++ /dev/null @@ -1,220 +0,0 @@ -From c007b9aa435bb04066874fada4e5ef35147a3f4d Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 22 May 2015 15:16:31 +1000 -Subject: [PATCH libinput 03/10] touchpad: add helper function to get from tp - to the libinput context - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -Tested-by: Benjamin Tissoires ---- - src/evdev-mt-touchpad-buttons.c | 8 ++++---- - src/evdev-mt-touchpad-edge-scroll.c | 12 ++++++------ - src/evdev-mt-touchpad-tap.c | 10 +++++----- - src/evdev-mt-touchpad.c | 8 ++++---- - src/evdev-mt-touchpad.h | 6 ++++++ - 5 files changed, 25 insertions(+), 19 deletions(-) - -diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c -index d6acbf0..2f24ee6 100644 ---- a/src/evdev-mt-touchpad-buttons.c -+++ b/src/evdev-mt-touchpad-buttons.c -@@ -392,7 +392,7 @@ tp_button_handle_event(struct tp_dispatch *tp, - enum button_event event, - uint64_t time) - { -- struct libinput *libinput = tp->device->base.seat->libinput; -+ struct libinput *libinput = tp_libinput_context(tp); - enum button_state current = t->button.state; - - switch(t->button.state) { -@@ -478,7 +478,7 @@ tp_process_button(struct tp_dispatch *tp, - const struct input_event *e, - uint64_t time) - { -- struct libinput *libinput = tp->device->base.seat->libinput; -+ struct libinput *libinput = tp_libinput_context(tp); - uint32_t mask = 1 << (e->code - BTN_LEFT); - - /* Ignore other buttons on clickpads */ -@@ -680,7 +680,7 @@ int - tp_init_buttons(struct tp_dispatch *tp, - struct evdev_device *device) - { -- struct libinput *libinput = tp->device->base.seat->libinput; -+ struct libinput *libinput = tp_libinput_context(tp); - struct tp_touch *t; - int width, height; - double diagonal; -@@ -731,7 +731,7 @@ tp_init_buttons(struct tp_dispatch *tp, - tp_for_each_touch(tp, t) { - t->button.state = BUTTON_STATE_NONE; - libinput_timer_init(&t->button.timer, -- tp->device->base.seat->libinput, -+ tp_libinput_context(tp), - tp_button_handle_timeout, t); - } - -diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c -index 369fded..9bf3f0c 100644 ---- a/src/evdev-mt-touchpad-edge-scroll.c -+++ b/src/evdev-mt-touchpad-edge-scroll.c -@@ -121,7 +121,7 @@ tp_edge_scroll_handle_none(struct tp_dispatch *tp, - struct tp_touch *t, - enum scroll_event event) - { -- struct libinput *libinput = tp->device->base.seat->libinput; -+ struct libinput *libinput = tp_libinput_context(tp); - - switch (event) { - case SCROLL_EVENT_TOUCH: -@@ -149,7 +149,7 @@ tp_edge_scroll_handle_edge_new(struct tp_dispatch *tp, - struct tp_touch *t, - enum scroll_event event) - { -- struct libinput *libinput = tp->device->base.seat->libinput; -+ struct libinput *libinput = tp_libinput_context(tp); - - switch (event) { - case SCROLL_EVENT_TOUCH: -@@ -178,7 +178,7 @@ tp_edge_scroll_handle_edge(struct tp_dispatch *tp, - struct tp_touch *t, - enum scroll_event event) - { -- struct libinput *libinput = tp->device->base.seat->libinput; -+ struct libinput *libinput = tp_libinput_context(tp); - - switch (event) { - case SCROLL_EVENT_TOUCH: -@@ -209,7 +209,7 @@ tp_edge_scroll_handle_area(struct tp_dispatch *tp, - struct tp_touch *t, - enum scroll_event event) - { -- struct libinput *libinput = tp->device->base.seat->libinput; -+ struct libinput *libinput = tp_libinput_context(tp); - - switch (event) { - case SCROLL_EVENT_TOUCH: -@@ -232,7 +232,7 @@ tp_edge_scroll_handle_event(struct tp_dispatch *tp, - struct tp_touch *t, - enum scroll_event event) - { -- struct libinput *libinput = tp->device->base.seat->libinput; -+ struct libinput *libinput = tp_libinput_context(tp); - enum tp_edge_scroll_touch_state current = t->scroll.edge_state; - - switch (current) { -@@ -301,7 +301,7 @@ tp_edge_scroll_init(struct tp_dispatch *tp, struct evdev_device *device) - tp_for_each_touch(tp, t) { - t->scroll.direction = -1; - libinput_timer_init(&t->scroll.timer, -- device->base.seat->libinput, -+ tp_libinput_context(tp), - tp_edge_scroll_handle_timeout, t); - } - -diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c -index 61f94e5..21b2e29 100644 ---- a/src/evdev-mt-touchpad-tap.c -+++ b/src/evdev-mt-touchpad-tap.c -@@ -146,7 +146,7 @@ tp_tap_idle_handle_event(struct tp_dispatch *tp, - struct tp_touch *t, - enum tap_event event, uint64_t time) - { -- struct libinput *libinput = tp->device->base.seat->libinput; -+ struct libinput *libinput = tp_libinput_context(tp); - - switch (event) { - case TAP_EVENT_TOUCH: -@@ -222,7 +222,7 @@ tp_tap_tapped_handle_event(struct tp_dispatch *tp, - struct tp_touch *t, - enum tap_event event, uint64_t time) - { -- struct libinput *libinput = tp->device->base.seat->libinput; -+ struct libinput *libinput = tp_libinput_context(tp); - - switch (event) { - case TAP_EVENT_MOTION: -@@ -456,7 +456,7 @@ tp_tap_multitap_handle_event(struct tp_dispatch *tp, - struct tp_touch *t, - enum tap_event event, uint64_t time) - { -- struct libinput *libinput = tp->device->base.seat->libinput; -+ struct libinput *libinput = tp_libinput_context(tp); - - switch (event) { - case TAP_EVENT_RELEASE: -@@ -549,7 +549,7 @@ tp_tap_handle_event(struct tp_dispatch *tp, - enum tap_event event, - uint64_t time) - { -- struct libinput *libinput = tp->device->base.seat->libinput; -+ struct libinput *libinput = tp_libinput_context(tp); - enum tp_tap_state current; - - current = tp->tap.state; -@@ -826,7 +826,7 @@ tp_init_tap(struct tp_dispatch *tp) - tp->tap.enabled = tp_tap_default(tp->device); - - libinput_timer_init(&tp->tap.timer, -- tp->device->base.seat->libinput, -+ tp_libinput_context(tp), - tp_tap_handle_timeout, tp); - - return 0; -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 26edcb4..6c0daf0 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -775,7 +775,7 @@ tp_release_fake_touches(struct tp_dispatch *tp) - static void - tp_clear_state(struct tp_dispatch *tp) - { -- uint64_t now = libinput_now(tp->device->base.seat->libinput); -+ uint64_t now = libinput_now(tp_libinput_context(tp)); - struct tp_touch *t; - - /* Unroll the touchpad state. -@@ -1178,7 +1178,7 @@ tp_scroll_config_scroll_method_set_method(struct libinput_device *device, - { - struct evdev_device *evdev = (struct evdev_device*)device; - struct tp_dispatch *tp = (struct tp_dispatch*)evdev->dispatch; -- uint64_t time = libinput_now(device->seat->libinput); -+ uint64_t time = libinput_now(tp_libinput_context(tp)); - - if (method == tp->scroll.method) - return LIBINPUT_CONFIG_STATUS_SUCCESS; -@@ -1279,11 +1279,11 @@ tp_init_sendevents(struct tp_dispatch *tp, - struct evdev_device *device) - { - libinput_timer_init(&tp->sendevents.trackpoint_timer, -- tp->device->base.seat->libinput, -+ tp_libinput_context(tp), - tp_trackpoint_timeout, tp); - - libinput_timer_init(&tp->dwt.keyboard_timer, -- tp->device->base.seat->libinput, -+ tp_libinput_context(tp), - tp_keyboard_timeout, tp); - return 0; - } -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index 70b35f4..f8c837d 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -292,6 +292,12 @@ struct tp_dispatch { - #define tp_for_each_touch(_tp, _t) \ - for (unsigned int _i = 0; _i < (_tp)->ntouches && (_t = &(_tp)->touches[_i]); _i++) - -+static inline struct libinput* -+tp_libinput_context(struct tp_dispatch *tp) -+{ -+ return tp->device->base.seat->libinput; -+} -+ - static inline struct normalized_coords - tp_normalize_delta(struct tp_dispatch *tp, struct device_float_coords delta) - { --- -2.4.1 - diff --git a/0003-touchpad-use-a-two-stage-timeout-for-disable-while-t.patch b/0003-touchpad-use-a-two-stage-timeout-for-disable-while-t.patch deleted file mode 100644 index de0aa6f..0000000 --- a/0003-touchpad-use-a-two-stage-timeout-for-disable-while-t.patch +++ /dev/null @@ -1,71 +0,0 @@ -From c2f8b508b9fc661967516ca07d2100ca8749c101 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 20 Apr 2015 16:20:00 +1000 -Subject: [PATCH libinput 3/3] touchpad: use a two-stage timeout for - disable-while-typing - -Hitting a single key triggers a short timeout, just enough to cover the time -to the next key event. Hitting more than one key triggers the longer timeout. - -This should improve responsiveness after single key events when the touchpad is -still the main interaction mode and a key needs to be pressed to advance in -the UI. When typing the hands require physical movement to get back to the -touchpad anyway so a longer timeout is acceptable and more reliable. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad.c | 15 +++++++++++++-- - 1 file changed, 13 insertions(+), 2 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 32d8e25..3ebb559 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -34,7 +34,8 @@ - #define DEFAULT_ACCEL_NUMERATOR 3000.0 - #define DEFAULT_HYSTERESIS_MARGIN_DENOMINATOR 700.0 - #define DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT 500 /* ms */ --#define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT 500 /* ms */ -+#define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_1 200 /* ms */ -+#define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_2 500 /* ms */ - #define FAKE_FINGER_OVERFLOW (1 << 7) - - static inline int -@@ -910,11 +911,18 @@ tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) - { - struct tp_dispatch *tp = data; - struct libinput_event_keyboard *kbdev; -+ unsigned int timeout; - - if (event->type != LIBINPUT_EVENT_KEYBOARD_KEY) - return; - - kbdev = libinput_event_get_keyboard_event(event); -+ -+ /* Only trigger the timer on key down. */ -+ if (libinput_event_keyboard_get_key_state(kbdev) != -+ LIBINPUT_KEY_STATE_PRESSED) -+ return; -+ - /* modifier keys don't trigger disable-while-typing so things like - * ctrl+zoom or ctrl+click are possible */ - switch (libinput_event_keyboard_get_key(kbdev)) { -@@ -935,10 +943,13 @@ tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) - tp_gesture_stop(tp, time); - tp_tap_suspend(tp, time); - tp->sendevents.keyboard_active = true; -+ timeout = DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_1; -+ } else { -+ timeout = DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_2; - } - - libinput_timer_set(&tp->sendevents.keyboard_timer, -- time + DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT); -+ time + timeout); - } - - static void --- -2.3.5 - diff --git a/0004-touchpad-only-check-keyboards-for-disable-while-typi.patch b/0004-touchpad-only-check-keyboards-for-disable-while-typi.patch deleted file mode 100644 index 8871177..0000000 --- a/0004-touchpad-only-check-keyboards-for-disable-while-typi.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 5a18344bbc0a47f13752d8e39a22450f89624980 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 22 May 2015 15:51:18 +1000 -Subject: [PATCH libinput 04/10] touchpad: only check keyboards for - disable-while-typing - -The keyboard test is a simple one, if we have the first row of alphabetic -keys, we assume it's a full keyboard. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -Tested-by: Benjamin Tissoires ---- - src/evdev-mt-touchpad.c | 22 ++++++++++++---------- - src/evdev.c | 20 ++++++++++++++++++++ - src/evdev.h | 1 + - 3 files changed, 33 insertions(+), 10 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 6c0daf0..5a05129 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -962,16 +962,18 @@ tp_device_added(struct evdev_device *device, - tp_trackpoint_event, tp); - } - -- /* FIXME: detect external keyboard better */ -- kbd_is_internal = bus_tp != BUS_BLUETOOTH && -- bus_kbd == bus_tp; -- if (tp_is_internal && kbd_is_internal && -- tp->dwt.keyboard == NULL) { -- libinput_device_add_event_listener(&added_device->base, -- &tp->dwt.keyboard_listener, -- tp_keyboard_event, tp); -- tp->dwt.keyboard = added_device; -- tp->dwt.keyboard_active = false; -+ if (added_device->tags & EVDEV_TAG_KEYBOARD) { -+ /* FIXME: detect external keyboard better */ -+ kbd_is_internal = bus_tp != BUS_BLUETOOTH && -+ bus_kbd == bus_tp; -+ if (tp_is_internal && kbd_is_internal && -+ tp->dwt.keyboard == NULL) { -+ libinput_device_add_event_listener(&added_device->base, -+ &tp->dwt.keyboard_listener, -+ tp_keyboard_event, tp); -+ tp->dwt.keyboard = added_device; -+ tp->dwt.keyboard_active = false; -+ } - } - - if (tp->sendevents.current_mode != -diff --git a/src/evdev.c b/src/evdev.c -index 4ce9250..a98e801 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -734,6 +734,25 @@ evdev_tag_trackpoint(struct evdev_device *device, - } - - static void -+evdev_tag_keyboard(struct evdev_device *device, -+ struct udev_device *udev_device) -+{ -+ int code; -+ -+ if (!libevdev_has_event_type(device->evdev, EV_KEY)) -+ return; -+ -+ for (code = KEY_Q; code <= KEY_P; code++) { -+ if (!libevdev_has_event_code(device->evdev, -+ EV_KEY, -+ code)) -+ return; -+ } -+ -+ device->tags |= EVDEV_TAG_KEYBOARD; -+} -+ -+static void - fallback_process(struct evdev_dispatch *dispatch, - struct evdev_device *device, - struct input_event *event, -@@ -772,6 +791,7 @@ fallback_tag_device(struct evdev_device *device, - { - evdev_tag_external_mouse(device, udev_device); - evdev_tag_trackpoint(device, udev_device); -+ evdev_tag_keyboard(device, udev_device); - } - - static int -diff --git a/src/evdev.h b/src/evdev.h -index 20c0b55..bd398de 100644 ---- a/src/evdev.h -+++ b/src/evdev.h -@@ -68,6 +68,7 @@ enum evdev_device_tags { - EVDEV_TAG_INTERNAL_TOUCHPAD = (1 << 1), - EVDEV_TAG_TRACKPOINT = (1 << 2), - EVDEV_TAG_TOUCHPAD_TRACKPOINT = (1 << 3), -+ EVDEV_TAG_KEYBOARD = (1 << 4), - }; - - enum evdev_middlebutton_state { --- -2.4.1 - diff --git a/0005-touchpad-be-finer-grained-about-when-to-pair-touchpa.patch b/0005-touchpad-be-finer-grained-about-when-to-pair-touchpa.patch deleted file mode 100644 index 0cadc69..0000000 --- a/0005-touchpad-be-finer-grained-about-when-to-pair-touchpa.patch +++ /dev/null @@ -1,154 +0,0 @@ -From f1a89760aa814787f0e1df43658b95bf88195592 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 22 May 2015 16:07:10 +1000 -Subject: [PATCH libinput 05/10] touchpad: be finer-grained about when to pair - touchpads/keyboard for DWT - -Check a couple of easy yes/no definitives that cover most Lenovo laptops, -and avoid false positives on Wacoms. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -Tested-by: Benjamin Tissoires ---- - src/evdev-mt-touchpad.c | 54 +++++++++++++++++++++++++++++++++++-------------- - src/evdev-mt-touchpad.h | 2 -- - src/libinput-util.h | 3 +++ - test/device.c | 2 +- - test/touchpad.c | 2 +- - 5 files changed, 44 insertions(+), 19 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 5a05129..3a0985d 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -938,15 +938,43 @@ tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) - time + timeout); - } - -+static bool -+tp_want_dwt(struct evdev_device *touchpad, -+ struct evdev_device *keyboard) -+{ -+ unsigned int bus_tp = libevdev_get_id_bustype(touchpad->evdev), -+ bus_kbd = libevdev_get_id_bustype(keyboard->evdev); -+ -+ if (bus_tp == BUS_BLUETOOTH || bus_kbd == BUS_BLUETOOTH) -+ return false; -+ -+ /* evemu will set the right bus type */ -+ if (bus_tp == BUS_VIRTUAL || bus_kbd == BUS_VIRTUAL) -+ return false; -+ -+ /* If the touchpad is on serio, the keyboard is too, so ignore any -+ other devices */ -+ if (bus_tp == BUS_I8042 && bus_kbd != bus_tp) -+ return false; -+ -+ /* Wacom makes touchpads, but not internal ones */ -+ if (libevdev_get_id_vendor(touchpad->evdev) == VENDOR_ID_WACOM) -+ return false; -+ -+ /* everything else we don't really know, so we have to assume -+ they go together */ -+ -+ return true; -+} -+ - static void - tp_device_added(struct evdev_device *device, - struct evdev_device *added_device) - { - struct tp_dispatch *tp = (struct tp_dispatch*)device->dispatch; - unsigned int bus_tp = libevdev_get_id_bustype(device->evdev), -- bus_trp = libevdev_get_id_bustype(added_device->evdev), -- bus_kbd = libevdev_get_id_bustype(added_device->evdev); -- bool tp_is_internal, trp_is_internal, kbd_is_internal; -+ bus_trp = libevdev_get_id_bustype(added_device->evdev); -+ bool tp_is_internal, trp_is_internal; - - tp_is_internal = bus_tp != BUS_USB && bus_tp != BUS_BLUETOOTH; - trp_is_internal = bus_trp != BUS_USB && bus_trp != BUS_BLUETOOTH; -@@ -962,18 +990,14 @@ tp_device_added(struct evdev_device *device, - tp_trackpoint_event, tp); - } - -- if (added_device->tags & EVDEV_TAG_KEYBOARD) { -- /* FIXME: detect external keyboard better */ -- kbd_is_internal = bus_tp != BUS_BLUETOOTH && -- bus_kbd == bus_tp; -- if (tp_is_internal && kbd_is_internal && -- tp->dwt.keyboard == NULL) { -- libinput_device_add_event_listener(&added_device->base, -- &tp->dwt.keyboard_listener, -- tp_keyboard_event, tp); -- tp->dwt.keyboard = added_device; -- tp->dwt.keyboard_active = false; -- } -+ if (added_device->tags & EVDEV_TAG_KEYBOARD && -+ tp->dwt.keyboard == NULL && -+ tp_want_dwt(device, added_device)) { -+ libinput_device_add_event_listener(&added_device->base, -+ &tp->dwt.keyboard_listener, -+ tp_keyboard_event, tp); -+ tp->dwt.keyboard = added_device; -+ tp->dwt.keyboard_active = false; - } - - if (tp->sendevents.current_mode != -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index f8c837d..db877c7 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -32,8 +32,6 @@ - #define TOUCHPAD_HISTORY_LENGTH 4 - #define TOUCHPAD_MIN_SAMPLES 4 - --#define VENDOR_ID_APPLE 0x5ac -- - /* Convert mm to a distance normalized to DEFAULT_MOUSE_DPI */ - #define TP_MM_TO_DPI_NORMALIZED(mm) (DEFAULT_MOUSE_DPI/25.4 * mm) - -diff --git a/src/libinput-util.h b/src/libinput-util.h -index 74226b9..89f5230 100644 ---- a/src/libinput-util.h -+++ b/src/libinput-util.h -@@ -30,6 +30,9 @@ - - #include "libinput.h" - -+#define VENDOR_ID_APPLE 0x5ac -+#define VENDOR_ID_WACOM 0x56a -+ - void - set_logging_enabled(int enabled); - -diff --git a/test/device.c b/test/device.c -index 1c277ba..0e494c4 100644 ---- a/test/device.c -+++ b/test/device.c -@@ -69,7 +69,7 @@ START_TEST(device_sendevents_config_touchpad) - expected = LIBINPUT_CONFIG_SEND_EVENTS_DISABLED; - - /* The wacom devices in the test suite are external */ -- if (libevdev_get_id_vendor(dev->evdev) != 0x56a) /* wacom */ -+ if (libevdev_get_id_vendor(dev->evdev) != VENDOR_ID_WACOM) - expected |= - LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE; - -diff --git a/test/touchpad.c b/test/touchpad.c -index 576b2bd..2624dda 100644 ---- a/test/touchpad.c -+++ b/test/touchpad.c -@@ -2951,7 +2951,7 @@ touchpad_has_palm_detect_size(struct litest_device *dev) - double width, height; - int rc; - -- if (libinput_device_get_id_vendor(dev->libinput_device) == 0x5ac) /* Apple */ -+ if (libinput_device_get_id_vendor(dev->libinput_device) == ID_VENDOR_APPLE) - return 1; - - rc = libinput_device_get_size(dev->libinput_device, &width, &height); --- -2.4.1 - diff --git a/0006-touchpad-split-disable-while-typing-handling-into-a-.patch b/0006-touchpad-split-disable-while-typing-handling-into-a-.patch deleted file mode 100644 index 56e10de..0000000 --- a/0006-touchpad-split-disable-while-typing-handling-into-a-.patch +++ /dev/null @@ -1,59 +0,0 @@ -From c98229492ce59faf402f446da200658454ace9d5 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 21 May 2015 13:30:24 +1000 -Subject: [PATCH libinput 06/10] touchpad: split disable-while-typing handling - into a helper function - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -Tested-by: Benjamin Tissoires ---- - src/evdev-mt-touchpad.c | 25 ++++++++++++++++++------- - 1 file changed, 18 insertions(+), 7 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 3a0985d..ad20fb9 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -478,6 +478,22 @@ tp_palm_tap_is_palm(struct tp_dispatch *tp, struct tp_touch *t) - return false; - } - -+static int -+tp_palm_detect_dwt(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) -+{ -+ if (!tp->dwt.keyboard_active) -+ return 0; -+ -+ if (t->state == TOUCH_BEGIN) { -+ t->palm.state = PALM_TYPING; -+ t->palm.time = time; -+ t->palm.first = t->point; -+ return 1; -+ } -+ -+ return 0; -+} -+ - static void - tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - { -@@ -486,13 +502,8 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - struct device_float_coords delta; - int dirs; - -- if (tp->dwt.keyboard_active && -- t->state == TOUCH_BEGIN) { -- t->palm.state = PALM_TYPING; -- t->palm.time = time; -- t->palm.first = t->point; -- return; -- } -+ if (tp_palm_detect_dwt(tp, t, time)) -+ return; - - /* If labelled a touch as palm, we unlabel as palm when - we move out of the palm edge zone within the timeout, provided --- -2.4.1 - diff --git a/0007-touchpad-add-palm-state-debugging.patch b/0007-touchpad-add-palm-state-debugging.patch deleted file mode 100644 index 4f8ef49..0000000 --- a/0007-touchpad-add-palm-state-debugging.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 09a79656a27c42699f4a9c8d97df171938e009ef Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 22 May 2015 15:14:04 +1000 -Subject: [PATCH libinput 07/10] touchpad: add palm state debugging - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -Tested-by: Benjamin Tissoires ---- - src/evdev-mt-touchpad.c | 22 ++++++++++++++++++++-- - 1 file changed, 20 insertions(+), 2 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index ad20fb9..56a70cc 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -472,8 +472,11 @@ tp_palm_tap_is_palm(struct tp_dispatch *tp, struct tp_touch *t) - - /* We're inside the left/right palm edge and in the northern half of - * the touchpad - this tap is a palm */ -- if (t->point.y < tp->palm.vert_center) -+ if (t->point.y < tp->palm.vert_center) { -+ log_debug(tp_libinput_context(tp), -+ "palm: palm-tap detected\n"); - return true; -+ } - - return false; - } -@@ -503,7 +506,7 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - int dirs; - - if (tp_palm_detect_dwt(tp, t, time)) -- return; -+ goto out; - - /* If labelled a touch as palm, we unlabel as palm when - we move out of the palm edge zone within the timeout, provided -@@ -517,6 +520,8 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - tp_normalize_delta(tp, delta)); - if ((dirs & DIRECTIONS) && !(dirs & ~DIRECTIONS)) { - t->palm.state = PALM_NONE; -+ log_debug(tp_libinput_context(tp), -+ "palm: touch released, out of edge zone\n"); - } - } - return; -@@ -538,6 +543,11 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - t->palm.state = PALM_EDGE; - t->palm.time = time; - t->palm.first = t->point; -+ -+out: -+ log_debug(tp_libinput_context(tp), -+ "palm: palm detected (%s)\n", -+ t->palm.state == PALM_EDGE ? "edge" : "typing"); - } - - static void -@@ -879,7 +889,10 @@ tp_keyboard_timeout(uint64_t now, void *data) - struct tp_dispatch *tp = data; - - tp_tap_resume(tp, now); -+ - tp->dwt.keyboard_active = false; -+ -+ log_debug(tp_libinput_context(tp), "palm: keyboard timeout\n"); - } - - static inline bool -@@ -1004,6 +1017,11 @@ tp_device_added(struct evdev_device *device, - if (added_device->tags & EVDEV_TAG_KEYBOARD && - tp->dwt.keyboard == NULL && - tp_want_dwt(device, added_device)) { -+ log_debug(tp_libinput_context(tp), -+ "palm: dwt activated with %s<->%s\n", -+ device->devname, -+ added_device->devname); -+ - libinput_device_add_event_listener(&added_device->base, - &tp->dwt.keyboard_listener, - tp_keyboard_event, tp); --- -2.4.1 - diff --git a/0008-touchpad-reset-the-touch-state-when-edge-scrolling-i.patch b/0008-touchpad-reset-the-touch-state-when-edge-scrolling-i.patch deleted file mode 100644 index 603fcaf..0000000 --- a/0008-touchpad-reset-the-touch-state-when-edge-scrolling-i.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 46bb2e4d7583fe7d6b07a3f9fd2270d1e54e2129 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 25 May 2015 11:36:34 +1000 -Subject: [PATCH libinput 08/10] touchpad: reset the touch state when edge - scrolling is stopped - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -Tested-by: Benjamin Tissoires ---- - src/evdev-mt-touchpad-edge-scroll.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c -index 9bf3f0c..f7eae9e 100644 ---- a/src/evdev-mt-touchpad-edge-scroll.c -+++ b/src/evdev-mt-touchpad-edge-scroll.c -@@ -438,6 +438,10 @@ tp_edge_scroll_stop_events(struct tp_dispatch *tp, uint64_t time) - &zero, - &zero_discrete); - t->scroll.direction = -1; -+ /* reset touch to area state, avoids loading the -+ * state machine with special case handling */ -+ t->scroll.edge = EDGE_NONE; -+ t->scroll.edge_state = EDGE_SCROLL_TOUCH_STATE_AREA; - } - } - } --- -2.4.1 - diff --git a/0009-touchpad-don-t-enable-edge-palm-detection-on-Wacom-t.patch b/0009-touchpad-don-t-enable-edge-palm-detection-on-Wacom-t.patch deleted file mode 100644 index bee74eb..0000000 --- a/0009-touchpad-don-t-enable-edge-palm-detection-on-Wacom-t.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 322d7f2302c61def6deb6c7cc7a406b4f85b880d Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 25 May 2015 16:02:56 +1000 -Subject: [PATCH libinput 09/10] touchpad: don't enable edge palm detection on - Wacom touchpads - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -Tested-by: Benjamin Tissoires ---- - src/evdev-mt-touchpad.c | 10 ++++++++-- - test/touchpad.c | 6 +++++- - 2 files changed, 13 insertions(+), 3 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 56a70cc..9a04893 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -1299,6 +1299,7 @@ tp_init_palmdetect(struct tp_dispatch *tp, - struct evdev_device *device) - { - int width, height; -+ unsigned int vendor_id; - - tp->palm.right_edge = INT_MAX; - tp->palm.left_edge = INT_MIN; -@@ -1309,8 +1310,13 @@ tp_init_palmdetect(struct tp_dispatch *tp, - height = abs(device->abs.absinfo_y->maximum - - device->abs.absinfo_y->minimum); - -- /* Apple touchpads are always big enough to warrant palm detection */ -- if (evdev_device_get_id_vendor(device) != VENDOR_ID_APPLE) { -+ vendor_id = evdev_device_get_id_vendor(device); -+ -+ /* Wacom doesn't have internal touchpads, -+ * Apple touchpads are always big enough to warrant palm detection */ -+ if (vendor_id == VENDOR_ID_WACOM) { -+ return 0; -+ } else if (vendor_id != VENDOR_ID_APPLE) { - /* We don't know how big the touchpad is */ - if (device->abs.absinfo_x->resolution == 1) - return 0; -diff --git a/test/touchpad.c b/test/touchpad.c -index 2624dda..e33d0e1 100644 ---- a/test/touchpad.c -+++ b/test/touchpad.c -@@ -2949,9 +2949,13 @@ static int - touchpad_has_palm_detect_size(struct litest_device *dev) - { - double width, height; -+ unsigned int vendor; - int rc; - -- if (libinput_device_get_id_vendor(dev->libinput_device) == ID_VENDOR_APPLE) -+ vendor = libinput_device_get_id_vendor(dev->libinput_device); -+ if (vendor == VENDOR_ID_WACOM) -+ return 0; -+ if (vendor == VENDOR_ID_APPLE) - return 1; - - rc = libinput_device_get_size(dev->libinput_device, &width, &height); --- -2.4.1 - diff --git a/0010-touchpad-touches-after-the-last-key-press-can-be-rel.patch b/0010-touchpad-touches-after-the-last-key-press-can-be-rel.patch deleted file mode 100644 index 84a866d..0000000 --- a/0010-touchpad-touches-after-the-last-key-press-can-be-rel.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 1c02bc3dc932c1df2dada0cb814e7401a23c65e8 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 21 May 2015 16:32:42 +1000 -Subject: [PATCH libinput 10/10] touchpad: touches after the last key press can - be released - -The current code labels a touch as palm if it started within the typing -timeouts. To move the pointer even after the timeout expires, a user has to -lift the finger which is quite annoying and different to the old synaptics -driver behaviour (which had a simple on/off toggle on whether to let events -through or not). - -Be smarter about this: if a touch starts _after_ the last key press event, -release it for pointer motion once the timeout expires. Touches started before -the last key press remain labelled as palms. This makes it possible to rest -the palm on the touchpad while typing without getting interference but also -provides a more responsive UI when moving from typing to using the touchpad -normally. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -Tested-by: Benjamin Tissoires ---- - doc/palm-detection.dox | 1 - - src/evdev-mt-touchpad-edge-scroll.c | 3 +++ - src/evdev-mt-touchpad.c | 24 ++++++++++++++++++++---- - src/evdev-mt-touchpad.h | 2 ++ - 4 files changed, 25 insertions(+), 5 deletions(-) - -diff --git a/doc/palm-detection.dox b/doc/palm-detection.dox -index a5b578b..7c848e3 100644 ---- a/doc/palm-detection.dox -+++ b/doc/palm-detection.dox -@@ -57,5 +57,4 @@ the palm on the touchpad while using the trackstick). - If the touchpad is disabled, the @ref t440_support "top software buttons" - remain enabled. - -- - */ -diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c -index f7eae9e..8a4d892 100644 ---- a/src/evdev-mt-touchpad-edge-scroll.c -+++ b/src/evdev-mt-touchpad-edge-scroll.c -@@ -361,6 +361,9 @@ tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time) - if (!t->dirty) - continue; - -+ if (t->palm.state != PALM_NONE) -+ continue; -+ - switch (t->scroll.edge) { - case EDGE_NONE: - if (t->scroll.direction != -1) { -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 9a04893..94a3376 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -237,6 +237,7 @@ tp_end_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - t->state = TOUCH_END; - t->pinned.is_pinned = false; - t->millis = time; -+ t->palm.time = 0; - assert(tp->nfingers_down >= 1); - tp->nfingers_down--; - tp->queued |= TOUCHPAD_EVENT_MOTION; -@@ -484,14 +485,28 @@ tp_palm_tap_is_palm(struct tp_dispatch *tp, struct tp_touch *t) - static int - tp_palm_detect_dwt(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - { -- if (!tp->dwt.keyboard_active) -- return 0; -- -- if (t->state == TOUCH_BEGIN) { -+ if (tp->dwt.keyboard_active && -+ t->state == TOUCH_BEGIN) { - t->palm.state = PALM_TYPING; - t->palm.time = time; - t->palm.first = t->point; - return 1; -+ } else if (!tp->dwt.keyboard_active && -+ t->state == TOUCH_UPDATE && -+ t->palm.state == PALM_TYPING) -+ { -+ /* If a touch has started before the first or after the last -+ key press, release it on timeout. Benefit: a palm rested -+ while typing on the touchpad will be ignored, but a touch -+ started once we stop typing will be able to control the -+ pointer (alas not tap, etc.). -+ */ -+ if (t->palm.time == 0 || -+ t->palm.time > tp->dwt.keyboard_last_press_time) { -+ t->palm.state = PALM_NONE; -+ log_debug(tp_libinput_context(tp), -+ "palm: touch released, timeout after typing\n"); -+ } - } - - return 0; -@@ -958,6 +973,7 @@ tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) - timeout = DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_2; - } - -+ tp->dwt.keyboard_last_press_time = time; - libinput_timer_set(&tp->dwt.keyboard_timer, - time + timeout); - } -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index db877c7..d086192 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -284,6 +284,8 @@ struct tp_dispatch { - struct libinput_event_listener keyboard_listener; - struct libinput_timer keyboard_timer; - struct evdev_device *keyboard; -+ -+ uint64_t keyboard_last_press_time; - } dwt; - }; - --- -2.4.1 - diff --git a/libinput.spec b/libinput.spec index 5651e2a..1dd25fe 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 0.15.0 -Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 0.16.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,24 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-touchpad-switch-from-is_palm-to-an-enum.patch -Patch02: 0002-touchpad-add-timeout-based-disable-while-typing.patch -Patch03: 0003-touchpad-use-a-two-stage-timeout-for-disable-while-t.patch - -Patch04: 0001-touchpad-move-disable-while-typing-into-its-own-stru.patch -Patch05: 0002-touchpad-extend-the-key-blacklist-for-disable-while-.patch -Patch06: 0003-touchpad-add-helper-function-to-get-from-tp-to-the-l.patch -Patch07: 0004-touchpad-only-check-keyboards-for-disable-while-typi.patch -Patch08: 0005-touchpad-be-finer-grained-about-when-to-pair-touchpa.patch -Patch09: 0006-touchpad-split-disable-while-typing-handling-into-a-.patch -Patch10: 0007-touchpad-add-palm-state-debugging.patch -Patch11: 0008-touchpad-reset-the-touch-state-when-edge-scrolling-i.patch -Patch12: 0009-touchpad-don-t-enable-edge-palm-detection-on-Wacom-t.patch -Patch13: 0010-touchpad-touches-after-the-last-key-press-can-be-rel.patch - -# Bug 1225998 - Tap-and-drag touchpad behavior not configurable -Patch14: 0001-touchpad-end-tap-and-drag-with-an-extra-tap.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -111,6 +93,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Jun 02 2015 Peter Hutterer 0.16.0-1 +- libinput 0.16.0 + * Fri May 29 2015 Peter Hutterer 0.15.0-4 - Add tap-to-end-drag patch (#1225998) diff --git a/sources b/sources index c74cc35..a3b4904 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f2e559ac926cb4afac6951e097364ab1 libinput-0.15.0.tar.xz +a5f5e1bb8eb2cd3bb9f5bd48f296def8 libinput-0.16.0.tar.xz From 8a91c2aa849c73f27ad1cd23738a70b9ad38639f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 2 Jun 2015 11:11:00 +1000 Subject: [PATCH 021/317] Handle slow motions better (#1227039) --- ...ilter-pass-last_velocity-as-argument.patch | 58 ++++++++ ...er-up-the-motion-timeout-to-1-second.patch | 34 +++++ 0003-filter-enforce-minimum-velocity.patch | 130 ++++++++++++++++++ libinput.spec | 9 +- 4 files changed, 230 insertions(+), 1 deletion(-) create mode 100644 0001-filter-pass-last_velocity-as-argument.patch create mode 100644 0002-filter-up-the-motion-timeout-to-1-second.patch create mode 100644 0003-filter-enforce-minimum-velocity.patch diff --git a/0001-filter-pass-last_velocity-as-argument.patch b/0001-filter-pass-last_velocity-as-argument.patch new file mode 100644 index 0000000..852108c --- /dev/null +++ b/0001-filter-pass-last_velocity-as-argument.patch @@ -0,0 +1,58 @@ +From 578c4e81c2606abb969972186b013f67fb152040 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 30 Apr 2015 15:23:34 +1000 +Subject: [PATCH libinput 1/3] filter: pass last_velocity as argument + +Let the caller set the various fields, here we just calculate stuff. +No functional changes. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/filter.c | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/src/filter.c b/src/filter.c +index 0cdcb63..fe86215 100644 +--- a/src/filter.c ++++ b/src/filter.c +@@ -197,17 +197,20 @@ acceleration_profile(struct pointer_accelerator *accel, + + static double + calculate_acceleration(struct pointer_accelerator *accel, +- void *data, double velocity, uint64_t time) ++ void *data, ++ double velocity, ++ double last_velocity, ++ uint64_t time) + { + double factor; + + /* Use Simpson's rule to calculate the avarage acceleration between + * the previous motion and the most recent. */ + factor = acceleration_profile(accel, data, velocity, time); +- factor += acceleration_profile(accel, data, accel->last_velocity, time); ++ factor += acceleration_profile(accel, data, last_velocity, time); + factor += 4.0 * + acceleration_profile(accel, data, +- (accel->last_velocity + velocity) / 2, ++ (last_velocity + velocity) / 2, + time); + + factor = factor / 6.0; +@@ -228,7 +231,11 @@ accelerator_filter(struct motion_filter *filter, + + feed_trackers(accel, unaccelerated, time); + velocity = calculate_velocity(accel, time); +- accel_value = calculate_acceleration(accel, data, velocity, time); ++ accel_value = calculate_acceleration(accel, ++ data, ++ velocity, ++ accel->last_velocity, ++ time); + + accelerated.x = accel_value * unaccelerated->x; + accelerated.y = accel_value * unaccelerated->y; +-- +2.4.1 + diff --git a/0002-filter-up-the-motion-timeout-to-1-second.patch b/0002-filter-up-the-motion-timeout-to-1-second.patch new file mode 100644 index 0000000..d7e9428 --- /dev/null +++ b/0002-filter-up-the-motion-timeout-to-1-second.patch @@ -0,0 +1,34 @@ +From a81051e5136aeb23ce0ed85e387ae2d9b9447faa Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 22 Apr 2015 11:46:57 +1000 +Subject: [PATCH libinput 2/3] filter: up the motion timeout to 1 second + +This timeout defines how far back in the events we search for velocity +calculations. For really slow movements, 300ms is not enough. It causes the +velocity to be 0 -> accel factor of 0 -> no movement. +As a result, really slow movement does not move the cursor. + +Up the timeout to 1 second instead. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/filter.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/filter.c b/src/filter.c +index fe86215..3845c7f 100644 +--- a/src/filter.c ++++ b/src/filter.c +@@ -78,7 +78,7 @@ filter_get_speed(struct motion_filter *filter) + */ + + #define MAX_VELOCITY_DIFF 1.0 /* units/ms */ +-#define MOTION_TIMEOUT 300 /* (ms) */ ++#define MOTION_TIMEOUT 1000 /* (ms) */ + #define NUM_POINTER_TRACKERS 16 + + struct pointer_tracker { +-- +2.4.1 + diff --git a/0003-filter-enforce-minimum-velocity.patch b/0003-filter-enforce-minimum-velocity.patch new file mode 100644 index 0000000..61b5b16 --- /dev/null +++ b/0003-filter-enforce-minimum-velocity.patch @@ -0,0 +1,130 @@ +From 289e4675c81d2fe32650295ce2b6a66a1ebb9f24 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 22 Apr 2015 12:25:13 +1000 +Subject: [PATCH libinput 3/3] filter: enforce minimum velocity + +In the current code, a timeout or direction change on the first tracker will +result in a velocity of 0. Really slow movements will thus always be zero, and +the first event after a direction is swallowed. + +Enforce a minimum velocity: +In the case of a timeout, assume the current velocity is that of +distance/timeout. In the case of a direction change, the velocity is simply +that since the last tracker. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/filter.c | 34 ++++++++++++++++++++++++++++++---- + test/touchpad.c | 10 +++++----- + 2 files changed, 35 insertions(+), 9 deletions(-) + +diff --git a/src/filter.c b/src/filter.c +index 3845c7f..c54d866 100644 +--- a/src/filter.c ++++ b/src/filter.c +@@ -144,6 +144,24 @@ calculate_tracker_velocity(struct pointer_tracker *tracker, uint64_t time) + return normalized_length(tracker->delta) / tdelta; /* units/ms */ + } + ++static inline double ++calculate_velocity_after_timeout(struct pointer_tracker *tracker) ++{ ++ /* First movement after timeout needs special handling. ++ * ++ * When we trigger the timeout, the last event is too far in the ++ * past to use it for velocity calculation across multiple tracker ++ * values. ++ * ++ * Use the motion timeout itself to calculate the speed rather than ++ * the last tracker time. This errs on the side of being too fast ++ * for really slow movements but provides much more useful initial ++ * movement in normal use-cases (pause, move, pause, move) ++ */ ++ return calculate_tracker_velocity(tracker, ++ tracker->time + MOTION_TIMEOUT); ++} ++ + static double + calculate_velocity(struct pointer_accelerator *accel, uint64_t time) + { +@@ -163,15 +181,23 @@ calculate_velocity(struct pointer_accelerator *accel, uint64_t time) + + /* Stop if too far away in time */ + if (time - tracker->time > MOTION_TIMEOUT || +- tracker->time > time) ++ tracker->time > time) { ++ if (offset == 1) ++ result = calculate_velocity_after_timeout(tracker); + break; ++ } ++ ++ velocity = calculate_tracker_velocity(tracker, time); + + /* Stop if direction changed */ + dir &= tracker->dir; +- if (dir == 0) ++ if (dir == 0) { ++ /* First movement after dirchange - velocity is that ++ * of the last movement */ ++ if (offset == 1) ++ result = velocity; + break; +- +- velocity = calculate_tracker_velocity(tracker, time); ++ } + + if (initial_velocity == 0.0) { + result = initial_velocity = velocity; +diff --git a/test/touchpad.c b/test/touchpad.c +index 5579c04..a747910 100644 +--- a/test/touchpad.c ++++ b/test/touchpad.c +@@ -2959,7 +2959,7 @@ START_TEST(touchpad_edge_scroll) + litest_touch_up(dev, 0); + + libinput_dispatch(li); +- litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 10); ++ litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 4); + litest_assert_empty_queue(li); + + litest_touch_down(dev, 0, 99, 80); +@@ -2967,7 +2967,7 @@ START_TEST(touchpad_edge_scroll) + litest_touch_up(dev, 0); + + libinput_dispatch(li); +- litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, -10); ++ litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, -4); + litest_assert_empty_queue(li); + + litest_touch_down(dev, 0, 20, 99); +@@ -2975,7 +2975,7 @@ START_TEST(touchpad_edge_scroll) + litest_touch_up(dev, 0); + + libinput_dispatch(li); +- litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, 10); ++ litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, 4); + litest_assert_empty_queue(li); + + litest_touch_down(dev, 0, 70, 99); +@@ -2983,7 +2983,7 @@ START_TEST(touchpad_edge_scroll) + litest_touch_up(dev, 0); + + libinput_dispatch(li); +- litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, -10); ++ litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, -4); + litest_assert_empty_queue(li); + } + END_TEST +@@ -3065,7 +3065,7 @@ START_TEST(touchpad_edge_scroll_no_motion) + litest_touch_up(dev, 0); + libinput_dispatch(li); + +- litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 5); ++ litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 4); + litest_assert_empty_queue(li); + } + END_TEST +-- +2.4.1 + diff --git a/libinput.spec b/libinput.spec index 1dd25fe..eb96b0b 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.16.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,10 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-filter-pass-last_velocity-as-argument.patch +Patch02: 0002-filter-up-the-motion-timeout-to-1-second.patch +Patch03: 0003-filter-enforce-minimum-velocity.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -93,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Jun 02 2015 Peter Hutterer 0.16.0-2 +- Handle slow motions better (#1227039) + * Tue Jun 02 2015 Peter Hutterer 0.16.0-1 - libinput 0.16.0 From 7427601864a6e0bc862b3433f5e224f269557457 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 2 Jun 2015 13:46:01 +1000 Subject: [PATCH 022/317] Reduce tap-n-drag timeout (#1225998) --- ...d-reduce-tap-n-drag-timeout-to-300ms.patch | 32 +++++++++++++++++++ libinput.spec | 8 ++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-reduce-tap-n-drag-timeout-to-300ms.patch diff --git a/0001-touchpad-reduce-tap-n-drag-timeout-to-300ms.patch b/0001-touchpad-reduce-tap-n-drag-timeout-to-300ms.patch new file mode 100644 index 0000000..14eed3c --- /dev/null +++ b/0001-touchpad-reduce-tap-n-drag-timeout-to-300ms.patch @@ -0,0 +1,32 @@ +From b8518f8f7c1611c58badb9d73e66d9c722849b55 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 2 Jun 2015 13:04:44 +1000 +Subject: [PATCH libinput] touchpad: reduce tap-n-drag timeout to 300ms + +The current 500ms is too long, reduce it to 300ms instead. This is still long +enough to get multiple movements but not that long that it feels like the +button is stuck. + +https://bugs.freedesktop.org/show_bug.cgi?id=90613 + +Signed-off-by: Peter Hutterer +--- + src/evdev-mt-touchpad-tap.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c +index 55b7916..b51f083 100644 +--- a/src/evdev-mt-touchpad-tap.c ++++ b/src/evdev-mt-touchpad-tap.c +@@ -37,7 +37,7 @@ + #define CASE_RETURN_STRING(a) case a: return #a + + #define DEFAULT_TAP_TIMEOUT_PERIOD 180 +-#define DEFAULT_DRAG_TIMEOUT_PERIOD 500 ++#define DEFAULT_DRAG_TIMEOUT_PERIOD 300 + #define DEFAULT_TAP_MOVE_THRESHOLD TP_MM_TO_DPI_NORMALIZED(3) + + enum tap_event { +-- +2.4.1 + diff --git a/libinput.spec b/libinput.spec index eb96b0b..e29b677 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.16.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -22,6 +22,9 @@ Patch01: 0001-filter-pass-last_velocity-as-argument.patch Patch02: 0002-filter-up-the-motion-timeout-to-1-second.patch Patch03: 0003-filter-enforce-minimum-velocity.patch +#Bug 1225998 - Tap-and-drag touchpad behavior not configurable +Patch04: 0001-touchpad-reduce-tap-n-drag-timeout-to-300ms.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -97,6 +100,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Jun 02 2015 Peter Hutterer 0.16.0-3 +- Reduce tap-n-drag timeout (#1225998) + * Tue Jun 02 2015 Peter Hutterer 0.16.0-2 - Handle slow motions better (#1227039) From 9f8c03f29fc2ccb77ecc05d95e8e83ac3c4aa862 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 2 Jun 2015 17:41:42 +1000 Subject: [PATCH 023/317] Always set the middle button as default button for button-scrolling (#1227182) --- ...ault-to-the-middle-button-for-button.patch | 46 +++++++++++++++++++ libinput.spec | 9 +++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 0001-evdev-always-default-to-the-middle-button-for-button.patch diff --git a/0001-evdev-always-default-to-the-middle-button-for-button.patch b/0001-evdev-always-default-to-the-middle-button-for-button.patch new file mode 100644 index 0000000..9aac84a --- /dev/null +++ b/0001-evdev-always-default-to-the-middle-button-for-button.patch @@ -0,0 +1,46 @@ +From 5b940e6a3f066ff25034bcf5a83278b695ad6836 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 2 Jun 2015 16:32:41 +1000 +Subject: [PATCH libinput] evdev: always default to the middle button for + button-scrolling + +The current code only defaulted to the middle button for those devices that +used button scrolling by default, requiring the user to enable button +scrolling _and_ set the button before it is active. This causes some +confusion. + +There is no real benefit to leaving the button at 0 when the scroll +method isn't enabled anyway. So always default to the middle button (if +available). + +https://bugzilla.redhat.com/show_bug.cgi?id=1227182 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev.c | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index ed1a9a3..8932b6c 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1112,14 +1112,7 @@ evdev_scroll_get_default_button(struct libinput_device *device) + { + struct evdev_device *evdev = (struct evdev_device *)device; + +- if (libevdev_has_property(evdev->evdev, INPUT_PROP_POINTING_STICK)) +- return BTN_MIDDLE; +- +- /* A device that defaults to button scrolling defaults +- to BTN_MIDDLE */ +- if (evdev_scroll_get_default_method(device) == +- LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN && +- libevdev_has_event_code(evdev->evdev, EV_KEY, BTN_MIDDLE)) ++ if( libevdev_has_event_code(evdev->evdev, EV_KEY, BTN_MIDDLE)) + return BTN_MIDDLE; + + return 0; +-- +2.4.1 + diff --git a/libinput.spec b/libinput.spec index e29b677..2c02610 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.16.0 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -25,6 +25,9 @@ Patch03: 0003-filter-enforce-minimum-velocity.patch #Bug 1225998 - Tap-and-drag touchpad behavior not configurable Patch04: 0001-touchpad-reduce-tap-n-drag-timeout-to-300ms.patch +# Bug 1227182 - Middle click pastes on button press instead of release +Patch05: 0001-evdev-always-default-to-the-middle-button-for-button.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -100,6 +103,10 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Jun 02 2015 Peter Hutterer 0.16.0-4 +- Always set the middle button as default button for button-scrolling + (#1227182) + * Tue Jun 02 2015 Peter Hutterer 0.16.0-3 - Reduce tap-n-drag timeout (#1225998) From bdcf52556f1ea9bcc724cb3d13f097ba5fd7b204 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 4 Jun 2015 11:14:42 +1000 Subject: [PATCH 024/317] libinput 0.17 --- .gitignore | 1 + ...ault-to-the-middle-button-for-button.patch | 46 ------- ...ilter-pass-last_velocity-as-argument.patch | 58 -------- ...d-reduce-tap-n-drag-timeout-to-300ms.patch | 32 ----- ...er-up-the-motion-timeout-to-1-second.patch | 34 ----- 0003-filter-enforce-minimum-velocity.patch | 130 ------------------ libinput.spec | 17 +-- sources | 2 +- 8 files changed, 7 insertions(+), 313 deletions(-) delete mode 100644 0001-evdev-always-default-to-the-middle-button-for-button.patch delete mode 100644 0001-filter-pass-last_velocity-as-argument.patch delete mode 100644 0001-touchpad-reduce-tap-n-drag-timeout-to-300ms.patch delete mode 100644 0002-filter-up-the-motion-timeout-to-1-second.patch delete mode 100644 0003-filter-enforce-minimum-velocity.patch diff --git a/.gitignore b/.gitignore index e7994c6..4a380fa 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /libinput-0.14.1.tar.xz /libinput-0.15.0.tar.xz /libinput-0.16.0.tar.xz +/libinput-0.17.0.tar.xz diff --git a/0001-evdev-always-default-to-the-middle-button-for-button.patch b/0001-evdev-always-default-to-the-middle-button-for-button.patch deleted file mode 100644 index 9aac84a..0000000 --- a/0001-evdev-always-default-to-the-middle-button-for-button.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 5b940e6a3f066ff25034bcf5a83278b695ad6836 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 2 Jun 2015 16:32:41 +1000 -Subject: [PATCH libinput] evdev: always default to the middle button for - button-scrolling - -The current code only defaulted to the middle button for those devices that -used button scrolling by default, requiring the user to enable button -scrolling _and_ set the button before it is active. This causes some -confusion. - -There is no real benefit to leaving the button at 0 when the scroll -method isn't enabled anyway. So always default to the middle button (if -available). - -https://bugzilla.redhat.com/show_bug.cgi?id=1227182 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev.c | 9 +-------- - 1 file changed, 1 insertion(+), 8 deletions(-) - -diff --git a/src/evdev.c b/src/evdev.c -index ed1a9a3..8932b6c 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1112,14 +1112,7 @@ evdev_scroll_get_default_button(struct libinput_device *device) - { - struct evdev_device *evdev = (struct evdev_device *)device; - -- if (libevdev_has_property(evdev->evdev, INPUT_PROP_POINTING_STICK)) -- return BTN_MIDDLE; -- -- /* A device that defaults to button scrolling defaults -- to BTN_MIDDLE */ -- if (evdev_scroll_get_default_method(device) == -- LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN && -- libevdev_has_event_code(evdev->evdev, EV_KEY, BTN_MIDDLE)) -+ if( libevdev_has_event_code(evdev->evdev, EV_KEY, BTN_MIDDLE)) - return BTN_MIDDLE; - - return 0; --- -2.4.1 - diff --git a/0001-filter-pass-last_velocity-as-argument.patch b/0001-filter-pass-last_velocity-as-argument.patch deleted file mode 100644 index 852108c..0000000 --- a/0001-filter-pass-last_velocity-as-argument.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 578c4e81c2606abb969972186b013f67fb152040 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 30 Apr 2015 15:23:34 +1000 -Subject: [PATCH libinput 1/3] filter: pass last_velocity as argument - -Let the caller set the various fields, here we just calculate stuff. -No functional changes. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/filter.c | 15 +++++++++++---- - 1 file changed, 11 insertions(+), 4 deletions(-) - -diff --git a/src/filter.c b/src/filter.c -index 0cdcb63..fe86215 100644 ---- a/src/filter.c -+++ b/src/filter.c -@@ -197,17 +197,20 @@ acceleration_profile(struct pointer_accelerator *accel, - - static double - calculate_acceleration(struct pointer_accelerator *accel, -- void *data, double velocity, uint64_t time) -+ void *data, -+ double velocity, -+ double last_velocity, -+ uint64_t time) - { - double factor; - - /* Use Simpson's rule to calculate the avarage acceleration between - * the previous motion and the most recent. */ - factor = acceleration_profile(accel, data, velocity, time); -- factor += acceleration_profile(accel, data, accel->last_velocity, time); -+ factor += acceleration_profile(accel, data, last_velocity, time); - factor += 4.0 * - acceleration_profile(accel, data, -- (accel->last_velocity + velocity) / 2, -+ (last_velocity + velocity) / 2, - time); - - factor = factor / 6.0; -@@ -228,7 +231,11 @@ accelerator_filter(struct motion_filter *filter, - - feed_trackers(accel, unaccelerated, time); - velocity = calculate_velocity(accel, time); -- accel_value = calculate_acceleration(accel, data, velocity, time); -+ accel_value = calculate_acceleration(accel, -+ data, -+ velocity, -+ accel->last_velocity, -+ time); - - accelerated.x = accel_value * unaccelerated->x; - accelerated.y = accel_value * unaccelerated->y; --- -2.4.1 - diff --git a/0001-touchpad-reduce-tap-n-drag-timeout-to-300ms.patch b/0001-touchpad-reduce-tap-n-drag-timeout-to-300ms.patch deleted file mode 100644 index 14eed3c..0000000 --- a/0001-touchpad-reduce-tap-n-drag-timeout-to-300ms.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b8518f8f7c1611c58badb9d73e66d9c722849b55 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 2 Jun 2015 13:04:44 +1000 -Subject: [PATCH libinput] touchpad: reduce tap-n-drag timeout to 300ms - -The current 500ms is too long, reduce it to 300ms instead. This is still long -enough to get multiple movements but not that long that it feels like the -button is stuck. - -https://bugs.freedesktop.org/show_bug.cgi?id=90613 - -Signed-off-by: Peter Hutterer ---- - src/evdev-mt-touchpad-tap.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c -index 55b7916..b51f083 100644 ---- a/src/evdev-mt-touchpad-tap.c -+++ b/src/evdev-mt-touchpad-tap.c -@@ -37,7 +37,7 @@ - #define CASE_RETURN_STRING(a) case a: return #a - - #define DEFAULT_TAP_TIMEOUT_PERIOD 180 --#define DEFAULT_DRAG_TIMEOUT_PERIOD 500 -+#define DEFAULT_DRAG_TIMEOUT_PERIOD 300 - #define DEFAULT_TAP_MOVE_THRESHOLD TP_MM_TO_DPI_NORMALIZED(3) - - enum tap_event { --- -2.4.1 - diff --git a/0002-filter-up-the-motion-timeout-to-1-second.patch b/0002-filter-up-the-motion-timeout-to-1-second.patch deleted file mode 100644 index d7e9428..0000000 --- a/0002-filter-up-the-motion-timeout-to-1-second.patch +++ /dev/null @@ -1,34 +0,0 @@ -From a81051e5136aeb23ce0ed85e387ae2d9b9447faa Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 22 Apr 2015 11:46:57 +1000 -Subject: [PATCH libinput 2/3] filter: up the motion timeout to 1 second - -This timeout defines how far back in the events we search for velocity -calculations. For really slow movements, 300ms is not enough. It causes the -velocity to be 0 -> accel factor of 0 -> no movement. -As a result, really slow movement does not move the cursor. - -Up the timeout to 1 second instead. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/filter.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/filter.c b/src/filter.c -index fe86215..3845c7f 100644 ---- a/src/filter.c -+++ b/src/filter.c -@@ -78,7 +78,7 @@ filter_get_speed(struct motion_filter *filter) - */ - - #define MAX_VELOCITY_DIFF 1.0 /* units/ms */ --#define MOTION_TIMEOUT 300 /* (ms) */ -+#define MOTION_TIMEOUT 1000 /* (ms) */ - #define NUM_POINTER_TRACKERS 16 - - struct pointer_tracker { --- -2.4.1 - diff --git a/0003-filter-enforce-minimum-velocity.patch b/0003-filter-enforce-minimum-velocity.patch deleted file mode 100644 index 61b5b16..0000000 --- a/0003-filter-enforce-minimum-velocity.patch +++ /dev/null @@ -1,130 +0,0 @@ -From 289e4675c81d2fe32650295ce2b6a66a1ebb9f24 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 22 Apr 2015 12:25:13 +1000 -Subject: [PATCH libinput 3/3] filter: enforce minimum velocity - -In the current code, a timeout or direction change on the first tracker will -result in a velocity of 0. Really slow movements will thus always be zero, and -the first event after a direction is swallowed. - -Enforce a minimum velocity: -In the case of a timeout, assume the current velocity is that of -distance/timeout. In the case of a direction change, the velocity is simply -that since the last tracker. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/filter.c | 34 ++++++++++++++++++++++++++++++---- - test/touchpad.c | 10 +++++----- - 2 files changed, 35 insertions(+), 9 deletions(-) - -diff --git a/src/filter.c b/src/filter.c -index 3845c7f..c54d866 100644 ---- a/src/filter.c -+++ b/src/filter.c -@@ -144,6 +144,24 @@ calculate_tracker_velocity(struct pointer_tracker *tracker, uint64_t time) - return normalized_length(tracker->delta) / tdelta; /* units/ms */ - } - -+static inline double -+calculate_velocity_after_timeout(struct pointer_tracker *tracker) -+{ -+ /* First movement after timeout needs special handling. -+ * -+ * When we trigger the timeout, the last event is too far in the -+ * past to use it for velocity calculation across multiple tracker -+ * values. -+ * -+ * Use the motion timeout itself to calculate the speed rather than -+ * the last tracker time. This errs on the side of being too fast -+ * for really slow movements but provides much more useful initial -+ * movement in normal use-cases (pause, move, pause, move) -+ */ -+ return calculate_tracker_velocity(tracker, -+ tracker->time + MOTION_TIMEOUT); -+} -+ - static double - calculate_velocity(struct pointer_accelerator *accel, uint64_t time) - { -@@ -163,15 +181,23 @@ calculate_velocity(struct pointer_accelerator *accel, uint64_t time) - - /* Stop if too far away in time */ - if (time - tracker->time > MOTION_TIMEOUT || -- tracker->time > time) -+ tracker->time > time) { -+ if (offset == 1) -+ result = calculate_velocity_after_timeout(tracker); - break; -+ } -+ -+ velocity = calculate_tracker_velocity(tracker, time); - - /* Stop if direction changed */ - dir &= tracker->dir; -- if (dir == 0) -+ if (dir == 0) { -+ /* First movement after dirchange - velocity is that -+ * of the last movement */ -+ if (offset == 1) -+ result = velocity; - break; -- -- velocity = calculate_tracker_velocity(tracker, time); -+ } - - if (initial_velocity == 0.0) { - result = initial_velocity = velocity; -diff --git a/test/touchpad.c b/test/touchpad.c -index 5579c04..a747910 100644 ---- a/test/touchpad.c -+++ b/test/touchpad.c -@@ -2959,7 +2959,7 @@ START_TEST(touchpad_edge_scroll) - litest_touch_up(dev, 0); - - libinput_dispatch(li); -- litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 10); -+ litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 4); - litest_assert_empty_queue(li); - - litest_touch_down(dev, 0, 99, 80); -@@ -2967,7 +2967,7 @@ START_TEST(touchpad_edge_scroll) - litest_touch_up(dev, 0); - - libinput_dispatch(li); -- litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, -10); -+ litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, -4); - litest_assert_empty_queue(li); - - litest_touch_down(dev, 0, 20, 99); -@@ -2975,7 +2975,7 @@ START_TEST(touchpad_edge_scroll) - litest_touch_up(dev, 0); - - libinput_dispatch(li); -- litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, 10); -+ litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, 4); - litest_assert_empty_queue(li); - - litest_touch_down(dev, 0, 70, 99); -@@ -2983,7 +2983,7 @@ START_TEST(touchpad_edge_scroll) - litest_touch_up(dev, 0); - - libinput_dispatch(li); -- litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, -10); -+ litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, -4); - litest_assert_empty_queue(li); - } - END_TEST -@@ -3065,7 +3065,7 @@ START_TEST(touchpad_edge_scroll_no_motion) - litest_touch_up(dev, 0); - libinput_dispatch(li); - -- litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 5); -+ litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 4); - litest_assert_empty_queue(li); - } - END_TEST --- -2.4.1 - diff --git a/libinput.spec b/libinput.spec index 2c02610..91d21dc 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 0.16.0 -Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 0.17.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,16 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-filter-pass-last_velocity-as-argument.patch -Patch02: 0002-filter-up-the-motion-timeout-to-1-second.patch -Patch03: 0003-filter-enforce-minimum-velocity.patch - -#Bug 1225998 - Tap-and-drag touchpad behavior not configurable -Patch04: 0001-touchpad-reduce-tap-n-drag-timeout-to-300ms.patch - -# Bug 1227182 - Middle click pastes on button press instead of release -Patch05: 0001-evdev-always-default-to-the-middle-button-for-button.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -103,6 +93,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Jun 04 2015 Peter Hutterer 0.17.0-1 +- libinput 0.17 + * Tue Jun 02 2015 Peter Hutterer 0.16.0-4 - Always set the middle button as default button for button-scrolling (#1227182) diff --git a/sources b/sources index a3b4904..52f7d52 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a5f5e1bb8eb2cd3bb9f5bd48f296def8 libinput-0.16.0.tar.xz +57f3d86cbf8e97dd312fbc54d59a2c02 libinput-0.17.0.tar.xz From 4d3b8a54fee2fe15bbf9c11538d14feee4dff823 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 9 Jun 2015 09:18:48 +1000 Subject: [PATCH 025/317] Cap the minimum acceleration slowdown at 0.3 (#1227796) --- ...e-minimum-acceleration-factor-of-0.3.patch | 52 +++++++++++++++++++ libinput.spec | 7 ++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 0001-filter-require-minimum-acceleration-factor-of-0.3.patch diff --git a/0001-filter-require-minimum-acceleration-factor-of-0.3.patch b/0001-filter-require-minimum-acceleration-factor-of-0.3.patch new file mode 100644 index 0000000..e9e28a1 --- /dev/null +++ b/0001-filter-require-minimum-acceleration-factor-of-0.3.patch @@ -0,0 +1,52 @@ +From f6313a9d010f03a66fd1f68e0bbd5e073101f342 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 4 Jun 2015 11:40:15 +1000 +Subject: [PATCH libinput] filter: require minimum acceleration factor of 0.3 + +For really slow motions, the previous acceleration factor would go down to +effectively zero. So the slower the mouse motion was, the more it would be +slowed down which made the mouse at low speeds almost unusable. + +Cap the minimum acceleration at 0.3 which provides a predictable slow motion +for the cursor when high precision is required. + +New/old acceleration functions comparison: + + ^ + | / + | / +ty| _________/ + | / / + | / / + | / / + |/ / <----- new minimum accel factor + | / + |/___________________> + tx + +i.e. the general shape is maintained, but it doesn't go to zero anymore. The +functions aren't parallel, the new shape is slightly flatter than the previous +one and they meet at the point where the functions flatten for the threshold +(tx/ty). ascii art has its limits... + +Signed-off-by: Peter Hutterer +--- + src/filter.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/filter.c b/src/filter.c +index c54d866..ed5a184 100644 +--- a/src/filter.c ++++ b/src/filter.c +@@ -354,7 +354,7 @@ pointer_accel_profile_linear(struct motion_filter *filter, + const double threshold = accel_filter->threshold; /* units/ms */ + const double incline = accel_filter->incline; + +- s1 = min(1, speed_in * 5); ++ s1 = min(1, 0.3 + speed_in * 4); + s2 = 1 + (speed_in - threshold) * incline; + + return min(max_accel, s2 > 1 ? s2 : s1); +-- +2.4.1 + diff --git a/libinput.spec b/libinput.spec index 91d21dc..05c3fa8 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.17.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-filter-require-minimum-acceleration-factor-of-0.3.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -93,6 +95,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Jun 09 2015 Peter Hutterer 0.17.0-2 +- Cap the minimum acceleration slowdown at 0.3 (#1227796) + * Thu Jun 04 2015 Peter Hutterer 0.17.0-1 - libinput 0.17 From be67c6dad6103a01071d869a11b1f33cf3731802 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 12 Jun 2015 15:01:05 +1000 Subject: [PATCH 026/317] Require udev.pc for the build --- libinput.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 05c3fa8..db41e08 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.17.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -25,6 +25,7 @@ BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel BuildRequires: libudev-devel BuildRequires: mtdev-devel +BuildRequires: pkgconfig(udev) %description libinput is a library that handles input devices for display servers and other @@ -95,6 +96,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Jun 12 2015 Peter Hutterer 0.17.0-3 +- Require udev.pc for the build + * Tue Jun 09 2015 Peter Hutterer 0.17.0-2 - Cap the minimum acceleration slowdown at 0.3 (#1227796) From 9d9abc12d407a7776fbd6a60880ee38115b5835f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Jun 2015 13:36:06 +1000 Subject: [PATCH 027/317] Avoid erroneous finger movement after a physical click (#1230441) --- ...-touchpad-fix-pinned-finger-drifting.patch | 32 +++ ...-finger-pin-distance-to-5mm-where-po.patch | 194 ++++++++++++++++++ libinput.spec | 7 +- 3 files changed, 232 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-fix-pinned-finger-drifting.patch create mode 100644 0001-touchpad-set-the-finger-pin-distance-to-5mm-where-po.patch diff --git a/0001-touchpad-fix-pinned-finger-drifting.patch b/0001-touchpad-fix-pinned-finger-drifting.patch new file mode 100644 index 0000000..9b5af82 --- /dev/null +++ b/0001-touchpad-fix-pinned-finger-drifting.patch @@ -0,0 +1,32 @@ +From b48ecd186d8fb707e89bf04036a48600dc49125f Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 12 Jun 2015 17:24:33 +1000 +Subject: [PATCH libinput] touchpad: fix pinned finger drifting + +This caused the finger to be unpinned on the first motion event after the +click, effectively disabling this feature. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index c82d733..ce79530 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -440,8 +440,8 @@ tp_unpin_finger(struct tp_dispatch *tp, struct tp_touch *t) + } + + /* The finger may slowly drift, adjust the center */ +- t->pinned.center.x = t->point.x + t->pinned.center.x / 2; +- t->pinned.center.y = t->point.y + t->pinned.center.y / 2; ++ t->pinned.center.x = (t->point.x + t->pinned.center.x)/2; ++ t->pinned.center.y = (t->point.y + t->pinned.center.y)/2; + } + + static void +-- +2.4.3 + diff --git a/0001-touchpad-set-the-finger-pin-distance-to-5mm-where-po.patch b/0001-touchpad-set-the-finger-pin-distance-to-5mm-where-po.patch new file mode 100644 index 0000000..2257a8e --- /dev/null +++ b/0001-touchpad-set-the-finger-pin-distance-to-5mm-where-po.patch @@ -0,0 +1,194 @@ +From 8025b374d564f4a30b089e5cf6fd65e0c6af8da2 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 12 Jun 2015 17:29:41 +1000 +Subject: [PATCH libinput] touchpad: set the finger pin distance to 5mm where + possible + +On touchpads with resolutions, use a 5mm motion threshold before we unpin the +finger (allow motion events while a clickpad button is down). This should +remove any erroneous finger movements while clicking, at the cost of having to +move the finger a bit more for a single-finger click-and-drag (use two fingers +already!) + +And drop the finger drifting, it was per-event based rather than time-based. +So unless the motion threshold was hit in a single event it was possible to +move the finger around the whole touchpad without ever unpinning it. + +Drop the finger drifting altogether, if the touchpad drifts by more than 5mm +we have other issues. + +https://bugzilla.redhat.com/show_bug.cgi?id=1230462 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad-buttons.c | 19 ++++++++++------ + src/evdev-mt-touchpad.c | 10 ++++----- + src/evdev-mt-touchpad.h | 5 ++++- + src/libinput-util.h | 6 ++++++ + test/touchpad.c | 48 +++++++++++++++++++++++++++++++++++++++++ + 5 files changed, 75 insertions(+), 13 deletions(-) + +diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c +index 5786ea8..eb0ddcb 100644 +--- a/src/evdev-mt-touchpad-buttons.c ++++ b/src/evdev-mt-touchpad-buttons.c +@@ -31,7 +31,6 @@ + + #include "evdev-mt-touchpad.h" + +-#define DEFAULT_BUTTON_MOTION_THRESHOLD 0.02 /* 2% of size */ + #define DEFAULT_BUTTON_ENTER_TIMEOUT 100 /* ms */ + #define DEFAULT_BUTTON_LEAVE_TIMEOUT 300 /* ms */ + +@@ -709,11 +708,19 @@ tp_init_buttons(struct tp_dispatch *tp, + absinfo_x = device->abs.absinfo_x; + absinfo_y = device->abs.absinfo_y; + +- width = abs(absinfo_x->maximum - absinfo_x->minimum); +- height = abs(absinfo_y->maximum - absinfo_y->minimum); +- diagonal = sqrt(width*width + height*height); +- +- tp->buttons.motion_dist = diagonal * DEFAULT_BUTTON_MOTION_THRESHOLD; ++ /* pinned-finger motion threshold, see tp_unpin_finger. ++ The MAGIC for resolution-less touchpads ends up as 2% of the diagonal */ ++ if (device->abs.fake_resolution) { ++ const int BUTTON_MOTION_MAGIC = 0.007; ++ width = abs(absinfo_x->maximum - absinfo_x->minimum); ++ height = abs(absinfo_y->maximum - absinfo_y->minimum); ++ diagonal = sqrt(width*width + height*height); ++ tp->buttons.motion_dist.x_scale_coeff = diagonal * BUTTON_MOTION_MAGIC; ++ tp->buttons.motion_dist.y_scale_coeff = diagonal * BUTTON_MOTION_MAGIC; ++ } else { ++ tp->buttons.motion_dist.x_scale_coeff = 1.0/absinfo_x->resolution; ++ tp->buttons.motion_dist.y_scale_coeff = 1.0/absinfo_y->resolution; ++ } + + tp->buttons.config_method.get_methods = tp_button_config_click_get_methods; + tp->buttons.config_method.set_method = tp_button_config_click_set_method; +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index ce79530..6f11599 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -431,17 +431,15 @@ tp_unpin_finger(struct tp_dispatch *tp, struct tp_touch *t) + return; + + xdist = abs(t->point.x - t->pinned.center.x); ++ xdist *= tp->buttons.motion_dist.x_scale_coeff; + ydist = abs(t->point.y - t->pinned.center.y); ++ ydist *= tp->buttons.motion_dist.y_scale_coeff; + +- if (xdist * xdist + ydist * ydist >= +- tp->buttons.motion_dist * tp->buttons.motion_dist) { ++ /* 3mm movement -> unpin */ ++ if (vector_length(xdist, ydist) >= 3.0) { + t->pinned.is_pinned = false; + return; + } +- +- /* The finger may slowly drift, adjust the center */ +- t->pinned.center.x = (t->point.x + t->pinned.center.x)/2; +- t->pinned.center.y = (t->point.y + t->pinned.center.y)/2; + } + + static void +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index fef5cb3..bd2d163 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -223,7 +223,10 @@ struct tp_dispatch { + bool click_pending; + uint32_t state; + uint32_t old_state; +- uint32_t motion_dist; /* for pinned touches */ ++ struct { ++ double x_scale_coeff; ++ double y_scale_coeff; ++ } motion_dist; /* for pinned touches */ + unsigned int active; /* currently active button, for release event */ + bool active_is_topbutton; /* is active a top button? */ + +diff --git a/src/libinput-util.h b/src/libinput-util.h +index 910406c..224e4b6 100644 +--- a/src/libinput-util.h ++++ b/src/libinput-util.h +@@ -284,4 +284,10 @@ int parse_mouse_dpi_property(const char *prop); + int parse_mouse_wheel_click_angle_property(const char *prop); + double parse_trackpoint_accel_property(const char *prop); + ++static inline double ++vector_length(double x, double y) ++{ ++ return sqrt(x * x + y * y); ++} ++ + #endif /* LIBINPUT_UTIL_H */ +diff --git a/test/touchpad.c b/test/touchpad.c +index 692698c..1e5e97b 100644 +--- a/test/touchpad.c ++++ b/test/touchpad.c +@@ -2153,6 +2153,53 @@ START_TEST(clickpad_click_n_drag) + } + END_TEST + ++START_TEST(clickpad_finger_pin) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput *li = dev->libinput; ++ struct libevdev *evdev = dev->evdev; ++ const struct input_absinfo *abs; ++ ++ abs = libevdev_get_abs_info(evdev, ABS_MT_POSITION_X); ++ ck_assert_notnull(abs); ++ if (abs->resolution == 0) ++ return; ++ ++ litest_drain_events(li); ++ ++ /* make sure the movement generates pointer events when ++ not pinned */ ++ litest_touch_down(dev, 0, 50, 50); ++ litest_touch_move_to(dev, 0, 50, 50, 52, 52, 10, 1); ++ litest_touch_move_to(dev, 0, 52, 52, 48, 48, 10, 1); ++ litest_touch_move_to(dev, 0, 48, 48, 50, 50, 10, 1); ++ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); ++ ++ litest_button_click(dev, BTN_LEFT, true); ++ litest_drain_events(li); ++ ++ litest_touch_move_to(dev, 0, 50, 50, 52, 52, 10, 1); ++ litest_touch_move_to(dev, 0, 52, 52, 48, 48, 10, 1); ++ litest_touch_move_to(dev, 0, 48, 48, 50, 50, 10, 1); ++ ++ litest_assert_empty_queue(li); ++ ++ litest_button_click(dev, BTN_LEFT, false); ++ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_BUTTON); ++ ++ /* still pinned after release */ ++ litest_touch_move_to(dev, 0, 50, 50, 52, 52, 10, 1); ++ litest_touch_move_to(dev, 0, 52, 52, 48, 48, 10, 1); ++ litest_touch_move_to(dev, 0, 48, 48, 50, 50, 10, 1); ++ ++ litest_assert_empty_queue(li); ++ ++ /* move to unpin */ ++ litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10, 1); ++ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); ++} ++END_TEST ++ + START_TEST(clickpad_softbutton_left) + { + struct litest_device *dev = litest_current_device(); +@@ -5144,6 +5191,7 @@ litest_setup_tests(void) + litest_add("touchpad:click", touchpad_btn_left, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_CLICKPAD); + litest_add("touchpad:click", clickpad_btn_left, LITEST_CLICKPAD, LITEST_ANY); + litest_add("touchpad:click", clickpad_click_n_drag, LITEST_CLICKPAD, LITEST_SINGLE_TOUCH); ++ litest_add("touchpad:click", clickpad_finger_pin, LITEST_CLICKPAD, LITEST_ANY); + + litest_add("touchpad:softbutton", clickpad_softbutton_left, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD); + litest_add("touchpad:softbutton", clickpad_softbutton_right, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD); +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index db41e08..6a1b39c 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.17.0 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -19,6 +19,8 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} %endif Patch01: 0001-filter-require-minimum-acceleration-factor-of-0.3.patch +Patch02: 0001-touchpad-fix-pinned-finger-drifting.patch +Patch03: 0001-touchpad-set-the-finger-pin-distance-to-5mm-where-po.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -96,6 +98,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Jun 16 2015 Peter Hutterer 0.17.0-4 +- Avoid erroneous finger movement after a physical click (#1230441) + * Fri Jun 12 2015 Peter Hutterer 0.17.0-3 - Require udev.pc for the build From 5003f6ebc2769d027ac2ddcbc46ac1747e79ea92 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Jun 2015 17:08:39 +1000 Subject: [PATCH 028/317] Use physical values for the hystersis where possible (#1230462) - Disable right-edge palm detection when edge scrolling is active (fdo#90980) --- ...-right-edge-palm-detection-for-edge-.patch | 101 ++++++++++++++++++ ...e-hysteresis-dependent-on-physical-d.patch | 52 +++++++++ libinput.spec | 9 +- 3 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-disable-right-edge-palm-detection-for-edge-.patch create mode 100644 0001-touchpad-make-the-hysteresis-dependent-on-physical-d.patch diff --git a/0001-touchpad-disable-right-edge-palm-detection-for-edge-.patch b/0001-touchpad-disable-right-edge-palm-detection-for-edge-.patch new file mode 100644 index 0000000..ff00b31 --- /dev/null +++ b/0001-touchpad-disable-right-edge-palm-detection-for-edge-.patch @@ -0,0 +1,101 @@ +From cd701f2d75a48e3bfc1e28cb087d7ddb607f60ba Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 16 Jun 2015 15:39:48 +1000 +Subject: [PATCH libinput] touchpad: disable right-edge palm detection for edge + scrolling + +Most scroll motions would be labelled a palm. + +https://bugs.freedesktop.org/show_bug.cgi?id=90980 + +Signed-off-by: Peter Hutterer +--- + src/evdev-mt-touchpad-edge-scroll.c | 2 +- + src/evdev-mt-touchpad.c | 3 +++ + src/evdev-mt-touchpad.h | 3 +++ + test/touchpad.c | 21 +++++++++++++++++++++ + 4 files changed, 28 insertions(+), 1 deletion(-) + +diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c +index f5cfa9d..56f1e8a 100644 +--- a/src/evdev-mt-touchpad-edge-scroll.c ++++ b/src/evdev-mt-touchpad-edge-scroll.c +@@ -75,7 +75,7 @@ edge_event_to_str(enum scroll_event event) + return NULL; + } + +-static uint32_t ++uint32_t + tp_touch_get_edge(struct tp_dispatch *tp, struct tp_touch *t) + { + uint32_t edge = EDGE_NONE; +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 293760d..356f9b9 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -558,6 +558,9 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + tp_button_is_inside_softbutton_area(tp, t)) + return; + ++ if (tp_touch_get_edge(tp, t) & EDGE_RIGHT) ++ return; ++ + t->palm.state = PALM_EDGE; + t->palm.time = time; + t->palm.first = t->point; +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index 04610af..9357969 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -399,6 +399,9 @@ tp_edge_scroll_stop_events(struct tp_dispatch *tp, uint64_t time); + int + tp_edge_scroll_touch_active(struct tp_dispatch *tp, struct tp_touch *t); + ++uint32_t ++tp_touch_get_edge(struct tp_dispatch *tp, struct tp_touch *t); ++ + int + tp_init_gesture(struct tp_dispatch *tp); + +diff --git a/test/touchpad.c b/test/touchpad.c +index 8e68597..d6e3cf2 100644 +--- a/test/touchpad.c ++++ b/test/touchpad.c +@@ -3330,6 +3330,26 @@ START_TEST(touchpad_palm_detect_at_edge) + } + END_TEST + ++START_TEST(touchpad_no_palm_detect_at_edge_for_edge_scrolling) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput *li = dev->libinput; ++ ++ if (!touchpad_has_palm_detect_size(dev)) ++ return; ++ ++ enable_edge_scroll(dev); ++ ++ litest_drain_events(li); ++ ++ litest_touch_down(dev, 0, 99, 50); ++ litest_touch_move_to(dev, 0, 99, 50, 99, 70, 5, 0); ++ litest_touch_up(dev, 0); ++ ++ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); ++} ++END_TEST ++ + START_TEST(touchpad_palm_detect_at_bottom_corners) + { + struct litest_device *dev = litest_current_device(); +@@ -5232,6 +5252,7 @@ litest_setup_tests(void) + litest_add("touchpad:palm", touchpad_palm_detect_palm_stays_palm, LITEST_TOUCHPAD, LITEST_ANY); + litest_add("touchpad:palm", touchpad_palm_detect_no_palm_moving_into_edges, LITEST_TOUCHPAD, LITEST_ANY); + litest_add("touchpad:palm", touchpad_palm_detect_tap, LITEST_TOUCHPAD, LITEST_ANY); ++ litest_add("touchpad:palm", touchpad_no_palm_detect_at_edge_for_edge_scrolling, LITEST_TOUCHPAD, LITEST_CLICKPAD); + + litest_add("touchpad:left-handed", touchpad_left_handed, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_CLICKPAD); + litest_add("touchpad:left-handed", touchpad_left_handed_clickpad, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD); +-- +2.4.3 + diff --git a/0001-touchpad-make-the-hysteresis-dependent-on-physical-d.patch b/0001-touchpad-make-the-hysteresis-dependent-on-physical-d.patch new file mode 100644 index 0000000..cc76ca6 --- /dev/null +++ b/0001-touchpad-make-the-hysteresis-dependent-on-physical-d.patch @@ -0,0 +1,52 @@ +From f13fbc96e84b2bb78bb61886d79aaaeaf8a9b4a1 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 11 Jun 2015 16:31:00 +1000 +Subject: [PATCH libinput] touchpad: make the hysteresis dependent on physical + distance + +Some touchpads, e.g. the Cyapa in the Acer c720 have a small axis range +([0, 870], [0, 470]), so the diagonal/magic value yields a hysteresis margin +of 1 device unit. On that device, that's one-tenth of a millimeter, causing +pointer motion just by holding the finger. + +For touchpads that provide a physical resolution, set the hysteresis axes to +0.5mm and do away with the magic factor. + +https://bugzilla.redhat.com/show_bug.cgi?id=1230441 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad.c | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 34cc85d..c82d733 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1492,10 +1492,18 @@ tp_init(struct tp_dispatch *tp, + EV_ABS, + ABS_MT_DISTANCE); + +- tp->hysteresis_margin.x = +- diagonal / DEFAULT_HYSTERESIS_MARGIN_DENOMINATOR; +- tp->hysteresis_margin.y = +- diagonal / DEFAULT_HYSTERESIS_MARGIN_DENOMINATOR; ++ if (device->abs.fake_resolution) { ++ tp->hysteresis_margin.x = ++ diagonal / DEFAULT_HYSTERESIS_MARGIN_DENOMINATOR; ++ tp->hysteresis_margin.y = ++ diagonal / DEFAULT_HYSTERESIS_MARGIN_DENOMINATOR; ++ } else { ++ int res_x = tp->device->abs.absinfo_x->resolution, ++ res_y = tp->device->abs.absinfo_y->resolution; ++ ++ tp->hysteresis_margin.x = res_x/2; ++ tp->hysteresis_margin.y = res_y/2; ++ } + + if (tp_init_accel(tp, diagonal) != 0) + return -1; +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index 6a1b39c..3f120e5 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.17.0 -Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 5%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,6 +21,8 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} Patch01: 0001-filter-require-minimum-acceleration-factor-of-0.3.patch Patch02: 0001-touchpad-fix-pinned-finger-drifting.patch Patch03: 0001-touchpad-set-the-finger-pin-distance-to-5mm-where-po.patch +Patch04: 0001-touchpad-disable-right-edge-palm-detection-for-edge-.patch +Patch05: 0001-touchpad-make-the-hysteresis-dependent-on-physical-d.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -98,6 +100,11 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Jun 16 2015 Peter Hutterer 0.17.0-5 +- Use physical values for the hystersis where possible (#1230462) +- Disable right-edge palm detection when edge scrolling is active + (fdo#90980) + * Tue Jun 16 2015 Peter Hutterer 0.17.0-4 - Avoid erroneous finger movement after a physical click (#1230441) From 911bbb8421aaf06a822f1777f70045875ced157e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 22 Jun 2015 14:59:12 +1000 Subject: [PATCH 029/317] libinput 0.18.0 --- .gitignore | 1 + ...e-minimum-acceleration-factor-of-0.3.patch | 52 ----- ...-right-edge-palm-detection-for-edge-.patch | 101 --------- ...-touchpad-fix-pinned-finger-drifting.patch | 32 --- ...e-hysteresis-dependent-on-physical-d.patch | 52 ----- ...-finger-pin-distance-to-5mm-where-po.patch | 194 ------------------ libinput.spec | 13 +- sources | 2 +- 8 files changed, 7 insertions(+), 440 deletions(-) delete mode 100644 0001-filter-require-minimum-acceleration-factor-of-0.3.patch delete mode 100644 0001-touchpad-disable-right-edge-palm-detection-for-edge-.patch delete mode 100644 0001-touchpad-fix-pinned-finger-drifting.patch delete mode 100644 0001-touchpad-make-the-hysteresis-dependent-on-physical-d.patch delete mode 100644 0001-touchpad-set-the-finger-pin-distance-to-5mm-where-po.patch diff --git a/.gitignore b/.gitignore index 4a380fa..fcf5e63 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /libinput-0.15.0.tar.xz /libinput-0.16.0.tar.xz /libinput-0.17.0.tar.xz +/libinput-0.18.0.tar.xz diff --git a/0001-filter-require-minimum-acceleration-factor-of-0.3.patch b/0001-filter-require-minimum-acceleration-factor-of-0.3.patch deleted file mode 100644 index e9e28a1..0000000 --- a/0001-filter-require-minimum-acceleration-factor-of-0.3.patch +++ /dev/null @@ -1,52 +0,0 @@ -From f6313a9d010f03a66fd1f68e0bbd5e073101f342 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 4 Jun 2015 11:40:15 +1000 -Subject: [PATCH libinput] filter: require minimum acceleration factor of 0.3 - -For really slow motions, the previous acceleration factor would go down to -effectively zero. So the slower the mouse motion was, the more it would be -slowed down which made the mouse at low speeds almost unusable. - -Cap the minimum acceleration at 0.3 which provides a predictable slow motion -for the cursor when high precision is required. - -New/old acceleration functions comparison: - - ^ - | / - | / -ty| _________/ - | / / - | / / - | / / - |/ / <----- new minimum accel factor - | / - |/___________________> - tx - -i.e. the general shape is maintained, but it doesn't go to zero anymore. The -functions aren't parallel, the new shape is slightly flatter than the previous -one and they meet at the point where the functions flatten for the threshold -(tx/ty). ascii art has its limits... - -Signed-off-by: Peter Hutterer ---- - src/filter.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/filter.c b/src/filter.c -index c54d866..ed5a184 100644 ---- a/src/filter.c -+++ b/src/filter.c -@@ -354,7 +354,7 @@ pointer_accel_profile_linear(struct motion_filter *filter, - const double threshold = accel_filter->threshold; /* units/ms */ - const double incline = accel_filter->incline; - -- s1 = min(1, speed_in * 5); -+ s1 = min(1, 0.3 + speed_in * 4); - s2 = 1 + (speed_in - threshold) * incline; - - return min(max_accel, s2 > 1 ? s2 : s1); --- -2.4.1 - diff --git a/0001-touchpad-disable-right-edge-palm-detection-for-edge-.patch b/0001-touchpad-disable-right-edge-palm-detection-for-edge-.patch deleted file mode 100644 index ff00b31..0000000 --- a/0001-touchpad-disable-right-edge-palm-detection-for-edge-.patch +++ /dev/null @@ -1,101 +0,0 @@ -From cd701f2d75a48e3bfc1e28cb087d7ddb607f60ba Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 16 Jun 2015 15:39:48 +1000 -Subject: [PATCH libinput] touchpad: disable right-edge palm detection for edge - scrolling - -Most scroll motions would be labelled a palm. - -https://bugs.freedesktop.org/show_bug.cgi?id=90980 - -Signed-off-by: Peter Hutterer ---- - src/evdev-mt-touchpad-edge-scroll.c | 2 +- - src/evdev-mt-touchpad.c | 3 +++ - src/evdev-mt-touchpad.h | 3 +++ - test/touchpad.c | 21 +++++++++++++++++++++ - 4 files changed, 28 insertions(+), 1 deletion(-) - -diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c -index f5cfa9d..56f1e8a 100644 ---- a/src/evdev-mt-touchpad-edge-scroll.c -+++ b/src/evdev-mt-touchpad-edge-scroll.c -@@ -75,7 +75,7 @@ edge_event_to_str(enum scroll_event event) - return NULL; - } - --static uint32_t -+uint32_t - tp_touch_get_edge(struct tp_dispatch *tp, struct tp_touch *t) - { - uint32_t edge = EDGE_NONE; -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 293760d..356f9b9 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -558,6 +558,9 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - tp_button_is_inside_softbutton_area(tp, t)) - return; - -+ if (tp_touch_get_edge(tp, t) & EDGE_RIGHT) -+ return; -+ - t->palm.state = PALM_EDGE; - t->palm.time = time; - t->palm.first = t->point; -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index 04610af..9357969 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -399,6 +399,9 @@ tp_edge_scroll_stop_events(struct tp_dispatch *tp, uint64_t time); - int - tp_edge_scroll_touch_active(struct tp_dispatch *tp, struct tp_touch *t); - -+uint32_t -+tp_touch_get_edge(struct tp_dispatch *tp, struct tp_touch *t); -+ - int - tp_init_gesture(struct tp_dispatch *tp); - -diff --git a/test/touchpad.c b/test/touchpad.c -index 8e68597..d6e3cf2 100644 ---- a/test/touchpad.c -+++ b/test/touchpad.c -@@ -3330,6 +3330,26 @@ START_TEST(touchpad_palm_detect_at_edge) - } - END_TEST - -+START_TEST(touchpad_no_palm_detect_at_edge_for_edge_scrolling) -+{ -+ struct litest_device *dev = litest_current_device(); -+ struct libinput *li = dev->libinput; -+ -+ if (!touchpad_has_palm_detect_size(dev)) -+ return; -+ -+ enable_edge_scroll(dev); -+ -+ litest_drain_events(li); -+ -+ litest_touch_down(dev, 0, 99, 50); -+ litest_touch_move_to(dev, 0, 99, 50, 99, 70, 5, 0); -+ litest_touch_up(dev, 0); -+ -+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); -+} -+END_TEST -+ - START_TEST(touchpad_palm_detect_at_bottom_corners) - { - struct litest_device *dev = litest_current_device(); -@@ -5232,6 +5252,7 @@ litest_setup_tests(void) - litest_add("touchpad:palm", touchpad_palm_detect_palm_stays_palm, LITEST_TOUCHPAD, LITEST_ANY); - litest_add("touchpad:palm", touchpad_palm_detect_no_palm_moving_into_edges, LITEST_TOUCHPAD, LITEST_ANY); - litest_add("touchpad:palm", touchpad_palm_detect_tap, LITEST_TOUCHPAD, LITEST_ANY); -+ litest_add("touchpad:palm", touchpad_no_palm_detect_at_edge_for_edge_scrolling, LITEST_TOUCHPAD, LITEST_CLICKPAD); - - litest_add("touchpad:left-handed", touchpad_left_handed, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_CLICKPAD); - litest_add("touchpad:left-handed", touchpad_left_handed_clickpad, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD); --- -2.4.3 - diff --git a/0001-touchpad-fix-pinned-finger-drifting.patch b/0001-touchpad-fix-pinned-finger-drifting.patch deleted file mode 100644 index 9b5af82..0000000 --- a/0001-touchpad-fix-pinned-finger-drifting.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b48ecd186d8fb707e89bf04036a48600dc49125f Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 12 Jun 2015 17:24:33 +1000 -Subject: [PATCH libinput] touchpad: fix pinned finger drifting - -This caused the finger to be unpinned on the first motion event after the -click, effectively disabling this feature. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index c82d733..ce79530 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -440,8 +440,8 @@ tp_unpin_finger(struct tp_dispatch *tp, struct tp_touch *t) - } - - /* The finger may slowly drift, adjust the center */ -- t->pinned.center.x = t->point.x + t->pinned.center.x / 2; -- t->pinned.center.y = t->point.y + t->pinned.center.y / 2; -+ t->pinned.center.x = (t->point.x + t->pinned.center.x)/2; -+ t->pinned.center.y = (t->point.y + t->pinned.center.y)/2; - } - - static void --- -2.4.3 - diff --git a/0001-touchpad-make-the-hysteresis-dependent-on-physical-d.patch b/0001-touchpad-make-the-hysteresis-dependent-on-physical-d.patch deleted file mode 100644 index cc76ca6..0000000 --- a/0001-touchpad-make-the-hysteresis-dependent-on-physical-d.patch +++ /dev/null @@ -1,52 +0,0 @@ -From f13fbc96e84b2bb78bb61886d79aaaeaf8a9b4a1 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 11 Jun 2015 16:31:00 +1000 -Subject: [PATCH libinput] touchpad: make the hysteresis dependent on physical - distance - -Some touchpads, e.g. the Cyapa in the Acer c720 have a small axis range -([0, 870], [0, 470]), so the diagonal/magic value yields a hysteresis margin -of 1 device unit. On that device, that's one-tenth of a millimeter, causing -pointer motion just by holding the finger. - -For touchpads that provide a physical resolution, set the hysteresis axes to -0.5mm and do away with the magic factor. - -https://bugzilla.redhat.com/show_bug.cgi?id=1230441 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad.c | 16 ++++++++++++---- - 1 file changed, 12 insertions(+), 4 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 34cc85d..c82d733 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -1492,10 +1492,18 @@ tp_init(struct tp_dispatch *tp, - EV_ABS, - ABS_MT_DISTANCE); - -- tp->hysteresis_margin.x = -- diagonal / DEFAULT_HYSTERESIS_MARGIN_DENOMINATOR; -- tp->hysteresis_margin.y = -- diagonal / DEFAULT_HYSTERESIS_MARGIN_DENOMINATOR; -+ if (device->abs.fake_resolution) { -+ tp->hysteresis_margin.x = -+ diagonal / DEFAULT_HYSTERESIS_MARGIN_DENOMINATOR; -+ tp->hysteresis_margin.y = -+ diagonal / DEFAULT_HYSTERESIS_MARGIN_DENOMINATOR; -+ } else { -+ int res_x = tp->device->abs.absinfo_x->resolution, -+ res_y = tp->device->abs.absinfo_y->resolution; -+ -+ tp->hysteresis_margin.x = res_x/2; -+ tp->hysteresis_margin.y = res_y/2; -+ } - - if (tp_init_accel(tp, diagonal) != 0) - return -1; --- -2.4.3 - diff --git a/0001-touchpad-set-the-finger-pin-distance-to-5mm-where-po.patch b/0001-touchpad-set-the-finger-pin-distance-to-5mm-where-po.patch deleted file mode 100644 index 2257a8e..0000000 --- a/0001-touchpad-set-the-finger-pin-distance-to-5mm-where-po.patch +++ /dev/null @@ -1,194 +0,0 @@ -From 8025b374d564f4a30b089e5cf6fd65e0c6af8da2 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 12 Jun 2015 17:29:41 +1000 -Subject: [PATCH libinput] touchpad: set the finger pin distance to 5mm where - possible - -On touchpads with resolutions, use a 5mm motion threshold before we unpin the -finger (allow motion events while a clickpad button is down). This should -remove any erroneous finger movements while clicking, at the cost of having to -move the finger a bit more for a single-finger click-and-drag (use two fingers -already!) - -And drop the finger drifting, it was per-event based rather than time-based. -So unless the motion threshold was hit in a single event it was possible to -move the finger around the whole touchpad without ever unpinning it. - -Drop the finger drifting altogether, if the touchpad drifts by more than 5mm -we have other issues. - -https://bugzilla.redhat.com/show_bug.cgi?id=1230462 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad-buttons.c | 19 ++++++++++------ - src/evdev-mt-touchpad.c | 10 ++++----- - src/evdev-mt-touchpad.h | 5 ++++- - src/libinput-util.h | 6 ++++++ - test/touchpad.c | 48 +++++++++++++++++++++++++++++++++++++++++ - 5 files changed, 75 insertions(+), 13 deletions(-) - -diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c -index 5786ea8..eb0ddcb 100644 ---- a/src/evdev-mt-touchpad-buttons.c -+++ b/src/evdev-mt-touchpad-buttons.c -@@ -31,7 +31,6 @@ - - #include "evdev-mt-touchpad.h" - --#define DEFAULT_BUTTON_MOTION_THRESHOLD 0.02 /* 2% of size */ - #define DEFAULT_BUTTON_ENTER_TIMEOUT 100 /* ms */ - #define DEFAULT_BUTTON_LEAVE_TIMEOUT 300 /* ms */ - -@@ -709,11 +708,19 @@ tp_init_buttons(struct tp_dispatch *tp, - absinfo_x = device->abs.absinfo_x; - absinfo_y = device->abs.absinfo_y; - -- width = abs(absinfo_x->maximum - absinfo_x->minimum); -- height = abs(absinfo_y->maximum - absinfo_y->minimum); -- diagonal = sqrt(width*width + height*height); -- -- tp->buttons.motion_dist = diagonal * DEFAULT_BUTTON_MOTION_THRESHOLD; -+ /* pinned-finger motion threshold, see tp_unpin_finger. -+ The MAGIC for resolution-less touchpads ends up as 2% of the diagonal */ -+ if (device->abs.fake_resolution) { -+ const int BUTTON_MOTION_MAGIC = 0.007; -+ width = abs(absinfo_x->maximum - absinfo_x->minimum); -+ height = abs(absinfo_y->maximum - absinfo_y->minimum); -+ diagonal = sqrt(width*width + height*height); -+ tp->buttons.motion_dist.x_scale_coeff = diagonal * BUTTON_MOTION_MAGIC; -+ tp->buttons.motion_dist.y_scale_coeff = diagonal * BUTTON_MOTION_MAGIC; -+ } else { -+ tp->buttons.motion_dist.x_scale_coeff = 1.0/absinfo_x->resolution; -+ tp->buttons.motion_dist.y_scale_coeff = 1.0/absinfo_y->resolution; -+ } - - tp->buttons.config_method.get_methods = tp_button_config_click_get_methods; - tp->buttons.config_method.set_method = tp_button_config_click_set_method; -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index ce79530..6f11599 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -431,17 +431,15 @@ tp_unpin_finger(struct tp_dispatch *tp, struct tp_touch *t) - return; - - xdist = abs(t->point.x - t->pinned.center.x); -+ xdist *= tp->buttons.motion_dist.x_scale_coeff; - ydist = abs(t->point.y - t->pinned.center.y); -+ ydist *= tp->buttons.motion_dist.y_scale_coeff; - -- if (xdist * xdist + ydist * ydist >= -- tp->buttons.motion_dist * tp->buttons.motion_dist) { -+ /* 3mm movement -> unpin */ -+ if (vector_length(xdist, ydist) >= 3.0) { - t->pinned.is_pinned = false; - return; - } -- -- /* The finger may slowly drift, adjust the center */ -- t->pinned.center.x = (t->point.x + t->pinned.center.x)/2; -- t->pinned.center.y = (t->point.y + t->pinned.center.y)/2; - } - - static void -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index fef5cb3..bd2d163 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -223,7 +223,10 @@ struct tp_dispatch { - bool click_pending; - uint32_t state; - uint32_t old_state; -- uint32_t motion_dist; /* for pinned touches */ -+ struct { -+ double x_scale_coeff; -+ double y_scale_coeff; -+ } motion_dist; /* for pinned touches */ - unsigned int active; /* currently active button, for release event */ - bool active_is_topbutton; /* is active a top button? */ - -diff --git a/src/libinput-util.h b/src/libinput-util.h -index 910406c..224e4b6 100644 ---- a/src/libinput-util.h -+++ b/src/libinput-util.h -@@ -284,4 +284,10 @@ int parse_mouse_dpi_property(const char *prop); - int parse_mouse_wheel_click_angle_property(const char *prop); - double parse_trackpoint_accel_property(const char *prop); - -+static inline double -+vector_length(double x, double y) -+{ -+ return sqrt(x * x + y * y); -+} -+ - #endif /* LIBINPUT_UTIL_H */ -diff --git a/test/touchpad.c b/test/touchpad.c -index 692698c..1e5e97b 100644 ---- a/test/touchpad.c -+++ b/test/touchpad.c -@@ -2153,6 +2153,53 @@ START_TEST(clickpad_click_n_drag) - } - END_TEST - -+START_TEST(clickpad_finger_pin) -+{ -+ struct litest_device *dev = litest_current_device(); -+ struct libinput *li = dev->libinput; -+ struct libevdev *evdev = dev->evdev; -+ const struct input_absinfo *abs; -+ -+ abs = libevdev_get_abs_info(evdev, ABS_MT_POSITION_X); -+ ck_assert_notnull(abs); -+ if (abs->resolution == 0) -+ return; -+ -+ litest_drain_events(li); -+ -+ /* make sure the movement generates pointer events when -+ not pinned */ -+ litest_touch_down(dev, 0, 50, 50); -+ litest_touch_move_to(dev, 0, 50, 50, 52, 52, 10, 1); -+ litest_touch_move_to(dev, 0, 52, 52, 48, 48, 10, 1); -+ litest_touch_move_to(dev, 0, 48, 48, 50, 50, 10, 1); -+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); -+ -+ litest_button_click(dev, BTN_LEFT, true); -+ litest_drain_events(li); -+ -+ litest_touch_move_to(dev, 0, 50, 50, 52, 52, 10, 1); -+ litest_touch_move_to(dev, 0, 52, 52, 48, 48, 10, 1); -+ litest_touch_move_to(dev, 0, 48, 48, 50, 50, 10, 1); -+ -+ litest_assert_empty_queue(li); -+ -+ litest_button_click(dev, BTN_LEFT, false); -+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_BUTTON); -+ -+ /* still pinned after release */ -+ litest_touch_move_to(dev, 0, 50, 50, 52, 52, 10, 1); -+ litest_touch_move_to(dev, 0, 52, 52, 48, 48, 10, 1); -+ litest_touch_move_to(dev, 0, 48, 48, 50, 50, 10, 1); -+ -+ litest_assert_empty_queue(li); -+ -+ /* move to unpin */ -+ litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10, 1); -+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); -+} -+END_TEST -+ - START_TEST(clickpad_softbutton_left) - { - struct litest_device *dev = litest_current_device(); -@@ -5144,6 +5191,7 @@ litest_setup_tests(void) - litest_add("touchpad:click", touchpad_btn_left, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_CLICKPAD); - litest_add("touchpad:click", clickpad_btn_left, LITEST_CLICKPAD, LITEST_ANY); - litest_add("touchpad:click", clickpad_click_n_drag, LITEST_CLICKPAD, LITEST_SINGLE_TOUCH); -+ litest_add("touchpad:click", clickpad_finger_pin, LITEST_CLICKPAD, LITEST_ANY); - - litest_add("touchpad:softbutton", clickpad_softbutton_left, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD); - litest_add("touchpad:softbutton", clickpad_softbutton_right, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD); --- -2.4.3 - diff --git a/libinput.spec b/libinput.spec index 3f120e5..db8e8f3 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 0.17.0 -Release: 5%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 0.18.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,12 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-filter-require-minimum-acceleration-factor-of-0.3.patch -Patch02: 0001-touchpad-fix-pinned-finger-drifting.patch -Patch03: 0001-touchpad-set-the-finger-pin-distance-to-5mm-where-po.patch -Patch04: 0001-touchpad-disable-right-edge-palm-detection-for-edge-.patch -Patch05: 0001-touchpad-make-the-hysteresis-dependent-on-physical-d.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -100,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Jun 22 2015 Peter Hutterer 0.18.0-1 +- libinput 0.18.0 + * Tue Jun 16 2015 Peter Hutterer 0.17.0-5 - Use physical values for the hystersis where possible (#1230462) - Disable right-edge palm detection when edge scrolling is active diff --git a/sources b/sources index 52f7d52..e53a1aa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -57f3d86cbf8e97dd312fbc54d59a2c02 libinput-0.17.0.tar.xz +0ddbb0d53d58dec0a86de6791560011a libinput-0.18.0.tar.xz From 40ac43332d0db2bb9c44682d07f42ddee708f1b2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 24 Jun 2015 13:43:00 +1000 Subject: [PATCH 030/317] Fix initial jump during edge scrolling --- ...nd-most-recent-edge-delta-when-trigg.patch | 51 +++++++++++++++++++ ...-edge-scroll-motion-threshold-to-3mm.patch | 31 +++++++++++ libinput.spec | 8 ++- 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-only-send-most-recent-edge-delta-when-trigg.patch create mode 100644 0001-touchpad-reduce-edge-scroll-motion-threshold-to-3mm.patch diff --git a/0001-touchpad-only-send-most-recent-edge-delta-when-trigg.patch b/0001-touchpad-only-send-most-recent-edge-delta-when-trigg.patch new file mode 100644 index 0000000..dea0021 --- /dev/null +++ b/0001-touchpad-only-send-most-recent-edge-delta-when-trigg.patch @@ -0,0 +1,51 @@ +From f783dae0a70e660f8fc0175b4a702bd3f9953d7d Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 19 Jun 2015 09:21:58 +1000 +Subject: [PATCH libinput] touchpad: only send most recent edge delta when + triggering threshold + +When edge scrolling is triggered by exceeding the motion threshold (5mm) we +sent the whole delta as the first scroll event, causing a big jump. + +Instead, send only the current delta. This effectively introduces a 5mm dead +zone when edge scrolling, still better than the jump. + +https://bugs.freedesktop.org/show_bug.cgi?id=90990 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad-edge-scroll.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c +index 56f1e8a..992a169 100644 +--- a/src/evdev-mt-touchpad-edge-scroll.c ++++ b/src/evdev-mt-touchpad-edge-scroll.c +@@ -353,7 +353,7 @@ tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time) + struct tp_touch *t; + enum libinput_pointer_axis axis; + double *delta; +- struct normalized_coords normalized; ++ struct normalized_coords normalized, tmp; + const struct normalized_coords zero = { 0.0, 0.0 }; + const struct discrete_coords zero_discrete = { 0.0, 0.0 }; + +@@ -402,11 +402,14 @@ tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time) + t->scroll.edge_state); + break; + case EDGE_SCROLL_TOUCH_STATE_EDGE_NEW: ++ tmp = normalized; + normalized = tp_normalize_delta(tp, + device_delta(t->point, + t->scroll.initial)); + if (fabs(*delta) < DEFAULT_SCROLL_THRESHOLD) + normalized = zero; ++ else ++ normalized = tmp; + break; + case EDGE_SCROLL_TOUCH_STATE_EDGE: + break; +-- +2.4.3 + diff --git a/0001-touchpad-reduce-edge-scroll-motion-threshold-to-3mm.patch b/0001-touchpad-reduce-edge-scroll-motion-threshold-to-3mm.patch new file mode 100644 index 0000000..5158ba2 --- /dev/null +++ b/0001-touchpad-reduce-edge-scroll-motion-threshold-to-3mm.patch @@ -0,0 +1,31 @@ +From abc8c0d6c29ce60275ff8a35fc7bdbbf6407969b Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 19 Jun 2015 10:11:13 +1000 +Subject: [PATCH libinput] touchpad: reduce edge scroll motion threshold to 3mm + +Reduce the dead zone/initial jump + +https://bugs.freedesktop.org/show_bug.cgi?id=90990 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad-edge-scroll.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c +index 992a169..6bfef90 100644 +--- a/src/evdev-mt-touchpad-edge-scroll.c ++++ b/src/evdev-mt-touchpad-edge-scroll.c +@@ -39,7 +39,7 @@ + avoid accidentally locking in scrolling mode when trying to use the entire + touchpad to move the pointer. The user can wait for the timeout to trigger + to do a small scroll. */ +-#define DEFAULT_SCROLL_THRESHOLD TP_MM_TO_DPI_NORMALIZED(5) ++#define DEFAULT_SCROLL_THRESHOLD TP_MM_TO_DPI_NORMALIZED(3) + + enum scroll_event { + SCROLL_EVENT_TOUCH, +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index db8e8f3..06fc6f8 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.18.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,9 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-touchpad-only-send-most-recent-edge-delta-when-trigg.patch +Patch02: 0001-touchpad-reduce-edge-scroll-motion-threshold-to-3mm.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -94,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Jun 24 2015 Peter Hutterer 0.18.0-2 +- Fix initial jump during edge scrolling + * Mon Jun 22 2015 Peter Hutterer 0.18.0-1 - libinput 0.18.0 From a50ef2a58cff3b2da88df51765a626cdd42beca0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 25 Jun 2015 12:46:49 +1000 Subject: [PATCH 031/317] Fix stuck finger after a clickpad click on resolutionless touchpads --- ...chpad-fix-stuck-finger-after-a-click.patch | 52 +++++++++++++++++++ libinput.spec | 6 ++- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-fix-stuck-finger-after-a-click.patch diff --git a/0001-touchpad-fix-stuck-finger-after-a-click.patch b/0001-touchpad-fix-stuck-finger-after-a-click.patch new file mode 100644 index 0000000..2cae2c9 --- /dev/null +++ b/0001-touchpad-fix-stuck-finger-after-a-click.patch @@ -0,0 +1,52 @@ +From 56264a6ff624afc39935a744d5fd40f0ae969a52 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 25 Jun 2015 12:20:04 +1000 +Subject: [PATCH libinput] touchpad: fix stuck finger after a click + +On a touchpad without resolution, the pinned finger was stuck. The motion +distance scale factor ended up as 0 and the finger never reached the threshold +of 3mm. +int was not the best choice of datatype for a value of 0.007... + +Fix the data types for xdist/ydist at the same time, clamping to int may cause +erroneous (un)pinning. + +Introduced in 8025b374d564f4a30b089e5cf6fd65e0c6af8da2 + +https://bugs.freedesktop.org/show_bug.cgi?id=91070 + +Signed-off-by: Peter Hutterer +--- + src/evdev-mt-touchpad-buttons.c | 2 +- + src/evdev-mt-touchpad.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c +index 8d4e278..6abf9d5 100644 +--- a/src/evdev-mt-touchpad-buttons.c ++++ b/src/evdev-mt-touchpad-buttons.c +@@ -741,7 +741,7 @@ tp_init_buttons(struct tp_dispatch *tp, + /* pinned-finger motion threshold, see tp_unpin_finger. + The MAGIC for resolution-less touchpads ends up as 2% of the diagonal */ + if (device->abs.fake_resolution) { +- const int BUTTON_MOTION_MAGIC = 0.007; ++ const double BUTTON_MOTION_MAGIC = 0.007; + width = abs(absinfo_x->maximum - absinfo_x->minimum); + height = abs(absinfo_y->maximum - absinfo_y->minimum); + diagonal = sqrt(width*width + height*height); +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 9e60f46..4666870 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -426,7 +426,7 @@ tp_process_key(struct tp_dispatch *tp, + static void + tp_unpin_finger(struct tp_dispatch *tp, struct tp_touch *t) + { +- unsigned int xdist, ydist; ++ double xdist, ydist; + + if (!t->pinned.is_pinned) + return; +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index 06fc6f8..8cafea1 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.18.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -20,6 +20,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} Patch01: 0001-touchpad-only-send-most-recent-edge-delta-when-trigg.patch Patch02: 0001-touchpad-reduce-edge-scroll-motion-threshold-to-3mm.patch +Patch03: 0001-touchpad-fix-stuck-finger-after-a-click.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -97,6 +98,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Jun 25 2015 Peter Hutterer 0.18.0-3 +- Fix stuck finger after a clickpad click on resolutionless touchpads + * Wed Jun 24 2015 Peter Hutterer 0.18.0-2 - Fix initial jump during edge scrolling From 7eb3526873933fb2c75148d7a213128baaee7533 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 29 Jun 2015 11:19:32 +1000 Subject: [PATCH 032/317] Steepen deceleration curve to get better 1:1 movement on slow speeds (#1231304) - Provide custom accel method for <1000dpi mice (#1227039) --- ...-deceleration-to-minimal-speeds-only.patch | 40 +++ ...ad-dpi-before-evdev_configure_device.patch | 37 +++ ...vdev-log-device-s-DPI-setting-if-any.patch | 30 ++ ...ng-a-trackpoint-scroll-event-into-a-.patch | 59 ++++ ...-the-accelerated-deltas-in-ptraccel-.patch | 40 +++ ...-a-tmp-variable-for-the-accel-factor.patch | 35 +++ ...ormalization-of-unaccelerated-deltas.patch | 289 ++++++++++++++++++ ...s-the-DPI-to-the-acceleration-filter.patch | 122 ++++++++ ...er-add-a-custom-low-dpi-acceleration.patch | 170 +++++++++++ libinput.spec | 19 +- 10 files changed, 840 insertions(+), 1 deletion(-) create mode 100644 0001-filter-reduce-deceleration-to-minimal-speeds-only.patch create mode 100644 0002-evdev-read-dpi-before-evdev_configure_device.patch create mode 100644 0003-evdev-log-device-s-DPI-setting-if-any.patch create mode 100644 0004-evdev-move-posting-a-trackpoint-scroll-event-into-a-.patch create mode 100644 0005-tools-don-t-drop-the-accelerated-deltas-in-ptraccel-.patch create mode 100644 0006-filter-use-a-tmp-variable-for-the-accel-factor.patch create mode 100644 0007-Drop-motion-normalization-of-unaccelerated-deltas.patch create mode 100644 0008-filter-pass-the-DPI-to-the-acceleration-filter.patch create mode 100644 0009-filter-add-a-custom-low-dpi-acceleration.patch diff --git a/0001-filter-reduce-deceleration-to-minimal-speeds-only.patch b/0001-filter-reduce-deceleration-to-minimal-speeds-only.patch new file mode 100644 index 0000000..a0f77b0 --- /dev/null +++ b/0001-filter-reduce-deceleration-to-minimal-speeds-only.patch @@ -0,0 +1,40 @@ +From 6984628d6acf4695c24261c094def44ff37337be Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 12 Jun 2015 15:31:56 +1000 +Subject: [PATCH libinput 1/9] filter: reduce deceleration to minimal speeds + only + +Deceleration at low speeds is intended to enhance precision when moving the +pointer slowly. However, the adaptive deceleration we used was badly +calibrated, at slow-but-normal speeds the pointer became too slow to manouver. + +We don't want to drop deceleration completely, the subpixel precision it +provides is useful. And it also helps those that can't move a 1000dpi mouse by +exactly one unit. + +Make the adaptive deceleration steeper so it only kicks in at extremely slow +motions and defaults to 1 at anything resembling normal movement (i.e. pointer +moves like the physical device does). + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/filter.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/filter.c b/src/filter.c +index a4142e9..69f78b1 100644 +--- a/src/filter.c ++++ b/src/filter.c +@@ -386,7 +386,7 @@ pointer_accel_profile_linear(struct motion_filter *filter, + const double threshold = accel_filter->threshold; /* units/ms */ + const double incline = accel_filter->incline; + +- s1 = min(1, 0.3 + speed_in * 4); ++ s1 = min(1, 0.3 + speed_in * 10); + s2 = 1 + (speed_in - threshold) * incline; + + return min(max_accel, s2 > 1 ? s2 : s1); +-- +2.4.3 + diff --git a/0002-evdev-read-dpi-before-evdev_configure_device.patch b/0002-evdev-read-dpi-before-evdev_configure_device.patch new file mode 100644 index 0000000..6721db6 --- /dev/null +++ b/0002-evdev-read-dpi-before-evdev_configure_device.patch @@ -0,0 +1,37 @@ +From d1639c88ce2a710ab9b771766f473a72b66100db Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 19 Jun 2015 16:01:34 +1000 +Subject: [PATCH libinput 2/9] evdev: read dpi before evdev_configure_device + +So we can use to set up accel during evdev_configure_device. + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index 7e1e5c8..2644b76 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -2083,6 +2083,8 @@ evdev_device_create(struct libinput_seat *seat, + device->scroll.wheel_click_angle = + evdev_read_wheel_click_prop(device); + device->model = evdev_read_model(device); ++ device->dpi = evdev_read_dpi_prop(device); ++ + /* at most 5 SYN_DROPPED log-messages per 30s */ + ratelimit_init(&device->syn_drop_limit, 30ULL * 1000, 5); + +@@ -2093,8 +2095,6 @@ evdev_device_create(struct libinput_seat *seat, + if (evdev_configure_device(device) == -1) + goto err; + +- device->dpi = evdev_read_dpi_prop(device); +- + if (device->seat_caps == 0) { + unhandled_device = 1; + goto err; +-- +2.4.3 + diff --git a/0003-evdev-log-device-s-DPI-setting-if-any.patch b/0003-evdev-log-device-s-DPI-setting-if-any.patch new file mode 100644 index 0000000..481f5d7 --- /dev/null +++ b/0003-evdev-log-device-s-DPI-setting-if-any.patch @@ -0,0 +1,30 @@ +From 6dbfd81e26a9adff5b07398ff7e588683e3e6bf6 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 23 Jun 2015 12:41:57 +1000 +Subject: [PATCH libinput 3/9] evdev: log device's DPI setting if any + +Makes debugging things easier. + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/evdev.c b/src/evdev.c +index 2644b76..67843db 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1496,6 +1496,10 @@ evdev_read_dpi_prop(struct evdev_device *device) + DEFAULT_MOUSE_DPI); + dpi = DEFAULT_MOUSE_DPI; + } ++ log_info(libinput, ++ "Device '%s' set to %d DPI\n", ++ device->devname, ++ dpi); + } + + return dpi; +-- +2.4.3 + diff --git a/0004-evdev-move-posting-a-trackpoint-scroll-event-into-a-.patch b/0004-evdev-move-posting-a-trackpoint-scroll-event-into-a-.patch new file mode 100644 index 0000000..aca4114 --- /dev/null +++ b/0004-evdev-move-posting-a-trackpoint-scroll-event-into-a-.patch @@ -0,0 +1,59 @@ +From f9503763adbaef8fc7220e2da782917cea8803ee Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 26 Jun 2015 09:27:20 +1000 +Subject: [PATCH libinput 4/9] evdev: move posting a trackpoint scroll event + into a helper + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 27 +++++++++++++++++++-------- + 1 file changed, 19 insertions(+), 8 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index 67843db..b2595d4 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -253,6 +253,23 @@ normalize_delta(struct evdev_device *device, + normalized->y = delta->y * DEFAULT_MOUSE_DPI / (double)device->dpi; + } + ++static inline bool ++evdev_post_trackpoint_scroll(struct evdev_device *device, ++ struct normalized_coords unaccel, ++ uint64_t time) ++{ ++ if (device->scroll.method != LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN || ++ !hw_is_key_down(device, device->scroll.button)) ++ return false; ++ ++ if (device->scroll.button_scroll_active) ++ evdev_post_scroll(device, time, ++ LIBINPUT_POINTER_AXIS_SOURCE_CONTINUOUS, ++ &unaccel); ++ ++ return true; ++} ++ + static void + evdev_flush_pending_event(struct evdev_device *device, uint64_t time) + { +@@ -275,14 +292,8 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time) + device->rel.y = 0; + + /* Use unaccelerated deltas for pointing stick scroll */ +- if (device->scroll.method == LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN && +- hw_is_key_down(device, device->scroll.button)) { +- if (device->scroll.button_scroll_active) +- evdev_post_scroll(device, time, +- LIBINPUT_POINTER_AXIS_SOURCE_CONTINUOUS, +- &unaccel); +- break; +- } ++ if (evdev_post_trackpoint_scroll(device, unaccel, time)) ++ break; + + /* Apply pointer acceleration. */ + accel = filter_dispatch(device->pointer.filter, +-- +2.4.3 + diff --git a/0005-tools-don-t-drop-the-accelerated-deltas-in-ptraccel-.patch b/0005-tools-don-t-drop-the-accelerated-deltas-in-ptraccel-.patch new file mode 100644 index 0000000..f91623f --- /dev/null +++ b/0005-tools-don-t-drop-the-accelerated-deltas-in-ptraccel-.patch @@ -0,0 +1,40 @@ +From 03a02107c597fd1b3e738002431c35bb2057b7ce Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 26 Jun 2015 10:00:24 +1000 +Subject: [PATCH libinput 5/9] tools: don't drop the accelerated deltas in + ptraccel-debug + +Leftover from the initial (out-of-tree) implementation where we updated motion +in place. That hasn't been true since libinput switched to type-safe +coordinates. + +Signed-off-by: Peter Hutterer +--- + tools/ptraccel-debug.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/ptraccel-debug.c b/tools/ptraccel-debug.c +index 8b800ee..335781b 100644 +--- a/tools/ptraccel-debug.c ++++ b/tools/ptraccel-debug.c +@@ -95,7 +95,7 @@ print_ptraccel_movement(struct motion_filter *filter, + motion.y = 0; + time += 12; /* pretend 80Hz data */ + +- filter_dispatch(filter, &motion, NULL, time); ++ motion = filter_dispatch(filter, &motion, NULL, time); + + printf("%d %.3f %.3f\n", i, motion.x, dx); + +@@ -129,7 +129,7 @@ print_ptraccel_sequence(struct motion_filter *filter, + motion.y = 0; + time += 12; /* pretend 80Hz data */ + +- filter_dispatch(filter, &motion, NULL, time); ++ motion = filter_dispatch(filter, &motion, NULL, time); + + printf("%d %.3f %.3f\n", i, motion.x, *dx); + } +-- +2.4.3 + diff --git a/0006-filter-use-a-tmp-variable-for-the-accel-factor.patch b/0006-filter-use-a-tmp-variable-for-the-accel-factor.patch new file mode 100644 index 0000000..440a5d3 --- /dev/null +++ b/0006-filter-use-a-tmp-variable-for-the-accel-factor.patch @@ -0,0 +1,35 @@ +From 07ffabc58c1f967e1efe0b593135e835aa5deed4 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 23 Jun 2015 12:45:55 +1000 +Subject: [PATCH libinput 6/9] filter: use a tmp variable for the accel factor + +No real effect, just makes the diff for debugging printfs smaller. + +Signed-off-by: Peter Hutterer +--- + src/filter.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/filter.c b/src/filter.c +index 69f78b1..1e05782 100644 +--- a/src/filter.c ++++ b/src/filter.c +@@ -385,11 +385,14 @@ pointer_accel_profile_linear(struct motion_filter *filter, + const double max_accel = accel_filter->accel; /* unitless factor */ + const double threshold = accel_filter->threshold; /* units/ms */ + const double incline = accel_filter->incline; ++ double factor; + + s1 = min(1, 0.3 + speed_in * 10); + s2 = 1 + (speed_in - threshold) * incline; + +- return min(max_accel, s2 > 1 ? s2 : s1); ++ factor = min(max_accel, s2 > 1 ? s2 : s1); ++ ++ return factor; + } + + double +-- +2.4.3 + diff --git a/0007-Drop-motion-normalization-of-unaccelerated-deltas.patch b/0007-Drop-motion-normalization-of-unaccelerated-deltas.patch new file mode 100644 index 0000000..5ceaead --- /dev/null +++ b/0007-Drop-motion-normalization-of-unaccelerated-deltas.patch @@ -0,0 +1,289 @@ +From 753e5eb654a5da96b5cb42e5d612380adac7229f Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 26 Jun 2015 09:07:24 +1000 +Subject: [PATCH libinput 7/9] Drop motion normalization of unaccelerated + deltas + +This simply doesn't work for low-dpi mice. Normalizing a 400dpi mouse to a +1000dpi mouse forces a minimum movement of 2.5 units and the resulting pixel +jumps. It is impossible for the caller to detect whether the jump was caused +by a single motion or multiple motion events. + +This is technically an API break, but not really. + +The accelerated data was already relatively meaningless, even if normalized as +the data did not correspond predictably to any input motion (unless you know +the implementation acceleration function in the caller). So we can drop the +mention from there without expecting any ill effects in the caller. + +The unaccelerated data was useless for low-dpi mice and could only be used to +measure the physical distance of the mouse movement - something not used in +any caller we're aware of (if needed, we can add that functionality as a +separate call). Dropping motion normalization for unaccelerated deltas also +restores true dpi capabilities to users of that API, mostly games that want to +make use of high-dpi mice. + +This is a simplified patch, the normalization is still in place for most of +libinput, it merely carries the original coordinates in the event itself. + +In the case of touchpads, the coordinates are unnormalized into the x-axis +coordinate space as per the documentation. + +Signed-off-by: Peter Hutterer +--- + doc/normalization-of-relative-motion.dox | 31 +++++++++++++++++++++++++++---- + src/evdev-mt-touchpad-gestures.c | 8 ++++++-- + src/evdev-mt-touchpad.h | 15 +++++++++++++++ + src/evdev.c | 5 ++++- + src/libinput-private.h | 2 +- + src/libinput.c | 10 +++++----- + src/libinput.h | 26 ++++++++++++++------------ + 7 files changed, 72 insertions(+), 25 deletions(-) + +diff --git a/doc/normalization-of-relative-motion.dox b/doc/normalization-of-relative-motion.dox +index aaa1735..dd5d39b 100644 +--- a/doc/normalization-of-relative-motion.dox ++++ b/doc/normalization-of-relative-motion.dox +@@ -12,10 +12,33 @@ physical movement or 10 millimeters, depending on the sensor. This + affects pointer acceleration in libinput and interpretation of relative + coordinates in callers. + +-libinput normalizes all relative input to a physical resolution of +-1000dpi, the same delta from two different devices thus represents the +-same physical movement of those two devices (within sensor error +-margins). ++libinput does partial normalization of relative input. For devices with a ++resolution of 1000dpi and higher, motion events are normalized to a default ++of 1000dpi before pointer acceleration is applied. As a result, devices with ++1000dpi and above feel the same. ++ ++Devices below 1000dpi are not normalized (normalization of a 1-device unit ++movement on a 400dpi mouse would cause a 2.5 pixel movement). Instead, ++libinput applies a dpi-dependent acceleration function. At low speeds, a ++1-device unit movement usually translates into a 1-pixel movements. As the ++movement speed increases, acceleration is applied - at high speeds a low-dpi ++device will roughly feel the same as a higher-dpi mouse. ++ ++This normalization only applies to accelerated coordinates, unaccelerated ++coordiantes are left in device-units. It is up to the caller to interpret ++those coordinates correctly. ++ ++@section Normalization of touchpad coordinates ++ ++Touchpads may have a different resolution for the horizontal and vertical ++axis. Interpreting coordinates from the touchpad without taking resolutino ++into account results in uneven motion. ++ ++libinput scales unaccelerated touchpad motion do the resolution of the ++touchpad's x axis, i.e. the unaccelerated value for the y axis is: ++ y = (x / resolution_x) * resolution_y ++ ++@section Setting custom DPI settings + + Devices usually do not advertise their resolution and libinput relies on + the udev property MOUSE_DPI for this information. This property is usually +diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c +index 328a744..e85a9d7 100644 +--- a/src/evdev-mt-touchpad-gestures.c ++++ b/src/evdev-mt-touchpad-gestures.c +@@ -91,6 +91,7 @@ static void + tp_gesture_post_pointer_motion(struct tp_dispatch *tp, uint64_t time) + { + struct normalized_coords delta, unaccel; ++ struct device_float_coords raw; + + /* When a clickpad is clicked, combine motion of all active touches */ + if (tp->buttons.is_clickpad && tp->buttons.state) +@@ -101,8 +102,11 @@ tp_gesture_post_pointer_motion(struct tp_dispatch *tp, uint64_t time) + delta = tp_filter_motion(tp, &unaccel, time); + + if (!normalized_is_zero(delta) || !normalized_is_zero(unaccel)) { +- pointer_notify_motion(&tp->device->base, time, +- &delta, &unaccel); ++ raw = tp_unnormalize_for_xaxis(tp, unaccel); ++ pointer_notify_motion(&tp->device->base, ++ time, ++ &delta, ++ &raw); + } + } + +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index 9357969..08c1732 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -316,6 +316,21 @@ tp_normalize_delta(struct tp_dispatch *tp, struct device_float_coords delta) + return normalized; + } + ++/** ++ * Takes a dpi-normalized set of coordinates, returns a set of coordinates ++ * in the x-axis' coordinate space. ++ */ ++static inline struct device_float_coords ++tp_unnormalize_for_xaxis(struct tp_dispatch *tp, struct normalized_coords delta) ++{ ++ struct device_float_coords raw; ++ ++ raw.x = delta.x / tp->accel.x_scale_coeff; ++ raw.y = delta.y / tp->accel.x_scale_coeff; /* <--- not a typo */ ++ ++ return raw; ++} ++ + struct normalized_coords + tp_get_delta(struct tp_touch *t); + +diff --git a/src/evdev.c b/src/evdev.c +index b2595d4..a5f1d47 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -280,6 +280,7 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time) + struct libinput_seat *seat = base->seat; + struct normalized_coords accel, unaccel; + struct device_coords point; ++ struct device_float_coords raw; + + slot = device->mt.slot; + +@@ -288,6 +289,8 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time) + return; + case EVDEV_RELATIVE_MOTION: + normalize_delta(device, &device->rel, &unaccel); ++ raw.x = device->rel.x; ++ raw.y = device->rel.y; + device->rel.x = 0; + device->rel.y = 0; + +@@ -304,7 +307,7 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time) + if (normalized_is_zero(accel) && normalized_is_zero(unaccel)) + break; + +- pointer_notify_motion(base, time, &accel, &unaccel); ++ pointer_notify_motion(base, time, &accel, &raw); + break; + case EVDEV_ABSOLUTE_MT_DOWN: + if (!(device->seat_caps & EVDEV_DEVICE_TOUCH)) +diff --git a/src/libinput-private.h b/src/libinput-private.h +index a7c8838..2f94597 100644 +--- a/src/libinput-private.h ++++ b/src/libinput-private.h +@@ -319,7 +319,7 @@ void + pointer_notify_motion(struct libinput_device *device, + uint64_t time, + const struct normalized_coords *delta, +- const struct normalized_coords *unaccel); ++ const struct device_float_coords *raw); + + void + pointer_notify_motion_absolute(struct libinput_device *device, +diff --git a/src/libinput.c b/src/libinput.c +index 7a097c0..a6bd079 100644 +--- a/src/libinput.c ++++ b/src/libinput.c +@@ -96,7 +96,7 @@ struct libinput_event_pointer { + struct libinput_event base; + uint32_t time; + struct normalized_coords delta; +- struct normalized_coords delta_unaccel; ++ struct device_float_coords delta_raw; + struct device_coords absolute; + struct discrete_coords discrete; + uint32_t button; +@@ -339,7 +339,7 @@ libinput_event_pointer_get_dx_unaccelerated( + 0, + LIBINPUT_EVENT_POINTER_MOTION); + +- return event->delta_unaccel.x; ++ return event->delta_raw.x; + } + + LIBINPUT_EXPORT double +@@ -351,7 +351,7 @@ libinput_event_pointer_get_dy_unaccelerated( + 0, + LIBINPUT_EVENT_POINTER_MOTION); + +- return event->delta_unaccel.y; ++ return event->delta_raw.y; + } + + LIBINPUT_EXPORT double +@@ -1130,7 +1130,7 @@ void + pointer_notify_motion(struct libinput_device *device, + uint64_t time, + const struct normalized_coords *delta, +- const struct normalized_coords *unaccel) ++ const struct device_float_coords *raw) + { + struct libinput_event_pointer *motion_event; + +@@ -1144,7 +1144,7 @@ pointer_notify_motion(struct libinput_device *device, + *motion_event = (struct libinput_event_pointer) { + .time = time, + .delta = *delta, +- .delta_unaccel = *unaccel, ++ .delta_raw = *raw, + }; + + post_device_event(device, time, +diff --git a/src/libinput.h b/src/libinput.h +index 0d3200f..e76fa9a 100644 +--- a/src/libinput.h ++++ b/src/libinput.h +@@ -460,8 +460,8 @@ libinput_event_pointer_get_time(struct libinput_event_pointer *event); + * If a device employs pointer acceleration, the delta returned by this + * function is the accelerated delta. + * +- * Relative motion deltas are normalized to represent those of a device with +- * 1000dpi resolution. See @ref motion_normalization for more details. ++ * Relative motion deltas are to be interpreted as pixel movement of a ++ * standardized mouse. See @ref motion_normalization for more details. + * + * @note It is an application bug to call this function for events other than + * @ref LIBINPUT_EVENT_POINTER_MOTION. +@@ -481,8 +481,8 @@ libinput_event_pointer_get_dx(struct libinput_event_pointer *event); + * If a device employs pointer acceleration, the delta returned by this + * function is the accelerated delta. + * +- * Relative motion deltas are normalized to represent those of a device with +- * 1000dpi resolution. See @ref motion_normalization for more details. ++ * Relative motion deltas are to be interpreted as pixel movement of a ++ * standardized mouse. See @ref motion_normalization for more details. + * + * @note It is an application bug to call this function for events other than + * @ref LIBINPUT_EVENT_POINTER_MOTION. +@@ -499,10 +499,11 @@ libinput_event_pointer_get_dy(struct libinput_event_pointer *event); + * current event. For pointer events that are not of type @ref + * LIBINPUT_EVENT_POINTER_MOTION, this function returns 0. + * +- * Relative unaccelerated motion deltas are normalized to represent those of a +- * device with 1000dpi resolution. See @ref motion_normalization for more +- * details. Note that unaccelerated events are not equivalent to 'raw' events +- * as read from the device. ++ * Relative unaccelerated motion deltas are raw device coordinates. ++ * Note that these coordinates are subject to the device's native ++ * resolution. Touchpad coordinates represent raw device coordinates in the ++ * X resolution of the touchpad. See @ref motion_normalization for more ++ * details. + * + * @note It is an application bug to call this function for events other than + * @ref LIBINPUT_EVENT_POINTER_MOTION. +@@ -520,10 +521,11 @@ libinput_event_pointer_get_dx_unaccelerated( + * current event. For pointer events that are not of type @ref + * LIBINPUT_EVENT_POINTER_MOTION, this function returns 0. + * +- * Relative unaccelerated motion deltas are normalized to represent those of a +- * device with 1000dpi resolution. See @ref motion_normalization for more +- * details. Note that unaccelerated events are not equivalent to 'raw' events +- * as read from the device. ++ * Relative unaccelerated motion deltas are raw device coordinates. ++ * Note that these coordinates are subject to the device's native ++ * resolution. Touchpad coordinates represent raw device coordinates in the ++ * X resolution of the touchpad. See @ref motion_normalization for more ++ * details. + * + * @note It is an application bug to call this function for events other than + * @ref LIBINPUT_EVENT_POINTER_MOTION. +-- +2.4.3 + diff --git a/0008-filter-pass-the-DPI-to-the-acceleration-filter.patch b/0008-filter-pass-the-DPI-to-the-acceleration-filter.patch new file mode 100644 index 0000000..ec494cf --- /dev/null +++ b/0008-filter-pass-the-DPI-to-the-acceleration-filter.patch @@ -0,0 +1,122 @@ +From 415bc6d956e9c4836f20e661e3ee77d2adfb1cd5 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 19 Jun 2015 16:03:42 +1000 +Subject: [PATCH libinput 8/9] filter: pass the DPI to the acceleration filter + +Currently unused, but store the ratio of DPI:default DPI for later use. + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 3 ++- + src/evdev.h | 3 --- + src/filter.c | 7 ++++++- + src/filter.h | 3 ++- + src/libinput-util.h | 3 +++ + tools/ptraccel-debug.c | 3 ++- + 6 files changed, 15 insertions(+), 7 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index a5f1d47..b98b47a 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1409,7 +1409,8 @@ int + evdev_device_init_pointer_acceleration(struct evdev_device *device, + accel_profile_func_t profile) + { +- device->pointer.filter = create_pointer_accelerator_filter(profile); ++ device->pointer.filter = create_pointer_accelerator_filter(profile, ++ device->dpi); + if (!device->pointer.filter) + return -1; + +diff --git a/src/evdev.h b/src/evdev.h +index 566b0a4..b58e021 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -36,9 +36,6 @@ + #include "timer.h" + #include "filter.h" + +-/* The HW DPI rate we normalize to before calculating pointer acceleration */ +-#define DEFAULT_MOUSE_DPI 1000 +- + /* + * The constant (linear) acceleration factor we use to normalize trackpoint + * deltas before calculating pointer acceleration. +diff --git a/src/filter.c b/src/filter.c +index 1e05782..04dd2b9 100644 +--- a/src/filter.c ++++ b/src/filter.c +@@ -111,6 +111,8 @@ struct pointer_accelerator { + double threshold; /* units/ms */ + double accel; /* unitless factor */ + double incline; /* incline of the function */ ++ ++ double dpi_factor; + }; + + static void +@@ -346,7 +348,8 @@ struct motion_filter_interface accelerator_interface = { + }; + + struct motion_filter * +-create_pointer_accelerator_filter(accel_profile_func_t profile) ++create_pointer_accelerator_filter(accel_profile_func_t profile, ++ int dpi) + { + struct pointer_accelerator *filter; + +@@ -369,6 +372,8 @@ create_pointer_accelerator_filter(accel_profile_func_t profile) + filter->accel = DEFAULT_ACCELERATION; + filter->incline = DEFAULT_INCLINE; + ++ filter->dpi = dpi; ++ + return &filter->base; + } + +diff --git a/src/filter.h b/src/filter.h +index de94997..64a8b50 100644 +--- a/src/filter.h ++++ b/src/filter.h +@@ -58,7 +58,8 @@ typedef double (*accel_profile_func_t)(struct motion_filter *filter, + uint64_t time); + + struct motion_filter * +-create_pointer_accelerator_filter(accel_profile_func_t filter); ++create_pointer_accelerator_filter(accel_profile_func_t filter, ++ int dpi); + + /* + * Pointer acceleration profiles. +diff --git a/src/libinput-util.h b/src/libinput-util.h +index 4f73ad4..bb4834e 100644 +--- a/src/libinput-util.h ++++ b/src/libinput-util.h +@@ -37,6 +37,9 @@ + #define VENDOR_ID_APPLE 0x5ac + #define VENDOR_ID_WACOM 0x56a + ++/* The HW DPI rate we normalize to before calculating pointer acceleration */ ++#define DEFAULT_MOUSE_DPI 1000 ++ + void + set_logging_enabled(int enabled); + +diff --git a/tools/ptraccel-debug.c b/tools/ptraccel-debug.c +index 335781b..9fdb4cd 100644 +--- a/tools/ptraccel-debug.c ++++ b/tools/ptraccel-debug.c +@@ -199,7 +199,8 @@ main(int argc, char **argv) + OPT_SPEED, + }; + +- filter = create_pointer_accelerator_filter(pointer_accel_profile_linear); ++ filter = create_pointer_accelerator_filter(pointer_accel_profile_linear, ++ 1000); + assert(filter != NULL); + + while (1) { +-- +2.4.3 + diff --git a/0009-filter-add-a-custom-low-dpi-acceleration.patch b/0009-filter-add-a-custom-low-dpi-acceleration.patch new file mode 100644 index 0000000..2f367d8 --- /dev/null +++ b/0009-filter-add-a-custom-low-dpi-acceleration.patch @@ -0,0 +1,170 @@ +From 348401a5de950314faadfdd69d160cdeda1362fa Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 23 Jun 2015 12:45:16 +1000 +Subject: [PATCH libinput 9/9] filter: add a custom low-dpi acceleration + +Motion normalization does not work well for devices below the default 1000dpi +rate. A 400dpi mouse's minimum movement generates a 2.5 normalized motion, +causing it to skip pixels at low speeds even when unaccelerated. + +Likewise, we don't want 1000dpi mice to be normalized to a 400dpi mouse, it +feels sluggish even at higher acceleration speeds. +Instead, add a custom acceleration method for lower-dpi mice. At low-speeds, +one device unit results in a one-pixel movement. Depending on the DPI factor, +the acceleration kicks in earlier and goes to higher acceleration so faster +movements with a low-dpi mouse feel approximately the same as the same +movement on a higher-dpi mouse. + +https://bugzilla.redhat.com/show_bug.cgi?id=1231304 + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 17 ++++++++++++++--- + src/filter.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++------ + src/filter.h | 5 +++++ + 3 files changed, 69 insertions(+), 9 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index b98b47a..1edf93f 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1823,6 +1823,19 @@ evdev_configure_mt_device(struct evdev_device *device) + return 0; + } + ++static inline int ++evdev_init_accel(struct evdev_device *device) ++{ ++ accel_profile_func_t profile; ++ ++ if (device->dpi < DEFAULT_MOUSE_DPI) ++ profile = pointer_accel_profile_linear_low_dpi; ++ else ++ profile = pointer_accel_profile_linear; ++ ++ return evdev_device_init_pointer_acceleration(device, profile); ++} ++ + static int + evdev_configure_device(struct evdev_device *device) + { +@@ -1914,9 +1927,7 @@ evdev_configure_device(struct evdev_device *device) + udev_tags & EVDEV_UDEV_TAG_POINTINGSTICK) { + if (libevdev_has_event_code(evdev, EV_REL, REL_X) && + libevdev_has_event_code(evdev, EV_REL, REL_Y) && +- evdev_device_init_pointer_acceleration( +- device, +- pointer_accel_profile_linear) == -1) ++ evdev_init_accel(device) == -1) + return -1; + + device->seat_caps |= EVDEV_DEVICE_POINTER; +diff --git a/src/filter.c b/src/filter.c +index 04dd2b9..35449f5 100644 +--- a/src/filter.c ++++ b/src/filter.c +@@ -264,8 +264,16 @@ accelerator_filter(struct motion_filter *filter, + double velocity; /* units/ms */ + double accel_value; /* unitless factor */ + struct normalized_coords accelerated; ++ struct normalized_coords unnormalized; ++ double dpi_factor = accel->dpi_factor; + +- feed_trackers(accel, unaccelerated, time); ++ /* For low-dpi mice, use device units, everything else uses ++ 1000dpi normalized */ ++ dpi_factor = min(1.0, dpi_factor); ++ unnormalized.x = unaccelerated->x * dpi_factor; ++ unnormalized.y = unaccelerated->y * dpi_factor; ++ ++ feed_trackers(accel, &unnormalized, time); + velocity = calculate_velocity(accel, time); + accel_value = calculate_acceleration(accel, + data, +@@ -273,10 +281,10 @@ accelerator_filter(struct motion_filter *filter, + accel->last_velocity, + time); + +- accelerated.x = accel_value * unaccelerated->x; +- accelerated.y = accel_value * unaccelerated->y; ++ accelerated.x = accel_value * unnormalized.x; ++ accelerated.y = accel_value * unnormalized.y; + +- accel->last = *unaccelerated; ++ accel->last = unnormalized; + + accel->last_velocity = velocity; + +@@ -372,15 +380,51 @@ create_pointer_accelerator_filter(accel_profile_func_t profile, + filter->accel = DEFAULT_ACCELERATION; + filter->incline = DEFAULT_INCLINE; + +- filter->dpi = dpi; ++ filter->dpi_factor = dpi/(double)DEFAULT_MOUSE_DPI; + + return &filter->base; + } + ++/** ++ * Custom acceleration function for mice < 1000dpi. ++ * At slow motion, a single device unit causes a one-pixel movement. ++ * The threshold/max accel depends on the DPI, the smaller the DPI the ++ * earlier we accelerate and the higher the maximum acceleration is. Result: ++ * at low speeds we get pixel-precision, at high speeds we get approx. the ++ * same movement as a high-dpi mouse. ++ * ++ * Note: data fed to this function is in device units, not normalized. ++ */ ++double ++pointer_accel_profile_linear_low_dpi(struct motion_filter *filter, ++ void *data, ++ double speed_in, /* in device units */ ++ uint64_t time) ++{ ++ struct pointer_accelerator *accel_filter = ++ (struct pointer_accelerator *)filter; ++ ++ double s1, s2; ++ double max_accel = accel_filter->accel; /* unitless factor */ ++ const double threshold = accel_filter->threshold; /* units/ms */ ++ const double incline = accel_filter->incline; ++ double factor; ++ double dpi_factor = accel_filter->dpi_factor; ++ ++ max_accel /= dpi_factor; ++ ++ s1 = min(1, 0.3 + speed_in * 10); ++ s2 = 1 + (speed_in - threshold * dpi_factor) * incline; ++ ++ factor = min(max_accel, s2 > 1 ? s2 : s1); ++ ++ return factor; ++} ++ + double + pointer_accel_profile_linear(struct motion_filter *filter, + void *data, +- double speed_in, ++ double speed_in, /* 1000-dpi normalized */ + uint64_t time) + { + struct pointer_accelerator *accel_filter = +diff --git a/src/filter.h b/src/filter.h +index 64a8b50..617fab1 100644 +--- a/src/filter.h ++++ b/src/filter.h +@@ -66,6 +66,11 @@ create_pointer_accelerator_filter(accel_profile_func_t filter, + */ + + double ++pointer_accel_profile_linear_low_dpi(struct motion_filter *filter, ++ void *data, ++ double speed_in, ++ uint64_t time); ++double + pointer_accel_profile_linear(struct motion_filter *filter, + void *data, + double speed_in, +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index 8cafea1..58055d6 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.18.0 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -22,6 +22,18 @@ Patch01: 0001-touchpad-only-send-most-recent-edge-delta-when-trigg.patch Patch02: 0001-touchpad-reduce-edge-scroll-motion-threshold-to-3mm.patch Patch03: 0001-touchpad-fix-stuck-finger-after-a-click.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1227039 +Patch04: 0001-filter-reduce-deceleration-to-minimal-speeds-only.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1231304 +Patch05: 0002-evdev-read-dpi-before-evdev_configure_device.patch +Patch06: 0003-evdev-log-device-s-DPI-setting-if-any.patch +Patch07: 0004-evdev-move-posting-a-trackpoint-scroll-event-into-a-.patch +Patch08: 0005-tools-don-t-drop-the-accelerated-deltas-in-ptraccel-.patch +Patch09: 0006-filter-use-a-tmp-variable-for-the-accel-factor.patch +Patch10: 0007-Drop-motion-normalization-of-unaccelerated-deltas.patch +Patch11: 0008-filter-pass-the-DPI-to-the-acceleration-filter.patch +Patch12: 0009-filter-add-a-custom-low-dpi-acceleration.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -98,6 +110,11 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Jun 29 2015 Peter Hutterer 0.18.0-4 +- Steepen deceleration curve to get better 1:1 movement on slow speeds + (#1231304) +- Provide custom accel method for <1000dpi mice (#1227039) + * Thu Jun 25 2015 Peter Hutterer 0.18.0-3 - Fix stuck finger after a clickpad click on resolutionless touchpads From 69f9783d3cd4faca95f1ff9c613d8952f71762a7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 1 Jul 2015 09:31:21 +1000 Subject: [PATCH 033/317] Improve trackpoint->touchpad transition responsiveness (#1233844) --- ...ackpoint-timer-stuff-into-the-palm-s.patch | 125 ++++++++++++++++++ ...s-set-touch-palm.time-on-touch-begin.patch | 37 ++++++ ...-trackpoint-palm-detection-responsiv.patch | 121 +++++++++++++++++ ...-trackpoint-palm-detection-on-small-.patch | 95 +++++++++++++ libinput.spec | 11 +- 5 files changed, 388 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-move-trackpoint-timer-stuff-into-the-palm-s.patch create mode 100644 0002-touchpad-always-set-touch-palm.time-on-touch-begin.patch create mode 100644 0003-touchpad-improve-trackpoint-palm-detection-responsiv.patch create mode 100644 0004-touchpad-disable-trackpoint-palm-detection-on-small-.patch diff --git a/0001-touchpad-move-trackpoint-timer-stuff-into-the-palm-s.patch b/0001-touchpad-move-trackpoint-timer-stuff-into-the-palm-s.patch new file mode 100644 index 0000000..db15ed2 --- /dev/null +++ b/0001-touchpad-move-trackpoint-timer-stuff-into-the-palm-s.patch @@ -0,0 +1,125 @@ +From 2684b234e0d58029f01c3e944fa355dfa2e04137 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 24 Jun 2015 11:22:29 +1000 +Subject: [PATCH libinput 1/4] touchpad: move trackpoint timer stuff into the + palm struct + +No functional changes, just rearranging where it fits better. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad.c | 20 ++++++++++---------- + src/evdev-mt-touchpad.h | 10 +++++----- + 2 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index e4a6480..9dc5a0e 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -762,7 +762,7 @@ tp_post_events(struct tp_dispatch *tp, uint64_t time) + filter_motion |= tp_post_button_events(tp, time); + + if (filter_motion || +- tp->sendevents.trackpoint_active || ++ tp->palm.trackpoint_active || + tp->dwt.keyboard_active) { + tp_edge_scroll_stop_events(tp, time); + tp_gesture_stop(tp, time); +@@ -812,12 +812,12 @@ tp_interface_process(struct evdev_dispatch *dispatch, + static void + tp_remove_sendevents(struct tp_dispatch *tp) + { +- libinput_timer_cancel(&tp->sendevents.trackpoint_timer); ++ libinput_timer_cancel(&tp->palm.trackpoint_timer); + libinput_timer_cancel(&tp->dwt.keyboard_timer); + + if (tp->buttons.trackpoint) + libinput_device_remove_event_listener( +- &tp->sendevents.trackpoint_listener); ++ &tp->palm.trackpoint_listener); + + if (tp->dwt.keyboard) + libinput_device_remove_event_listener( +@@ -928,7 +928,7 @@ tp_trackpoint_timeout(uint64_t now, void *data) + struct tp_dispatch *tp = data; + + tp_tap_resume(tp, now); +- tp->sendevents.trackpoint_active = false; ++ tp->palm.trackpoint_active = false; + } + + static void +@@ -941,14 +941,14 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data) + if (event->type == LIBINPUT_EVENT_POINTER_BUTTON) + return; + +- if (!tp->sendevents.trackpoint_active) { ++ if (!tp->palm.trackpoint_active) { + tp_edge_scroll_stop_events(tp, time); + tp_gesture_stop(tp, time); + tp_tap_suspend(tp, time); +- tp->sendevents.trackpoint_active = true; ++ tp->palm.trackpoint_active = true; + } + +- libinput_timer_set(&tp->sendevents.trackpoint_timer, ++ libinput_timer_set(&tp->palm.trackpoint_timer, + time + DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT); + } + +@@ -1080,7 +1080,7 @@ tp_interface_device_added(struct evdev_device *device, + tp->buttons.active_is_topbutton = false; + tp->buttons.trackpoint = added_device; + libinput_device_add_event_listener(&added_device->base, +- &tp->sendevents.trackpoint_listener, ++ &tp->palm.trackpoint_listener, + tp_trackpoint_event, tp); + } + +@@ -1121,7 +1121,7 @@ tp_interface_device_removed(struct evdev_device *device, + tp->buttons.active_is_topbutton = false; + } + libinput_device_remove_event_listener( +- &tp->sendevents.trackpoint_listener); ++ &tp->palm.trackpoint_listener); + tp->buttons.trackpoint = NULL; + } + +@@ -1434,7 +1434,7 @@ static int + tp_init_sendevents(struct tp_dispatch *tp, + struct evdev_device *device) + { +- libinput_timer_init(&tp->sendevents.trackpoint_timer, ++ libinput_timer_init(&tp->palm.trackpoint_timer, + tp_libinput_context(tp), + tp_trackpoint_timeout, tp); + +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index 08c1732..3b5cff5 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -275,15 +275,15 @@ struct tp_dispatch { + int32_t right_edge; /* in device coordinates */ + int32_t left_edge; /* in device coordinates */ + int32_t vert_center; /* in device coordinates */ +- } palm; +- +- struct { +- struct libinput_device_config_send_events config; +- enum libinput_config_send_events_mode current_mode; + + bool trackpoint_active; + struct libinput_event_listener trackpoint_listener; + struct libinput_timer trackpoint_timer; ++ } palm; ++ ++ struct { ++ struct libinput_device_config_send_events config; ++ enum libinput_config_send_events_mode current_mode; + } sendevents; + + struct { +-- +2.4.3 + diff --git a/0002-touchpad-always-set-touch-palm.time-on-touch-begin.patch b/0002-touchpad-always-set-touch-palm.time-on-touch-begin.patch new file mode 100644 index 0000000..05b6649 --- /dev/null +++ b/0002-touchpad-always-set-touch-palm.time-on-touch-begin.patch @@ -0,0 +1,37 @@ +From dca83c9edcba574482ac1a93759b196344dc7a87 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 24 Jun 2015 10:57:07 +1000 +Subject: [PATCH libinput 2/4] touchpad: always set touch->palm.time on touch + begin + +We will use this outside of DWT, so set it unconditionally on touch begin. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 9dc5a0e..877e667 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -211,6 +211,7 @@ tp_begin_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + t->state = TOUCH_BEGIN; + t->millis = time; + tp->nfingers_down++; ++ t->palm.time = time; + assert(tp->nfingers_down >= 1); + } + +@@ -491,7 +492,6 @@ tp_palm_detect_dwt(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + if (tp->dwt.keyboard_active && + t->state == TOUCH_BEGIN) { + t->palm.state = PALM_TYPING; +- t->palm.time = time; + t->palm.first = t->point; + return 1; + } else if (!tp->dwt.keyboard_active && +-- +2.4.3 + diff --git a/0003-touchpad-improve-trackpoint-palm-detection-responsiv.patch b/0003-touchpad-improve-trackpoint-palm-detection-responsiv.patch new file mode 100644 index 0000000..b49d82b --- /dev/null +++ b/0003-touchpad-improve-trackpoint-palm-detection-responsiv.patch @@ -0,0 +1,121 @@ +From b715f96e1c7457015f048ea76026e3360c27f3f9 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 23 Jun 2015 15:36:05 +1000 +Subject: [PATCH libinput 3/4] touchpad: improve trackpoint palm detection + responsiveness + +The touchpad is disabled for 500ms after a trackpoint event to avoid +erroneous palm touches. This is currently refreshed on every trackpoint event +and thus forces a delay of 500ms when switching between the two. + +Instead, reduce the timeout to 300ms but ignore any touches started while the +trackpoint was active (i.e. before the last trackpoint event). A touch started +after the last event is released once the timeout expires. + +This is the same logic used for disable-while-typing. + +https://bugzilla.redhat.com/show_bug.cgi?id=1233844 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad.c | 34 ++++++++++++++++++++++++++++++++-- + src/evdev-mt-touchpad.h | 2 ++ + 2 files changed, 34 insertions(+), 2 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 877e667..fa7d06b 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -34,7 +34,7 @@ + * TP_MAGIC_SLOWDOWN in filter.c */ + #define DEFAULT_ACCEL_NUMERATOR 3000.0 + #define DEFAULT_HYSTERESIS_MARGIN_DENOMINATOR 700.0 +-#define DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT 500 /* ms */ ++#define DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT 300 /* ms */ + #define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_1 200 /* ms */ + #define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_2 500 /* ms */ + #define FAKE_FINGER_OVERFLOW (1 << 7) +@@ -515,6 +515,31 @@ tp_palm_detect_dwt(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + return 0; + } + ++static int ++tp_palm_detect_trackpoint(struct tp_dispatch *tp, ++ struct tp_touch *t, ++ uint64_t time) ++{ ++ if (t->palm.state == PALM_NONE && ++ t->state == TOUCH_BEGIN && ++ tp->palm.trackpoint_active) { ++ t->palm.state = PALM_TRACKPOINT; ++ return 1; ++ } else if (t->palm.state == PALM_TRACKPOINT && ++ t->state == TOUCH_UPDATE && ++ !tp->palm.trackpoint_active) { ++ ++ if (t->palm.time == 0 || ++ t->palm.time > tp->palm.trackpoint_last_event_time) { ++ t->palm.state = PALM_NONE; ++ log_debug(tp_libinput_context(tp), ++ "palm: touch released, timeout after trackpoint\n"); ++ } ++ } ++ ++ return 0; ++} ++ + static void + tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + { +@@ -526,6 +551,9 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + if (tp_palm_detect_dwt(tp, t, time)) + goto out; + ++ if (tp_palm_detect_trackpoint(tp, t, time)) ++ goto out; ++ + /* If labelled a touch as palm, we unlabel as palm when + we move out of the palm edge zone within the timeout, provided + the direction is within 45 degrees of the horizontal. +@@ -568,7 +596,8 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + out: + log_debug(tp_libinput_context(tp), + "palm: palm detected (%s)\n", +- t->palm.state == PALM_EDGE ? "edge" : "typing"); ++ t->palm.state == PALM_EDGE ? "edge" : ++ t->palm.state == PALM_TYPING ? "typing" : "trackpoint"); + } + + static void +@@ -948,6 +977,7 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data) + tp->palm.trackpoint_active = true; + } + ++ tp->palm.trackpoint_last_event_time = time; + libinput_timer_set(&tp->palm.trackpoint_timer, + time + DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT); + } +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index 3b5cff5..dcf6319 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -64,6 +64,7 @@ enum touch_palm_state { + PALM_NONE = 0, + PALM_EDGE, + PALM_TYPING, ++ PALM_TRACKPOINT, + }; + + enum button_event { +@@ -279,6 +280,7 @@ struct tp_dispatch { + bool trackpoint_active; + struct libinput_event_listener trackpoint_listener; + struct libinput_timer trackpoint_timer; ++ uint64_t trackpoint_last_event_time; + } palm; + + struct { +-- +2.4.3 + diff --git a/0004-touchpad-disable-trackpoint-palm-detection-on-small-.patch b/0004-touchpad-disable-trackpoint-palm-detection-on-small-.patch new file mode 100644 index 0000000..fff8d5f --- /dev/null +++ b/0004-touchpad-disable-trackpoint-palm-detection-on-small-.patch @@ -0,0 +1,95 @@ +From 7fe0a040794bf09c71e08ff3fbdae0a2a94039bd Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 24 Jun 2015 11:41:47 +1000 +Subject: [PATCH libinput 4/4] touchpad: disable trackpoint palm detection on + small touchpads + +Tested on three laptops here, Lenovo T61, X220 and an HP EliteBook (?), all +with small touchpads. It's hard to have a hand position where the palm touches +the touchpad while using the trackpoint. So we might as well save us the +effort of monitoring events and enabling/disabling it on demand. + +As a side-effect this fixes 1233844, but that's more a coincidence. +https://bugzilla.redhat.com/show_bug.cgi?id=1233844 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad.c | 20 ++++++++++++++------ + src/evdev-mt-touchpad.h | 1 + + 2 files changed, 15 insertions(+), 6 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index fa7d06b..163226e 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -520,6 +520,9 @@ tp_palm_detect_trackpoint(struct tp_dispatch *tp, + struct tp_touch *t, + uint64_t time) + { ++ if (!tp->palm.monitor_trackpoint) ++ return 0; ++ + if (t->palm.state == PALM_NONE && + t->state == TOUCH_BEGIN && + tp->palm.trackpoint_active) { +@@ -844,7 +847,8 @@ tp_remove_sendevents(struct tp_dispatch *tp) + libinput_timer_cancel(&tp->palm.trackpoint_timer); + libinput_timer_cancel(&tp->dwt.keyboard_timer); + +- if (tp->buttons.trackpoint) ++ if (tp->buttons.trackpoint && ++ tp->palm.monitor_trackpoint) + libinput_device_remove_event_listener( + &tp->palm.trackpoint_listener); + +@@ -1109,9 +1113,10 @@ tp_interface_device_added(struct evdev_device *device, + /* Don't send any pending releases to the new trackpoint */ + tp->buttons.active_is_topbutton = false; + tp->buttons.trackpoint = added_device; +- libinput_device_add_event_listener(&added_device->base, +- &tp->palm.trackpoint_listener, +- tp_trackpoint_event, tp); ++ if (tp->palm.monitor_trackpoint) ++ libinput_device_add_event_listener(&added_device->base, ++ &tp->palm.trackpoint_listener, ++ tp_trackpoint_event, tp); + } + + if (added_device->tags & EVDEV_TAG_KEYBOARD && +@@ -1150,8 +1155,9 @@ tp_interface_device_removed(struct evdev_device *device, + tp->buttons.active = 0; + tp->buttons.active_is_topbutton = false; + } +- libinput_device_remove_event_listener( +- &tp->palm.trackpoint_listener); ++ if (tp->palm.monitor_trackpoint) ++ libinput_device_remove_event_listener( ++ &tp->palm.trackpoint_listener); + tp->buttons.trackpoint = NULL; + } + +@@ -1457,6 +1463,8 @@ tp_init_palmdetect(struct tp_dispatch *tp, + tp->palm.left_edge = device->abs.absinfo_x->minimum + width * 0.05; + tp->palm.vert_center = device->abs.absinfo_y->minimum + height/2; + ++ tp->palm.monitor_trackpoint = true; ++ + return 0; + } + +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index dcf6319..6462dda 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -281,6 +281,7 @@ struct tp_dispatch { + struct libinput_event_listener trackpoint_listener; + struct libinput_timer trackpoint_timer; + uint64_t trackpoint_last_event_time; ++ bool monitor_trackpoint; + } palm; + + struct { +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index 58055d6..a825295 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.18.0 -Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 5%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -34,6 +34,12 @@ Patch10: 0007-Drop-motion-normalization-of-unaccelerated-deltas.patch Patch11: 0008-filter-pass-the-DPI-to-the-acceleration-filter.patch Patch12: 0009-filter-add-a-custom-low-dpi-acceleration.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1233844 +Patch13: 0001-touchpad-move-trackpoint-timer-stuff-into-the-palm-s.patch +Patch14: 0002-touchpad-always-set-touch-palm.time-on-touch-begin.patch +Patch15: 0003-touchpad-improve-trackpoint-palm-detection-responsiv.patch +Patch16: 0004-touchpad-disable-trackpoint-palm-detection-on-small-.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -110,6 +116,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Jul 01 2015 Peter Hutterer 0.18.0-5 +- Improve trackpoint->touchpad transition responsiveness (#1233844) + * Mon Jun 29 2015 Peter Hutterer 0.18.0-4 - Steepen deceleration curve to get better 1:1 movement on slow speeds (#1231304) From b66bfe236f48a56c9bc5f3874f6a5109955b49ad Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 6 Jul 2015 13:11:52 +1000 Subject: [PATCH 034/317] libinput 0.19.0 --- .gitignore | 1 + ...-deceleration-to-minimal-speeds-only.patch | 40 --- ...chpad-fix-stuck-finger-after-a-click.patch | 52 ---- ...ackpoint-timer-stuff-into-the-palm-s.patch | 125 -------- ...nd-most-recent-edge-delta-when-trigg.patch | 51 ---- ...-edge-scroll-motion-threshold-to-3mm.patch | 31 -- ...ad-dpi-before-evdev_configure_device.patch | 37 --- ...s-set-touch-palm.time-on-touch-begin.patch | 37 --- ...vdev-log-device-s-DPI-setting-if-any.patch | 30 -- ...-trackpoint-palm-detection-responsiv.patch | 121 -------- ...ng-a-trackpoint-scroll-event-into-a-.patch | 59 ---- ...-trackpoint-palm-detection-on-small-.patch | 95 ------ ...-the-accelerated-deltas-in-ptraccel-.patch | 40 --- ...-a-tmp-variable-for-the-accel-factor.patch | 35 --- ...ormalization-of-unaccelerated-deltas.patch | 289 ------------------ ...s-the-DPI-to-the-acceleration-filter.patch | 122 -------- ...er-add-a-custom-low-dpi-acceleration.patch | 170 ----------- libinput.spec | 29 +- sources | 2 +- 19 files changed, 7 insertions(+), 1359 deletions(-) delete mode 100644 0001-filter-reduce-deceleration-to-minimal-speeds-only.patch delete mode 100644 0001-touchpad-fix-stuck-finger-after-a-click.patch delete mode 100644 0001-touchpad-move-trackpoint-timer-stuff-into-the-palm-s.patch delete mode 100644 0001-touchpad-only-send-most-recent-edge-delta-when-trigg.patch delete mode 100644 0001-touchpad-reduce-edge-scroll-motion-threshold-to-3mm.patch delete mode 100644 0002-evdev-read-dpi-before-evdev_configure_device.patch delete mode 100644 0002-touchpad-always-set-touch-palm.time-on-touch-begin.patch delete mode 100644 0003-evdev-log-device-s-DPI-setting-if-any.patch delete mode 100644 0003-touchpad-improve-trackpoint-palm-detection-responsiv.patch delete mode 100644 0004-evdev-move-posting-a-trackpoint-scroll-event-into-a-.patch delete mode 100644 0004-touchpad-disable-trackpoint-palm-detection-on-small-.patch delete mode 100644 0005-tools-don-t-drop-the-accelerated-deltas-in-ptraccel-.patch delete mode 100644 0006-filter-use-a-tmp-variable-for-the-accel-factor.patch delete mode 100644 0007-Drop-motion-normalization-of-unaccelerated-deltas.patch delete mode 100644 0008-filter-pass-the-DPI-to-the-acceleration-filter.patch delete mode 100644 0009-filter-add-a-custom-low-dpi-acceleration.patch diff --git a/.gitignore b/.gitignore index fcf5e63..df14b63 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /libinput-0.16.0.tar.xz /libinput-0.17.0.tar.xz /libinput-0.18.0.tar.xz +/libinput-0.19.0.tar.xz diff --git a/0001-filter-reduce-deceleration-to-minimal-speeds-only.patch b/0001-filter-reduce-deceleration-to-minimal-speeds-only.patch deleted file mode 100644 index a0f77b0..0000000 --- a/0001-filter-reduce-deceleration-to-minimal-speeds-only.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 6984628d6acf4695c24261c094def44ff37337be Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 12 Jun 2015 15:31:56 +1000 -Subject: [PATCH libinput 1/9] filter: reduce deceleration to minimal speeds - only - -Deceleration at low speeds is intended to enhance precision when moving the -pointer slowly. However, the adaptive deceleration we used was badly -calibrated, at slow-but-normal speeds the pointer became too slow to manouver. - -We don't want to drop deceleration completely, the subpixel precision it -provides is useful. And it also helps those that can't move a 1000dpi mouse by -exactly one unit. - -Make the adaptive deceleration steeper so it only kicks in at extremely slow -motions and defaults to 1 at anything resembling normal movement (i.e. pointer -moves like the physical device does). - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/filter.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/filter.c b/src/filter.c -index a4142e9..69f78b1 100644 ---- a/src/filter.c -+++ b/src/filter.c -@@ -386,7 +386,7 @@ pointer_accel_profile_linear(struct motion_filter *filter, - const double threshold = accel_filter->threshold; /* units/ms */ - const double incline = accel_filter->incline; - -- s1 = min(1, 0.3 + speed_in * 4); -+ s1 = min(1, 0.3 + speed_in * 10); - s2 = 1 + (speed_in - threshold) * incline; - - return min(max_accel, s2 > 1 ? s2 : s1); --- -2.4.3 - diff --git a/0001-touchpad-fix-stuck-finger-after-a-click.patch b/0001-touchpad-fix-stuck-finger-after-a-click.patch deleted file mode 100644 index 2cae2c9..0000000 --- a/0001-touchpad-fix-stuck-finger-after-a-click.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 56264a6ff624afc39935a744d5fd40f0ae969a52 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 25 Jun 2015 12:20:04 +1000 -Subject: [PATCH libinput] touchpad: fix stuck finger after a click - -On a touchpad without resolution, the pinned finger was stuck. The motion -distance scale factor ended up as 0 and the finger never reached the threshold -of 3mm. -int was not the best choice of datatype for a value of 0.007... - -Fix the data types for xdist/ydist at the same time, clamping to int may cause -erroneous (un)pinning. - -Introduced in 8025b374d564f4a30b089e5cf6fd65e0c6af8da2 - -https://bugs.freedesktop.org/show_bug.cgi?id=91070 - -Signed-off-by: Peter Hutterer ---- - src/evdev-mt-touchpad-buttons.c | 2 +- - src/evdev-mt-touchpad.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c -index 8d4e278..6abf9d5 100644 ---- a/src/evdev-mt-touchpad-buttons.c -+++ b/src/evdev-mt-touchpad-buttons.c -@@ -741,7 +741,7 @@ tp_init_buttons(struct tp_dispatch *tp, - /* pinned-finger motion threshold, see tp_unpin_finger. - The MAGIC for resolution-less touchpads ends up as 2% of the diagonal */ - if (device->abs.fake_resolution) { -- const int BUTTON_MOTION_MAGIC = 0.007; -+ const double BUTTON_MOTION_MAGIC = 0.007; - width = abs(absinfo_x->maximum - absinfo_x->minimum); - height = abs(absinfo_y->maximum - absinfo_y->minimum); - diagonal = sqrt(width*width + height*height); -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 9e60f46..4666870 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -426,7 +426,7 @@ tp_process_key(struct tp_dispatch *tp, - static void - tp_unpin_finger(struct tp_dispatch *tp, struct tp_touch *t) - { -- unsigned int xdist, ydist; -+ double xdist, ydist; - - if (!t->pinned.is_pinned) - return; --- -2.4.3 - diff --git a/0001-touchpad-move-trackpoint-timer-stuff-into-the-palm-s.patch b/0001-touchpad-move-trackpoint-timer-stuff-into-the-palm-s.patch deleted file mode 100644 index db15ed2..0000000 --- a/0001-touchpad-move-trackpoint-timer-stuff-into-the-palm-s.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 2684b234e0d58029f01c3e944fa355dfa2e04137 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 24 Jun 2015 11:22:29 +1000 -Subject: [PATCH libinput 1/4] touchpad: move trackpoint timer stuff into the - palm struct - -No functional changes, just rearranging where it fits better. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad.c | 20 ++++++++++---------- - src/evdev-mt-touchpad.h | 10 +++++----- - 2 files changed, 15 insertions(+), 15 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index e4a6480..9dc5a0e 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -762,7 +762,7 @@ tp_post_events(struct tp_dispatch *tp, uint64_t time) - filter_motion |= tp_post_button_events(tp, time); - - if (filter_motion || -- tp->sendevents.trackpoint_active || -+ tp->palm.trackpoint_active || - tp->dwt.keyboard_active) { - tp_edge_scroll_stop_events(tp, time); - tp_gesture_stop(tp, time); -@@ -812,12 +812,12 @@ tp_interface_process(struct evdev_dispatch *dispatch, - static void - tp_remove_sendevents(struct tp_dispatch *tp) - { -- libinput_timer_cancel(&tp->sendevents.trackpoint_timer); -+ libinput_timer_cancel(&tp->palm.trackpoint_timer); - libinput_timer_cancel(&tp->dwt.keyboard_timer); - - if (tp->buttons.trackpoint) - libinput_device_remove_event_listener( -- &tp->sendevents.trackpoint_listener); -+ &tp->palm.trackpoint_listener); - - if (tp->dwt.keyboard) - libinput_device_remove_event_listener( -@@ -928,7 +928,7 @@ tp_trackpoint_timeout(uint64_t now, void *data) - struct tp_dispatch *tp = data; - - tp_tap_resume(tp, now); -- tp->sendevents.trackpoint_active = false; -+ tp->palm.trackpoint_active = false; - } - - static void -@@ -941,14 +941,14 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data) - if (event->type == LIBINPUT_EVENT_POINTER_BUTTON) - return; - -- if (!tp->sendevents.trackpoint_active) { -+ if (!tp->palm.trackpoint_active) { - tp_edge_scroll_stop_events(tp, time); - tp_gesture_stop(tp, time); - tp_tap_suspend(tp, time); -- tp->sendevents.trackpoint_active = true; -+ tp->palm.trackpoint_active = true; - } - -- libinput_timer_set(&tp->sendevents.trackpoint_timer, -+ libinput_timer_set(&tp->palm.trackpoint_timer, - time + DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT); - } - -@@ -1080,7 +1080,7 @@ tp_interface_device_added(struct evdev_device *device, - tp->buttons.active_is_topbutton = false; - tp->buttons.trackpoint = added_device; - libinput_device_add_event_listener(&added_device->base, -- &tp->sendevents.trackpoint_listener, -+ &tp->palm.trackpoint_listener, - tp_trackpoint_event, tp); - } - -@@ -1121,7 +1121,7 @@ tp_interface_device_removed(struct evdev_device *device, - tp->buttons.active_is_topbutton = false; - } - libinput_device_remove_event_listener( -- &tp->sendevents.trackpoint_listener); -+ &tp->palm.trackpoint_listener); - tp->buttons.trackpoint = NULL; - } - -@@ -1434,7 +1434,7 @@ static int - tp_init_sendevents(struct tp_dispatch *tp, - struct evdev_device *device) - { -- libinput_timer_init(&tp->sendevents.trackpoint_timer, -+ libinput_timer_init(&tp->palm.trackpoint_timer, - tp_libinput_context(tp), - tp_trackpoint_timeout, tp); - -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index 08c1732..3b5cff5 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -275,15 +275,15 @@ struct tp_dispatch { - int32_t right_edge; /* in device coordinates */ - int32_t left_edge; /* in device coordinates */ - int32_t vert_center; /* in device coordinates */ -- } palm; -- -- struct { -- struct libinput_device_config_send_events config; -- enum libinput_config_send_events_mode current_mode; - - bool trackpoint_active; - struct libinput_event_listener trackpoint_listener; - struct libinput_timer trackpoint_timer; -+ } palm; -+ -+ struct { -+ struct libinput_device_config_send_events config; -+ enum libinput_config_send_events_mode current_mode; - } sendevents; - - struct { --- -2.4.3 - diff --git a/0001-touchpad-only-send-most-recent-edge-delta-when-trigg.patch b/0001-touchpad-only-send-most-recent-edge-delta-when-trigg.patch deleted file mode 100644 index dea0021..0000000 --- a/0001-touchpad-only-send-most-recent-edge-delta-when-trigg.patch +++ /dev/null @@ -1,51 +0,0 @@ -From f783dae0a70e660f8fc0175b4a702bd3f9953d7d Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 19 Jun 2015 09:21:58 +1000 -Subject: [PATCH libinput] touchpad: only send most recent edge delta when - triggering threshold - -When edge scrolling is triggered by exceeding the motion threshold (5mm) we -sent the whole delta as the first scroll event, causing a big jump. - -Instead, send only the current delta. This effectively introduces a 5mm dead -zone when edge scrolling, still better than the jump. - -https://bugs.freedesktop.org/show_bug.cgi?id=90990 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad-edge-scroll.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c -index 56f1e8a..992a169 100644 ---- a/src/evdev-mt-touchpad-edge-scroll.c -+++ b/src/evdev-mt-touchpad-edge-scroll.c -@@ -353,7 +353,7 @@ tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time) - struct tp_touch *t; - enum libinput_pointer_axis axis; - double *delta; -- struct normalized_coords normalized; -+ struct normalized_coords normalized, tmp; - const struct normalized_coords zero = { 0.0, 0.0 }; - const struct discrete_coords zero_discrete = { 0.0, 0.0 }; - -@@ -402,11 +402,14 @@ tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time) - t->scroll.edge_state); - break; - case EDGE_SCROLL_TOUCH_STATE_EDGE_NEW: -+ tmp = normalized; - normalized = tp_normalize_delta(tp, - device_delta(t->point, - t->scroll.initial)); - if (fabs(*delta) < DEFAULT_SCROLL_THRESHOLD) - normalized = zero; -+ else -+ normalized = tmp; - break; - case EDGE_SCROLL_TOUCH_STATE_EDGE: - break; --- -2.4.3 - diff --git a/0001-touchpad-reduce-edge-scroll-motion-threshold-to-3mm.patch b/0001-touchpad-reduce-edge-scroll-motion-threshold-to-3mm.patch deleted file mode 100644 index 5158ba2..0000000 --- a/0001-touchpad-reduce-edge-scroll-motion-threshold-to-3mm.patch +++ /dev/null @@ -1,31 +0,0 @@ -From abc8c0d6c29ce60275ff8a35fc7bdbbf6407969b Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 19 Jun 2015 10:11:13 +1000 -Subject: [PATCH libinput] touchpad: reduce edge scroll motion threshold to 3mm - -Reduce the dead zone/initial jump - -https://bugs.freedesktop.org/show_bug.cgi?id=90990 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad-edge-scroll.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c -index 992a169..6bfef90 100644 ---- a/src/evdev-mt-touchpad-edge-scroll.c -+++ b/src/evdev-mt-touchpad-edge-scroll.c -@@ -39,7 +39,7 @@ - avoid accidentally locking in scrolling mode when trying to use the entire - touchpad to move the pointer. The user can wait for the timeout to trigger - to do a small scroll. */ --#define DEFAULT_SCROLL_THRESHOLD TP_MM_TO_DPI_NORMALIZED(5) -+#define DEFAULT_SCROLL_THRESHOLD TP_MM_TO_DPI_NORMALIZED(3) - - enum scroll_event { - SCROLL_EVENT_TOUCH, --- -2.4.3 - diff --git a/0002-evdev-read-dpi-before-evdev_configure_device.patch b/0002-evdev-read-dpi-before-evdev_configure_device.patch deleted file mode 100644 index 6721db6..0000000 --- a/0002-evdev-read-dpi-before-evdev_configure_device.patch +++ /dev/null @@ -1,37 +0,0 @@ -From d1639c88ce2a710ab9b771766f473a72b66100db Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 19 Jun 2015 16:01:34 +1000 -Subject: [PATCH libinput 2/9] evdev: read dpi before evdev_configure_device - -So we can use to set up accel during evdev_configure_device. - -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/evdev.c b/src/evdev.c -index 7e1e5c8..2644b76 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -2083,6 +2083,8 @@ evdev_device_create(struct libinput_seat *seat, - device->scroll.wheel_click_angle = - evdev_read_wheel_click_prop(device); - device->model = evdev_read_model(device); -+ device->dpi = evdev_read_dpi_prop(device); -+ - /* at most 5 SYN_DROPPED log-messages per 30s */ - ratelimit_init(&device->syn_drop_limit, 30ULL * 1000, 5); - -@@ -2093,8 +2095,6 @@ evdev_device_create(struct libinput_seat *seat, - if (evdev_configure_device(device) == -1) - goto err; - -- device->dpi = evdev_read_dpi_prop(device); -- - if (device->seat_caps == 0) { - unhandled_device = 1; - goto err; --- -2.4.3 - diff --git a/0002-touchpad-always-set-touch-palm.time-on-touch-begin.patch b/0002-touchpad-always-set-touch-palm.time-on-touch-begin.patch deleted file mode 100644 index 05b6649..0000000 --- a/0002-touchpad-always-set-touch-palm.time-on-touch-begin.patch +++ /dev/null @@ -1,37 +0,0 @@ -From dca83c9edcba574482ac1a93759b196344dc7a87 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 24 Jun 2015 10:57:07 +1000 -Subject: [PATCH libinput 2/4] touchpad: always set touch->palm.time on touch - begin - -We will use this outside of DWT, so set it unconditionally on touch begin. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 9dc5a0e..877e667 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -211,6 +211,7 @@ tp_begin_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - t->state = TOUCH_BEGIN; - t->millis = time; - tp->nfingers_down++; -+ t->palm.time = time; - assert(tp->nfingers_down >= 1); - } - -@@ -491,7 +492,6 @@ tp_palm_detect_dwt(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - if (tp->dwt.keyboard_active && - t->state == TOUCH_BEGIN) { - t->palm.state = PALM_TYPING; -- t->palm.time = time; - t->palm.first = t->point; - return 1; - } else if (!tp->dwt.keyboard_active && --- -2.4.3 - diff --git a/0003-evdev-log-device-s-DPI-setting-if-any.patch b/0003-evdev-log-device-s-DPI-setting-if-any.patch deleted file mode 100644 index 481f5d7..0000000 --- a/0003-evdev-log-device-s-DPI-setting-if-any.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 6dbfd81e26a9adff5b07398ff7e588683e3e6bf6 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 23 Jun 2015 12:41:57 +1000 -Subject: [PATCH libinput 3/9] evdev: log device's DPI setting if any - -Makes debugging things easier. - -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/evdev.c b/src/evdev.c -index 2644b76..67843db 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1496,6 +1496,10 @@ evdev_read_dpi_prop(struct evdev_device *device) - DEFAULT_MOUSE_DPI); - dpi = DEFAULT_MOUSE_DPI; - } -+ log_info(libinput, -+ "Device '%s' set to %d DPI\n", -+ device->devname, -+ dpi); - } - - return dpi; --- -2.4.3 - diff --git a/0003-touchpad-improve-trackpoint-palm-detection-responsiv.patch b/0003-touchpad-improve-trackpoint-palm-detection-responsiv.patch deleted file mode 100644 index b49d82b..0000000 --- a/0003-touchpad-improve-trackpoint-palm-detection-responsiv.patch +++ /dev/null @@ -1,121 +0,0 @@ -From b715f96e1c7457015f048ea76026e3360c27f3f9 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 23 Jun 2015 15:36:05 +1000 -Subject: [PATCH libinput 3/4] touchpad: improve trackpoint palm detection - responsiveness - -The touchpad is disabled for 500ms after a trackpoint event to avoid -erroneous palm touches. This is currently refreshed on every trackpoint event -and thus forces a delay of 500ms when switching between the two. - -Instead, reduce the timeout to 300ms but ignore any touches started while the -trackpoint was active (i.e. before the last trackpoint event). A touch started -after the last event is released once the timeout expires. - -This is the same logic used for disable-while-typing. - -https://bugzilla.redhat.com/show_bug.cgi?id=1233844 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad.c | 34 ++++++++++++++++++++++++++++++++-- - src/evdev-mt-touchpad.h | 2 ++ - 2 files changed, 34 insertions(+), 2 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 877e667..fa7d06b 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -34,7 +34,7 @@ - * TP_MAGIC_SLOWDOWN in filter.c */ - #define DEFAULT_ACCEL_NUMERATOR 3000.0 - #define DEFAULT_HYSTERESIS_MARGIN_DENOMINATOR 700.0 --#define DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT 500 /* ms */ -+#define DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT 300 /* ms */ - #define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_1 200 /* ms */ - #define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_2 500 /* ms */ - #define FAKE_FINGER_OVERFLOW (1 << 7) -@@ -515,6 +515,31 @@ tp_palm_detect_dwt(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - return 0; - } - -+static int -+tp_palm_detect_trackpoint(struct tp_dispatch *tp, -+ struct tp_touch *t, -+ uint64_t time) -+{ -+ if (t->palm.state == PALM_NONE && -+ t->state == TOUCH_BEGIN && -+ tp->palm.trackpoint_active) { -+ t->palm.state = PALM_TRACKPOINT; -+ return 1; -+ } else if (t->palm.state == PALM_TRACKPOINT && -+ t->state == TOUCH_UPDATE && -+ !tp->palm.trackpoint_active) { -+ -+ if (t->palm.time == 0 || -+ t->palm.time > tp->palm.trackpoint_last_event_time) { -+ t->palm.state = PALM_NONE; -+ log_debug(tp_libinput_context(tp), -+ "palm: touch released, timeout after trackpoint\n"); -+ } -+ } -+ -+ return 0; -+} -+ - static void - tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - { -@@ -526,6 +551,9 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - if (tp_palm_detect_dwt(tp, t, time)) - goto out; - -+ if (tp_palm_detect_trackpoint(tp, t, time)) -+ goto out; -+ - /* If labelled a touch as palm, we unlabel as palm when - we move out of the palm edge zone within the timeout, provided - the direction is within 45 degrees of the horizontal. -@@ -568,7 +596,8 @@ tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - out: - log_debug(tp_libinput_context(tp), - "palm: palm detected (%s)\n", -- t->palm.state == PALM_EDGE ? "edge" : "typing"); -+ t->palm.state == PALM_EDGE ? "edge" : -+ t->palm.state == PALM_TYPING ? "typing" : "trackpoint"); - } - - static void -@@ -948,6 +977,7 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data) - tp->palm.trackpoint_active = true; - } - -+ tp->palm.trackpoint_last_event_time = time; - libinput_timer_set(&tp->palm.trackpoint_timer, - time + DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT); - } -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index 3b5cff5..dcf6319 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -64,6 +64,7 @@ enum touch_palm_state { - PALM_NONE = 0, - PALM_EDGE, - PALM_TYPING, -+ PALM_TRACKPOINT, - }; - - enum button_event { -@@ -279,6 +280,7 @@ struct tp_dispatch { - bool trackpoint_active; - struct libinput_event_listener trackpoint_listener; - struct libinput_timer trackpoint_timer; -+ uint64_t trackpoint_last_event_time; - } palm; - - struct { --- -2.4.3 - diff --git a/0004-evdev-move-posting-a-trackpoint-scroll-event-into-a-.patch b/0004-evdev-move-posting-a-trackpoint-scroll-event-into-a-.patch deleted file mode 100644 index aca4114..0000000 --- a/0004-evdev-move-posting-a-trackpoint-scroll-event-into-a-.patch +++ /dev/null @@ -1,59 +0,0 @@ -From f9503763adbaef8fc7220e2da782917cea8803ee Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 26 Jun 2015 09:27:20 +1000 -Subject: [PATCH libinput 4/9] evdev: move posting a trackpoint scroll event - into a helper - -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 27 +++++++++++++++++++-------- - 1 file changed, 19 insertions(+), 8 deletions(-) - -diff --git a/src/evdev.c b/src/evdev.c -index 67843db..b2595d4 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -253,6 +253,23 @@ normalize_delta(struct evdev_device *device, - normalized->y = delta->y * DEFAULT_MOUSE_DPI / (double)device->dpi; - } - -+static inline bool -+evdev_post_trackpoint_scroll(struct evdev_device *device, -+ struct normalized_coords unaccel, -+ uint64_t time) -+{ -+ if (device->scroll.method != LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN || -+ !hw_is_key_down(device, device->scroll.button)) -+ return false; -+ -+ if (device->scroll.button_scroll_active) -+ evdev_post_scroll(device, time, -+ LIBINPUT_POINTER_AXIS_SOURCE_CONTINUOUS, -+ &unaccel); -+ -+ return true; -+} -+ - static void - evdev_flush_pending_event(struct evdev_device *device, uint64_t time) - { -@@ -275,14 +292,8 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time) - device->rel.y = 0; - - /* Use unaccelerated deltas for pointing stick scroll */ -- if (device->scroll.method == LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN && -- hw_is_key_down(device, device->scroll.button)) { -- if (device->scroll.button_scroll_active) -- evdev_post_scroll(device, time, -- LIBINPUT_POINTER_AXIS_SOURCE_CONTINUOUS, -- &unaccel); -- break; -- } -+ if (evdev_post_trackpoint_scroll(device, unaccel, time)) -+ break; - - /* Apply pointer acceleration. */ - accel = filter_dispatch(device->pointer.filter, --- -2.4.3 - diff --git a/0004-touchpad-disable-trackpoint-palm-detection-on-small-.patch b/0004-touchpad-disable-trackpoint-palm-detection-on-small-.patch deleted file mode 100644 index fff8d5f..0000000 --- a/0004-touchpad-disable-trackpoint-palm-detection-on-small-.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 7fe0a040794bf09c71e08ff3fbdae0a2a94039bd Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 24 Jun 2015 11:41:47 +1000 -Subject: [PATCH libinput 4/4] touchpad: disable trackpoint palm detection on - small touchpads - -Tested on three laptops here, Lenovo T61, X220 and an HP EliteBook (?), all -with small touchpads. It's hard to have a hand position where the palm touches -the touchpad while using the trackpoint. So we might as well save us the -effort of monitoring events and enabling/disabling it on demand. - -As a side-effect this fixes 1233844, but that's more a coincidence. -https://bugzilla.redhat.com/show_bug.cgi?id=1233844 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad.c | 20 ++++++++++++++------ - src/evdev-mt-touchpad.h | 1 + - 2 files changed, 15 insertions(+), 6 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index fa7d06b..163226e 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -520,6 +520,9 @@ tp_palm_detect_trackpoint(struct tp_dispatch *tp, - struct tp_touch *t, - uint64_t time) - { -+ if (!tp->palm.monitor_trackpoint) -+ return 0; -+ - if (t->palm.state == PALM_NONE && - t->state == TOUCH_BEGIN && - tp->palm.trackpoint_active) { -@@ -844,7 +847,8 @@ tp_remove_sendevents(struct tp_dispatch *tp) - libinput_timer_cancel(&tp->palm.trackpoint_timer); - libinput_timer_cancel(&tp->dwt.keyboard_timer); - -- if (tp->buttons.trackpoint) -+ if (tp->buttons.trackpoint && -+ tp->palm.monitor_trackpoint) - libinput_device_remove_event_listener( - &tp->palm.trackpoint_listener); - -@@ -1109,9 +1113,10 @@ tp_interface_device_added(struct evdev_device *device, - /* Don't send any pending releases to the new trackpoint */ - tp->buttons.active_is_topbutton = false; - tp->buttons.trackpoint = added_device; -- libinput_device_add_event_listener(&added_device->base, -- &tp->palm.trackpoint_listener, -- tp_trackpoint_event, tp); -+ if (tp->palm.monitor_trackpoint) -+ libinput_device_add_event_listener(&added_device->base, -+ &tp->palm.trackpoint_listener, -+ tp_trackpoint_event, tp); - } - - if (added_device->tags & EVDEV_TAG_KEYBOARD && -@@ -1150,8 +1155,9 @@ tp_interface_device_removed(struct evdev_device *device, - tp->buttons.active = 0; - tp->buttons.active_is_topbutton = false; - } -- libinput_device_remove_event_listener( -- &tp->palm.trackpoint_listener); -+ if (tp->palm.monitor_trackpoint) -+ libinput_device_remove_event_listener( -+ &tp->palm.trackpoint_listener); - tp->buttons.trackpoint = NULL; - } - -@@ -1457,6 +1463,8 @@ tp_init_palmdetect(struct tp_dispatch *tp, - tp->palm.left_edge = device->abs.absinfo_x->minimum + width * 0.05; - tp->palm.vert_center = device->abs.absinfo_y->minimum + height/2; - -+ tp->palm.monitor_trackpoint = true; -+ - return 0; - } - -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index dcf6319..6462dda 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -281,6 +281,7 @@ struct tp_dispatch { - struct libinput_event_listener trackpoint_listener; - struct libinput_timer trackpoint_timer; - uint64_t trackpoint_last_event_time; -+ bool monitor_trackpoint; - } palm; - - struct { --- -2.4.3 - diff --git a/0005-tools-don-t-drop-the-accelerated-deltas-in-ptraccel-.patch b/0005-tools-don-t-drop-the-accelerated-deltas-in-ptraccel-.patch deleted file mode 100644 index f91623f..0000000 --- a/0005-tools-don-t-drop-the-accelerated-deltas-in-ptraccel-.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 03a02107c597fd1b3e738002431c35bb2057b7ce Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 26 Jun 2015 10:00:24 +1000 -Subject: [PATCH libinput 5/9] tools: don't drop the accelerated deltas in - ptraccel-debug - -Leftover from the initial (out-of-tree) implementation where we updated motion -in place. That hasn't been true since libinput switched to type-safe -coordinates. - -Signed-off-by: Peter Hutterer ---- - tools/ptraccel-debug.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tools/ptraccel-debug.c b/tools/ptraccel-debug.c -index 8b800ee..335781b 100644 ---- a/tools/ptraccel-debug.c -+++ b/tools/ptraccel-debug.c -@@ -95,7 +95,7 @@ print_ptraccel_movement(struct motion_filter *filter, - motion.y = 0; - time += 12; /* pretend 80Hz data */ - -- filter_dispatch(filter, &motion, NULL, time); -+ motion = filter_dispatch(filter, &motion, NULL, time); - - printf("%d %.3f %.3f\n", i, motion.x, dx); - -@@ -129,7 +129,7 @@ print_ptraccel_sequence(struct motion_filter *filter, - motion.y = 0; - time += 12; /* pretend 80Hz data */ - -- filter_dispatch(filter, &motion, NULL, time); -+ motion = filter_dispatch(filter, &motion, NULL, time); - - printf("%d %.3f %.3f\n", i, motion.x, *dx); - } --- -2.4.3 - diff --git a/0006-filter-use-a-tmp-variable-for-the-accel-factor.patch b/0006-filter-use-a-tmp-variable-for-the-accel-factor.patch deleted file mode 100644 index 440a5d3..0000000 --- a/0006-filter-use-a-tmp-variable-for-the-accel-factor.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 07ffabc58c1f967e1efe0b593135e835aa5deed4 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 23 Jun 2015 12:45:55 +1000 -Subject: [PATCH libinput 6/9] filter: use a tmp variable for the accel factor - -No real effect, just makes the diff for debugging printfs smaller. - -Signed-off-by: Peter Hutterer ---- - src/filter.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/filter.c b/src/filter.c -index 69f78b1..1e05782 100644 ---- a/src/filter.c -+++ b/src/filter.c -@@ -385,11 +385,14 @@ pointer_accel_profile_linear(struct motion_filter *filter, - const double max_accel = accel_filter->accel; /* unitless factor */ - const double threshold = accel_filter->threshold; /* units/ms */ - const double incline = accel_filter->incline; -+ double factor; - - s1 = min(1, 0.3 + speed_in * 10); - s2 = 1 + (speed_in - threshold) * incline; - -- return min(max_accel, s2 > 1 ? s2 : s1); -+ factor = min(max_accel, s2 > 1 ? s2 : s1); -+ -+ return factor; - } - - double --- -2.4.3 - diff --git a/0007-Drop-motion-normalization-of-unaccelerated-deltas.patch b/0007-Drop-motion-normalization-of-unaccelerated-deltas.patch deleted file mode 100644 index 5ceaead..0000000 --- a/0007-Drop-motion-normalization-of-unaccelerated-deltas.patch +++ /dev/null @@ -1,289 +0,0 @@ -From 753e5eb654a5da96b5cb42e5d612380adac7229f Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 26 Jun 2015 09:07:24 +1000 -Subject: [PATCH libinput 7/9] Drop motion normalization of unaccelerated - deltas - -This simply doesn't work for low-dpi mice. Normalizing a 400dpi mouse to a -1000dpi mouse forces a minimum movement of 2.5 units and the resulting pixel -jumps. It is impossible for the caller to detect whether the jump was caused -by a single motion or multiple motion events. - -This is technically an API break, but not really. - -The accelerated data was already relatively meaningless, even if normalized as -the data did not correspond predictably to any input motion (unless you know -the implementation acceleration function in the caller). So we can drop the -mention from there without expecting any ill effects in the caller. - -The unaccelerated data was useless for low-dpi mice and could only be used to -measure the physical distance of the mouse movement - something not used in -any caller we're aware of (if needed, we can add that functionality as a -separate call). Dropping motion normalization for unaccelerated deltas also -restores true dpi capabilities to users of that API, mostly games that want to -make use of high-dpi mice. - -This is a simplified patch, the normalization is still in place for most of -libinput, it merely carries the original coordinates in the event itself. - -In the case of touchpads, the coordinates are unnormalized into the x-axis -coordinate space as per the documentation. - -Signed-off-by: Peter Hutterer ---- - doc/normalization-of-relative-motion.dox | 31 +++++++++++++++++++++++++++---- - src/evdev-mt-touchpad-gestures.c | 8 ++++++-- - src/evdev-mt-touchpad.h | 15 +++++++++++++++ - src/evdev.c | 5 ++++- - src/libinput-private.h | 2 +- - src/libinput.c | 10 +++++----- - src/libinput.h | 26 ++++++++++++++------------ - 7 files changed, 72 insertions(+), 25 deletions(-) - -diff --git a/doc/normalization-of-relative-motion.dox b/doc/normalization-of-relative-motion.dox -index aaa1735..dd5d39b 100644 ---- a/doc/normalization-of-relative-motion.dox -+++ b/doc/normalization-of-relative-motion.dox -@@ -12,10 +12,33 @@ physical movement or 10 millimeters, depending on the sensor. This - affects pointer acceleration in libinput and interpretation of relative - coordinates in callers. - --libinput normalizes all relative input to a physical resolution of --1000dpi, the same delta from two different devices thus represents the --same physical movement of those two devices (within sensor error --margins). -+libinput does partial normalization of relative input. For devices with a -+resolution of 1000dpi and higher, motion events are normalized to a default -+of 1000dpi before pointer acceleration is applied. As a result, devices with -+1000dpi and above feel the same. -+ -+Devices below 1000dpi are not normalized (normalization of a 1-device unit -+movement on a 400dpi mouse would cause a 2.5 pixel movement). Instead, -+libinput applies a dpi-dependent acceleration function. At low speeds, a -+1-device unit movement usually translates into a 1-pixel movements. As the -+movement speed increases, acceleration is applied - at high speeds a low-dpi -+device will roughly feel the same as a higher-dpi mouse. -+ -+This normalization only applies to accelerated coordinates, unaccelerated -+coordiantes are left in device-units. It is up to the caller to interpret -+those coordinates correctly. -+ -+@section Normalization of touchpad coordinates -+ -+Touchpads may have a different resolution for the horizontal and vertical -+axis. Interpreting coordinates from the touchpad without taking resolutino -+into account results in uneven motion. -+ -+libinput scales unaccelerated touchpad motion do the resolution of the -+touchpad's x axis, i.e. the unaccelerated value for the y axis is: -+ y = (x / resolution_x) * resolution_y -+ -+@section Setting custom DPI settings - - Devices usually do not advertise their resolution and libinput relies on - the udev property MOUSE_DPI for this information. This property is usually -diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c -index 328a744..e85a9d7 100644 ---- a/src/evdev-mt-touchpad-gestures.c -+++ b/src/evdev-mt-touchpad-gestures.c -@@ -91,6 +91,7 @@ static void - tp_gesture_post_pointer_motion(struct tp_dispatch *tp, uint64_t time) - { - struct normalized_coords delta, unaccel; -+ struct device_float_coords raw; - - /* When a clickpad is clicked, combine motion of all active touches */ - if (tp->buttons.is_clickpad && tp->buttons.state) -@@ -101,8 +102,11 @@ tp_gesture_post_pointer_motion(struct tp_dispatch *tp, uint64_t time) - delta = tp_filter_motion(tp, &unaccel, time); - - if (!normalized_is_zero(delta) || !normalized_is_zero(unaccel)) { -- pointer_notify_motion(&tp->device->base, time, -- &delta, &unaccel); -+ raw = tp_unnormalize_for_xaxis(tp, unaccel); -+ pointer_notify_motion(&tp->device->base, -+ time, -+ &delta, -+ &raw); - } - } - -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index 9357969..08c1732 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -316,6 +316,21 @@ tp_normalize_delta(struct tp_dispatch *tp, struct device_float_coords delta) - return normalized; - } - -+/** -+ * Takes a dpi-normalized set of coordinates, returns a set of coordinates -+ * in the x-axis' coordinate space. -+ */ -+static inline struct device_float_coords -+tp_unnormalize_for_xaxis(struct tp_dispatch *tp, struct normalized_coords delta) -+{ -+ struct device_float_coords raw; -+ -+ raw.x = delta.x / tp->accel.x_scale_coeff; -+ raw.y = delta.y / tp->accel.x_scale_coeff; /* <--- not a typo */ -+ -+ return raw; -+} -+ - struct normalized_coords - tp_get_delta(struct tp_touch *t); - -diff --git a/src/evdev.c b/src/evdev.c -index b2595d4..a5f1d47 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -280,6 +280,7 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time) - struct libinput_seat *seat = base->seat; - struct normalized_coords accel, unaccel; - struct device_coords point; -+ struct device_float_coords raw; - - slot = device->mt.slot; - -@@ -288,6 +289,8 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time) - return; - case EVDEV_RELATIVE_MOTION: - normalize_delta(device, &device->rel, &unaccel); -+ raw.x = device->rel.x; -+ raw.y = device->rel.y; - device->rel.x = 0; - device->rel.y = 0; - -@@ -304,7 +307,7 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time) - if (normalized_is_zero(accel) && normalized_is_zero(unaccel)) - break; - -- pointer_notify_motion(base, time, &accel, &unaccel); -+ pointer_notify_motion(base, time, &accel, &raw); - break; - case EVDEV_ABSOLUTE_MT_DOWN: - if (!(device->seat_caps & EVDEV_DEVICE_TOUCH)) -diff --git a/src/libinput-private.h b/src/libinput-private.h -index a7c8838..2f94597 100644 ---- a/src/libinput-private.h -+++ b/src/libinput-private.h -@@ -319,7 +319,7 @@ void - pointer_notify_motion(struct libinput_device *device, - uint64_t time, - const struct normalized_coords *delta, -- const struct normalized_coords *unaccel); -+ const struct device_float_coords *raw); - - void - pointer_notify_motion_absolute(struct libinput_device *device, -diff --git a/src/libinput.c b/src/libinput.c -index 7a097c0..a6bd079 100644 ---- a/src/libinput.c -+++ b/src/libinput.c -@@ -96,7 +96,7 @@ struct libinput_event_pointer { - struct libinput_event base; - uint32_t time; - struct normalized_coords delta; -- struct normalized_coords delta_unaccel; -+ struct device_float_coords delta_raw; - struct device_coords absolute; - struct discrete_coords discrete; - uint32_t button; -@@ -339,7 +339,7 @@ libinput_event_pointer_get_dx_unaccelerated( - 0, - LIBINPUT_EVENT_POINTER_MOTION); - -- return event->delta_unaccel.x; -+ return event->delta_raw.x; - } - - LIBINPUT_EXPORT double -@@ -351,7 +351,7 @@ libinput_event_pointer_get_dy_unaccelerated( - 0, - LIBINPUT_EVENT_POINTER_MOTION); - -- return event->delta_unaccel.y; -+ return event->delta_raw.y; - } - - LIBINPUT_EXPORT double -@@ -1130,7 +1130,7 @@ void - pointer_notify_motion(struct libinput_device *device, - uint64_t time, - const struct normalized_coords *delta, -- const struct normalized_coords *unaccel) -+ const struct device_float_coords *raw) - { - struct libinput_event_pointer *motion_event; - -@@ -1144,7 +1144,7 @@ pointer_notify_motion(struct libinput_device *device, - *motion_event = (struct libinput_event_pointer) { - .time = time, - .delta = *delta, -- .delta_unaccel = *unaccel, -+ .delta_raw = *raw, - }; - - post_device_event(device, time, -diff --git a/src/libinput.h b/src/libinput.h -index 0d3200f..e76fa9a 100644 ---- a/src/libinput.h -+++ b/src/libinput.h -@@ -460,8 +460,8 @@ libinput_event_pointer_get_time(struct libinput_event_pointer *event); - * If a device employs pointer acceleration, the delta returned by this - * function is the accelerated delta. - * -- * Relative motion deltas are normalized to represent those of a device with -- * 1000dpi resolution. See @ref motion_normalization for more details. -+ * Relative motion deltas are to be interpreted as pixel movement of a -+ * standardized mouse. See @ref motion_normalization for more details. - * - * @note It is an application bug to call this function for events other than - * @ref LIBINPUT_EVENT_POINTER_MOTION. -@@ -481,8 +481,8 @@ libinput_event_pointer_get_dx(struct libinput_event_pointer *event); - * If a device employs pointer acceleration, the delta returned by this - * function is the accelerated delta. - * -- * Relative motion deltas are normalized to represent those of a device with -- * 1000dpi resolution. See @ref motion_normalization for more details. -+ * Relative motion deltas are to be interpreted as pixel movement of a -+ * standardized mouse. See @ref motion_normalization for more details. - * - * @note It is an application bug to call this function for events other than - * @ref LIBINPUT_EVENT_POINTER_MOTION. -@@ -499,10 +499,11 @@ libinput_event_pointer_get_dy(struct libinput_event_pointer *event); - * current event. For pointer events that are not of type @ref - * LIBINPUT_EVENT_POINTER_MOTION, this function returns 0. - * -- * Relative unaccelerated motion deltas are normalized to represent those of a -- * device with 1000dpi resolution. See @ref motion_normalization for more -- * details. Note that unaccelerated events are not equivalent to 'raw' events -- * as read from the device. -+ * Relative unaccelerated motion deltas are raw device coordinates. -+ * Note that these coordinates are subject to the device's native -+ * resolution. Touchpad coordinates represent raw device coordinates in the -+ * X resolution of the touchpad. See @ref motion_normalization for more -+ * details. - * - * @note It is an application bug to call this function for events other than - * @ref LIBINPUT_EVENT_POINTER_MOTION. -@@ -520,10 +521,11 @@ libinput_event_pointer_get_dx_unaccelerated( - * current event. For pointer events that are not of type @ref - * LIBINPUT_EVENT_POINTER_MOTION, this function returns 0. - * -- * Relative unaccelerated motion deltas are normalized to represent those of a -- * device with 1000dpi resolution. See @ref motion_normalization for more -- * details. Note that unaccelerated events are not equivalent to 'raw' events -- * as read from the device. -+ * Relative unaccelerated motion deltas are raw device coordinates. -+ * Note that these coordinates are subject to the device's native -+ * resolution. Touchpad coordinates represent raw device coordinates in the -+ * X resolution of the touchpad. See @ref motion_normalization for more -+ * details. - * - * @note It is an application bug to call this function for events other than - * @ref LIBINPUT_EVENT_POINTER_MOTION. --- -2.4.3 - diff --git a/0008-filter-pass-the-DPI-to-the-acceleration-filter.patch b/0008-filter-pass-the-DPI-to-the-acceleration-filter.patch deleted file mode 100644 index ec494cf..0000000 --- a/0008-filter-pass-the-DPI-to-the-acceleration-filter.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 415bc6d956e9c4836f20e661e3ee77d2adfb1cd5 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 19 Jun 2015 16:03:42 +1000 -Subject: [PATCH libinput 8/9] filter: pass the DPI to the acceleration filter - -Currently unused, but store the ratio of DPI:default DPI for later use. - -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 3 ++- - src/evdev.h | 3 --- - src/filter.c | 7 ++++++- - src/filter.h | 3 ++- - src/libinput-util.h | 3 +++ - tools/ptraccel-debug.c | 3 ++- - 6 files changed, 15 insertions(+), 7 deletions(-) - -diff --git a/src/evdev.c b/src/evdev.c -index a5f1d47..b98b47a 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1409,7 +1409,8 @@ int - evdev_device_init_pointer_acceleration(struct evdev_device *device, - accel_profile_func_t profile) - { -- device->pointer.filter = create_pointer_accelerator_filter(profile); -+ device->pointer.filter = create_pointer_accelerator_filter(profile, -+ device->dpi); - if (!device->pointer.filter) - return -1; - -diff --git a/src/evdev.h b/src/evdev.h -index 566b0a4..b58e021 100644 ---- a/src/evdev.h -+++ b/src/evdev.h -@@ -36,9 +36,6 @@ - #include "timer.h" - #include "filter.h" - --/* The HW DPI rate we normalize to before calculating pointer acceleration */ --#define DEFAULT_MOUSE_DPI 1000 -- - /* - * The constant (linear) acceleration factor we use to normalize trackpoint - * deltas before calculating pointer acceleration. -diff --git a/src/filter.c b/src/filter.c -index 1e05782..04dd2b9 100644 ---- a/src/filter.c -+++ b/src/filter.c -@@ -111,6 +111,8 @@ struct pointer_accelerator { - double threshold; /* units/ms */ - double accel; /* unitless factor */ - double incline; /* incline of the function */ -+ -+ double dpi_factor; - }; - - static void -@@ -346,7 +348,8 @@ struct motion_filter_interface accelerator_interface = { - }; - - struct motion_filter * --create_pointer_accelerator_filter(accel_profile_func_t profile) -+create_pointer_accelerator_filter(accel_profile_func_t profile, -+ int dpi) - { - struct pointer_accelerator *filter; - -@@ -369,6 +372,8 @@ create_pointer_accelerator_filter(accel_profile_func_t profile) - filter->accel = DEFAULT_ACCELERATION; - filter->incline = DEFAULT_INCLINE; - -+ filter->dpi = dpi; -+ - return &filter->base; - } - -diff --git a/src/filter.h b/src/filter.h -index de94997..64a8b50 100644 ---- a/src/filter.h -+++ b/src/filter.h -@@ -58,7 +58,8 @@ typedef double (*accel_profile_func_t)(struct motion_filter *filter, - uint64_t time); - - struct motion_filter * --create_pointer_accelerator_filter(accel_profile_func_t filter); -+create_pointer_accelerator_filter(accel_profile_func_t filter, -+ int dpi); - - /* - * Pointer acceleration profiles. -diff --git a/src/libinput-util.h b/src/libinput-util.h -index 4f73ad4..bb4834e 100644 ---- a/src/libinput-util.h -+++ b/src/libinput-util.h -@@ -37,6 +37,9 @@ - #define VENDOR_ID_APPLE 0x5ac - #define VENDOR_ID_WACOM 0x56a - -+/* The HW DPI rate we normalize to before calculating pointer acceleration */ -+#define DEFAULT_MOUSE_DPI 1000 -+ - void - set_logging_enabled(int enabled); - -diff --git a/tools/ptraccel-debug.c b/tools/ptraccel-debug.c -index 335781b..9fdb4cd 100644 ---- a/tools/ptraccel-debug.c -+++ b/tools/ptraccel-debug.c -@@ -199,7 +199,8 @@ main(int argc, char **argv) - OPT_SPEED, - }; - -- filter = create_pointer_accelerator_filter(pointer_accel_profile_linear); -+ filter = create_pointer_accelerator_filter(pointer_accel_profile_linear, -+ 1000); - assert(filter != NULL); - - while (1) { --- -2.4.3 - diff --git a/0009-filter-add-a-custom-low-dpi-acceleration.patch b/0009-filter-add-a-custom-low-dpi-acceleration.patch deleted file mode 100644 index 2f367d8..0000000 --- a/0009-filter-add-a-custom-low-dpi-acceleration.patch +++ /dev/null @@ -1,170 +0,0 @@ -From 348401a5de950314faadfdd69d160cdeda1362fa Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 23 Jun 2015 12:45:16 +1000 -Subject: [PATCH libinput 9/9] filter: add a custom low-dpi acceleration - -Motion normalization does not work well for devices below the default 1000dpi -rate. A 400dpi mouse's minimum movement generates a 2.5 normalized motion, -causing it to skip pixels at low speeds even when unaccelerated. - -Likewise, we don't want 1000dpi mice to be normalized to a 400dpi mouse, it -feels sluggish even at higher acceleration speeds. -Instead, add a custom acceleration method for lower-dpi mice. At low-speeds, -one device unit results in a one-pixel movement. Depending on the DPI factor, -the acceleration kicks in earlier and goes to higher acceleration so faster -movements with a low-dpi mouse feel approximately the same as the same -movement on a higher-dpi mouse. - -https://bugzilla.redhat.com/show_bug.cgi?id=1231304 - -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 17 ++++++++++++++--- - src/filter.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++------ - src/filter.h | 5 +++++ - 3 files changed, 69 insertions(+), 9 deletions(-) - -diff --git a/src/evdev.c b/src/evdev.c -index b98b47a..1edf93f 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1823,6 +1823,19 @@ evdev_configure_mt_device(struct evdev_device *device) - return 0; - } - -+static inline int -+evdev_init_accel(struct evdev_device *device) -+{ -+ accel_profile_func_t profile; -+ -+ if (device->dpi < DEFAULT_MOUSE_DPI) -+ profile = pointer_accel_profile_linear_low_dpi; -+ else -+ profile = pointer_accel_profile_linear; -+ -+ return evdev_device_init_pointer_acceleration(device, profile); -+} -+ - static int - evdev_configure_device(struct evdev_device *device) - { -@@ -1914,9 +1927,7 @@ evdev_configure_device(struct evdev_device *device) - udev_tags & EVDEV_UDEV_TAG_POINTINGSTICK) { - if (libevdev_has_event_code(evdev, EV_REL, REL_X) && - libevdev_has_event_code(evdev, EV_REL, REL_Y) && -- evdev_device_init_pointer_acceleration( -- device, -- pointer_accel_profile_linear) == -1) -+ evdev_init_accel(device) == -1) - return -1; - - device->seat_caps |= EVDEV_DEVICE_POINTER; -diff --git a/src/filter.c b/src/filter.c -index 04dd2b9..35449f5 100644 ---- a/src/filter.c -+++ b/src/filter.c -@@ -264,8 +264,16 @@ accelerator_filter(struct motion_filter *filter, - double velocity; /* units/ms */ - double accel_value; /* unitless factor */ - struct normalized_coords accelerated; -+ struct normalized_coords unnormalized; -+ double dpi_factor = accel->dpi_factor; - -- feed_trackers(accel, unaccelerated, time); -+ /* For low-dpi mice, use device units, everything else uses -+ 1000dpi normalized */ -+ dpi_factor = min(1.0, dpi_factor); -+ unnormalized.x = unaccelerated->x * dpi_factor; -+ unnormalized.y = unaccelerated->y * dpi_factor; -+ -+ feed_trackers(accel, &unnormalized, time); - velocity = calculate_velocity(accel, time); - accel_value = calculate_acceleration(accel, - data, -@@ -273,10 +281,10 @@ accelerator_filter(struct motion_filter *filter, - accel->last_velocity, - time); - -- accelerated.x = accel_value * unaccelerated->x; -- accelerated.y = accel_value * unaccelerated->y; -+ accelerated.x = accel_value * unnormalized.x; -+ accelerated.y = accel_value * unnormalized.y; - -- accel->last = *unaccelerated; -+ accel->last = unnormalized; - - accel->last_velocity = velocity; - -@@ -372,15 +380,51 @@ create_pointer_accelerator_filter(accel_profile_func_t profile, - filter->accel = DEFAULT_ACCELERATION; - filter->incline = DEFAULT_INCLINE; - -- filter->dpi = dpi; -+ filter->dpi_factor = dpi/(double)DEFAULT_MOUSE_DPI; - - return &filter->base; - } - -+/** -+ * Custom acceleration function for mice < 1000dpi. -+ * At slow motion, a single device unit causes a one-pixel movement. -+ * The threshold/max accel depends on the DPI, the smaller the DPI the -+ * earlier we accelerate and the higher the maximum acceleration is. Result: -+ * at low speeds we get pixel-precision, at high speeds we get approx. the -+ * same movement as a high-dpi mouse. -+ * -+ * Note: data fed to this function is in device units, not normalized. -+ */ -+double -+pointer_accel_profile_linear_low_dpi(struct motion_filter *filter, -+ void *data, -+ double speed_in, /* in device units */ -+ uint64_t time) -+{ -+ struct pointer_accelerator *accel_filter = -+ (struct pointer_accelerator *)filter; -+ -+ double s1, s2; -+ double max_accel = accel_filter->accel; /* unitless factor */ -+ const double threshold = accel_filter->threshold; /* units/ms */ -+ const double incline = accel_filter->incline; -+ double factor; -+ double dpi_factor = accel_filter->dpi_factor; -+ -+ max_accel /= dpi_factor; -+ -+ s1 = min(1, 0.3 + speed_in * 10); -+ s2 = 1 + (speed_in - threshold * dpi_factor) * incline; -+ -+ factor = min(max_accel, s2 > 1 ? s2 : s1); -+ -+ return factor; -+} -+ - double - pointer_accel_profile_linear(struct motion_filter *filter, - void *data, -- double speed_in, -+ double speed_in, /* 1000-dpi normalized */ - uint64_t time) - { - struct pointer_accelerator *accel_filter = -diff --git a/src/filter.h b/src/filter.h -index 64a8b50..617fab1 100644 ---- a/src/filter.h -+++ b/src/filter.h -@@ -66,6 +66,11 @@ create_pointer_accelerator_filter(accel_profile_func_t filter, - */ - - double -+pointer_accel_profile_linear_low_dpi(struct motion_filter *filter, -+ void *data, -+ double speed_in, -+ uint64_t time); -+double - pointer_accel_profile_linear(struct motion_filter *filter, - void *data, - double speed_in, --- -2.4.3 - diff --git a/libinput.spec b/libinput.spec index a825295..185aea9 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 0.18.0 -Release: 5%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 0.19.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,28 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-touchpad-only-send-most-recent-edge-delta-when-trigg.patch -Patch02: 0001-touchpad-reduce-edge-scroll-motion-threshold-to-3mm.patch -Patch03: 0001-touchpad-fix-stuck-finger-after-a-click.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1227039 -Patch04: 0001-filter-reduce-deceleration-to-minimal-speeds-only.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1231304 -Patch05: 0002-evdev-read-dpi-before-evdev_configure_device.patch -Patch06: 0003-evdev-log-device-s-DPI-setting-if-any.patch -Patch07: 0004-evdev-move-posting-a-trackpoint-scroll-event-into-a-.patch -Patch08: 0005-tools-don-t-drop-the-accelerated-deltas-in-ptraccel-.patch -Patch09: 0006-filter-use-a-tmp-variable-for-the-accel-factor.patch -Patch10: 0007-Drop-motion-normalization-of-unaccelerated-deltas.patch -Patch11: 0008-filter-pass-the-DPI-to-the-acceleration-filter.patch -Patch12: 0009-filter-add-a-custom-low-dpi-acceleration.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1233844 -Patch13: 0001-touchpad-move-trackpoint-timer-stuff-into-the-palm-s.patch -Patch14: 0002-touchpad-always-set-touch-palm.time-on-touch-begin.patch -Patch15: 0003-touchpad-improve-trackpoint-palm-detection-responsiv.patch -Patch16: 0004-touchpad-disable-trackpoint-palm-detection-on-small-.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -116,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Jul 06 2015 Peter Hutterer 0.19.0-1 +- libinput 0.19.0 + * Wed Jul 01 2015 Peter Hutterer 0.18.0-5 - Improve trackpoint->touchpad transition responsiveness (#1233844) diff --git a/sources b/sources index e53a1aa..1907a2c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0ddbb0d53d58dec0a86de6791560011a libinput-0.18.0.tar.xz +ddb2c98687c2b9766a9757fd6ec90753 libinput-0.19.0.tar.xz From f91e7233fc2c3fe9e983a49c8c2db9a91dffa8b4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 9 Jul 2015 12:59:22 +1000 Subject: [PATCH 035/317] enable edge scrolling on clickpads (#1225579) --- 0001-test-move-enable_edge_scroll-up.patch | 60 +++ ...-function-for-enabling-click-methods.patch | 240 ++++++++++++ ...ad-allow-edge-scrolling-on-clickpads.patch | 352 ++++++++++++++++++ libinput.spec | 9 +- 4 files changed, 660 insertions(+), 1 deletion(-) create mode 100644 0001-test-move-enable_edge_scroll-up.patch create mode 100644 0002-test-add-helper-function-for-enabling-click-methods.patch create mode 100644 0003-touchpad-allow-edge-scrolling-on-clickpads.patch diff --git a/0001-test-move-enable_edge_scroll-up.patch b/0001-test-move-enable_edge_scroll-up.patch new file mode 100644 index 0000000..a43a4b6 --- /dev/null +++ b/0001-test-move-enable_edge_scroll-up.patch @@ -0,0 +1,60 @@ +From 820376e1d3136d903b97588aa547e84e6de16e66 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 3 Jul 2015 15:17:33 +1000 +Subject: [PATCH libinput 1/3] test: move enable_edge_scroll up + +No functional changes, just so we can group those helpers together. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + test/touchpad.c | 26 +++++++++++++------------- + 1 file changed, 13 insertions(+), 13 deletions(-) + +diff --git a/test/touchpad.c b/test/touchpad.c +index 443c8c1..60c1df1 100644 +--- a/test/touchpad.c ++++ b/test/touchpad.c +@@ -32,6 +32,19 @@ + #include "libinput-util.h" + #include "litest.h" + ++static void ++enable_edge_scroll(struct litest_device *dev) ++{ ++ enum libinput_config_status status, expected; ++ struct libinput_device *device = dev->libinput_device; ++ ++ status = libinput_device_config_scroll_set_method(device, ++ LIBINPUT_CONFIG_SCROLL_EDGE); ++ ++ expected = LIBINPUT_CONFIG_STATUS_SUCCESS; ++ litest_assert_int_eq(status, expected); ++} ++ + START_TEST(touchpad_1fg_motion) + { + struct litest_device *dev = litest_current_device(); +@@ -1442,19 +1455,6 @@ START_TEST(touchpad_scroll_natural) + } + END_TEST + +-static void +-enable_edge_scroll(struct litest_device *dev) +-{ +- enum libinput_config_status status, expected; +- struct libinput_device *device = dev->libinput_device; +- +- status = libinput_device_config_scroll_set_method(device, +- LIBINPUT_CONFIG_SCROLL_EDGE); +- +- expected = LIBINPUT_CONFIG_STATUS_SUCCESS; +- litest_assert_int_eq(status, expected); +-} +- + START_TEST(touchpad_edge_scroll) + { + struct litest_device *dev = litest_current_device(); +-- +2.4.3 + diff --git a/0002-test-add-helper-function-for-enabling-click-methods.patch b/0002-test-add-helper-function-for-enabling-click-methods.patch new file mode 100644 index 0000000..eac8665 --- /dev/null +++ b/0002-test-add-helper-function-for-enabling-click-methods.patch @@ -0,0 +1,240 @@ +From 1aba453326a18bc97c4aa763e3cff30d14357871 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 3 Jul 2015 15:23:41 +1000 +Subject: [PATCH libinput 2/3] test: add helper function for enabling click + methods + +Makes the test code easier to read. In tests where we explicitly check the API +the real calls were left in place. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + test/touchpad.c | 89 ++++++++++++++++++++++++++------------------------------- + 1 file changed, 41 insertions(+), 48 deletions(-) + +diff --git a/test/touchpad.c b/test/touchpad.c +index 60c1df1..4eed097 100644 +--- a/test/touchpad.c ++++ b/test/touchpad.c +@@ -45,6 +45,30 @@ enable_edge_scroll(struct litest_device *dev) + litest_assert_int_eq(status, expected); + } + ++static void ++enable_clickfinger(struct litest_device *dev) ++{ ++ enum libinput_config_status status, expected; ++ struct libinput_device *device = dev->libinput_device; ++ ++ status = libinput_device_config_click_set_method(device, ++ LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); ++ expected = LIBINPUT_CONFIG_STATUS_SUCCESS; ++ litest_assert_int_eq(status, expected); ++} ++ ++static void ++enable_buttonareas(struct litest_device *dev) ++{ ++ enum libinput_config_status status, expected; ++ struct libinput_device *device = dev->libinput_device; ++ ++ status = libinput_device_config_click_set_method(device, ++ LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS); ++ expected = LIBINPUT_CONFIG_STATUS_SUCCESS; ++ litest_assert_int_eq(status, expected); ++} ++ + START_TEST(touchpad_1fg_motion) + { + struct litest_device *dev = litest_current_device(); +@@ -192,11 +216,8 @@ START_TEST(touchpad_1fg_clickfinger) + { + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; +- enum libinput_config_status status; + +- status = libinput_device_config_click_set_method(dev->libinput_device, +- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); +- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); ++ enable_clickfinger(dev); + + litest_drain_events(li); + +@@ -220,11 +241,8 @@ START_TEST(touchpad_1fg_clickfinger_no_touch) + { + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; +- enum libinput_config_status status; + +- status = libinput_device_config_click_set_method(dev->libinput_device, +- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); +- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); ++ enable_clickfinger(dev); + + litest_drain_events(li); + +@@ -246,11 +264,8 @@ START_TEST(touchpad_2fg_clickfinger) + { + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; +- enum libinput_config_status status; + +- status = libinput_device_config_click_set_method(dev->libinput_device, +- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); +- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); ++ enable_clickfinger(dev); + + litest_drain_events(li); + +@@ -277,8 +292,8 @@ START_TEST(touchpad_2fg_clickfinger_distance) + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; + +- libinput_device_config_click_set_method(dev->libinput_device, +- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); ++ enable_clickfinger(dev); ++ + litest_drain_events(li); + + litest_touch_down(dev, 0, 90, 50); +@@ -320,14 +335,11 @@ END_TEST + START_TEST(touchpad_clickfinger_to_area_method) + { + struct litest_device *dev = litest_current_device(); +- enum libinput_config_status status; + struct libinput *li = dev->libinput; + + litest_drain_events(li); + +- status = libinput_device_config_click_set_method(dev->libinput_device, +- LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS); +- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); ++ enable_buttonareas(dev); + + litest_touch_down(dev, 0, 90, 90); + litest_event(dev, EV_KEY, BTN_LEFT, 1); +@@ -342,9 +354,7 @@ START_TEST(touchpad_clickfinger_to_area_method) + litest_assert_button_event(li, BTN_RIGHT, + LIBINPUT_BUTTON_STATE_RELEASED); + +- status = libinput_device_config_click_set_method(dev->libinput_device, +- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); +- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); ++ enable_clickfinger(dev); + + litest_drain_events(li); + +@@ -368,14 +378,11 @@ END_TEST + START_TEST(touchpad_clickfinger_to_area_method_while_down) + { + struct litest_device *dev = litest_current_device(); +- enum libinput_config_status status; + struct libinput *li = dev->libinput; + + litest_drain_events(li); + +- status = libinput_device_config_click_set_method(dev->libinput_device, +- LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS); +- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); ++ enable_buttonareas(dev); + + litest_touch_down(dev, 0, 90, 90); + litest_event(dev, EV_KEY, BTN_LEFT, 1); +@@ -384,9 +391,7 @@ START_TEST(touchpad_clickfinger_to_area_method_while_down) + litest_assert_button_event(li, BTN_RIGHT, + LIBINPUT_BUTTON_STATE_PRESSED); + +- status = libinput_device_config_click_set_method(dev->libinput_device, +- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); +- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); ++ enable_clickfinger(dev); + + litest_event(dev, EV_KEY, BTN_LEFT, 0); + litest_event(dev, EV_SYN, SYN_REPORT, 0); +@@ -418,12 +423,9 @@ END_TEST + START_TEST(touchpad_area_to_clickfinger_method) + { + struct litest_device *dev = litest_current_device(); +- enum libinput_config_status status; + struct libinput *li = dev->libinput; + +- status = libinput_device_config_click_set_method(dev->libinput_device, +- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); +- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); ++ enable_clickfinger(dev); + + litest_drain_events(li); + +@@ -441,9 +443,7 @@ START_TEST(touchpad_area_to_clickfinger_method) + litest_assert_button_event(li, BTN_LEFT, + LIBINPUT_BUTTON_STATE_RELEASED); + +- status = libinput_device_config_click_set_method(dev->libinput_device, +- LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS); +- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); ++ enable_buttonareas(dev); + + litest_touch_down(dev, 0, 90, 90); + litest_event(dev, EV_KEY, BTN_LEFT, 1); +@@ -464,12 +464,9 @@ END_TEST + START_TEST(touchpad_area_to_clickfinger_method_while_down) + { + struct litest_device *dev = litest_current_device(); +- enum libinput_config_status status; + struct libinput *li = dev->libinput; + +- status = libinput_device_config_click_set_method(dev->libinput_device, +- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); +- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); ++ enable_clickfinger(dev); + + litest_drain_events(li); + +@@ -480,9 +477,7 @@ START_TEST(touchpad_area_to_clickfinger_method_while_down) + litest_assert_button_event(li, BTN_LEFT, + LIBINPUT_BUTTON_STATE_PRESSED); + +- status = libinput_device_config_click_set_method(dev->libinput_device, +- LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS); +- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); ++ enable_buttonareas(dev); + + litest_event(dev, EV_KEY, BTN_LEFT, 0); + litest_event(dev, EV_SYN, SYN_REPORT, 0); +@@ -534,8 +529,7 @@ START_TEST(clickpad_btn_left) + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; + +- libinput_device_config_click_set_method(dev->libinput_device, +- LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS); ++ enable_buttonareas(dev); + + litest_drain_events(li); + +@@ -1137,8 +1131,8 @@ START_TEST(clickpad_topsoftbuttons_clickfinger) + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; + +- libinput_device_config_click_set_method(dev->libinput_device, +- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); ++ enable_clickfinger(dev); ++ + litest_drain_events(li); + + litest_touch_down(dev, 0, 90, 5); +@@ -1182,10 +1176,9 @@ START_TEST(clickpad_topsoftbuttons_clickfinger_dev_disabled) + struct litest_device *trackpoint = litest_add_device(li, + LITEST_TRACKPOINT); + +- libinput_device_config_click_set_method(dev->libinput_device, +- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); + libinput_device_config_send_events_set_mode(dev->libinput_device, + LIBINPUT_CONFIG_SEND_EVENTS_DISABLED); ++ enable_clickfinger(dev); + litest_drain_events(li); + + litest_touch_down(dev, 0, 90, 5); +-- +2.4.3 + diff --git a/0003-touchpad-allow-edge-scrolling-on-clickpads.patch b/0003-touchpad-allow-edge-scrolling-on-clickpads.patch new file mode 100644 index 0000000..9b39c12 --- /dev/null +++ b/0003-touchpad-allow-edge-scrolling-on-clickpads.patch @@ -0,0 +1,352 @@ +From d76adf6a52bdc5239b76f0ec738eb02d6261ac7c Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 3 Jul 2015 14:33:41 +1000 +Subject: [PATCH libinput 3/3] touchpad: allow edge scrolling on clickpads + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + doc/scrolling.dox | 6 +- + src/evdev-mt-touchpad-buttons.c | 4 + + src/evdev-mt-touchpad-edge-scroll.c | 21 +++- + src/evdev-mt-touchpad.c | 5 +- + test/touchpad.c | 211 +++++++++++++++++++++++++++++++++++- + 5 files changed, 230 insertions(+), 17 deletions(-) + +diff --git a/doc/scrolling.dox b/doc/scrolling.dox +index 1ecd033..658fe4b 100644 +--- a/doc/scrolling.dox ++++ b/doc/scrolling.dox +@@ -55,10 +55,8 @@ scroll). + Due to the layout of the edges, diagonal scrolling is not possible. The + behavior of edge scrolling using both edges at the same time is undefined. + +-Edge scrolling conflicts with @ref clickpad_softbuttons and is +-not usually available on clickpads. See +-http://who-t.blogspot.com.au/2015/03/why-libinput-doesnt-support-edge.html +-for details. ++Edge scrolling overlaps with @ref clickpad_softbuttons. A physical click on ++a clickpad ends scrolling. + + @section button_scrolling On-Button scrolling + +diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c +index 9c1c096..6def0c1 100644 +--- a/src/evdev-mt-touchpad-buttons.c ++++ b/src/evdev-mt-touchpad-buttons.c +@@ -943,6 +943,10 @@ tp_notify_clickpadbutton(struct tp_dispatch *tp, + if (tp->device->suspended) + return 0; + ++ /* A button click always terminates edge scrolling, even if we ++ * don't end up sending a button event. */ ++ tp_edge_scroll_stop_events(tp, time); ++ + /* + * If the user has requested clickfinger replace the button chosen + * by the softbutton code with one based on the number of fingers. +diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c +index 9a9d3b8..4d5f47a 100644 +--- a/src/evdev-mt-touchpad-edge-scroll.c ++++ b/src/evdev-mt-touchpad-edge-scroll.c +@@ -34,7 +34,6 @@ + + #define CASE_RETURN_STRING(a) case a: return #a + +-#define DEFAULT_SCROLL_LOCK_TIMEOUT 300 /* ms */ + /* Use a reasonably large threshold until locked into scrolling mode, to + avoid accidentally locking in scrolling mode when trying to use the entire + touchpad to move the pointer. The user can wait for the timeout to trigger +@@ -92,6 +91,23 @@ tp_touch_get_edge(struct tp_dispatch *tp, struct tp_touch *t) + return edge; + } + ++static inline void ++tp_edge_scroll_set_timer(struct tp_dispatch *tp, ++ struct tp_touch *t) ++{ ++ const int DEFAULT_SCROLL_LOCK_TIMEOUT = 300; /* ms */ ++ /* if we use software buttons, we disable timeout-based ++ * edge scrolling. A finger resting on the button areas is ++ * likely there to trigger a button event. ++ */ ++ if (tp->buttons.click_method == ++ LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS) ++ return; ++ ++ libinput_timer_set(&t->scroll.timer, ++ t->millis + DEFAULT_SCROLL_LOCK_TIMEOUT); ++} ++ + static void + tp_edge_scroll_set_state(struct tp_dispatch *tp, + struct tp_touch *t, +@@ -108,8 +124,7 @@ tp_edge_scroll_set_state(struct tp_dispatch *tp, + case EDGE_SCROLL_TOUCH_STATE_EDGE_NEW: + t->scroll.edge = tp_touch_get_edge(tp, t); + t->scroll.initial = t->point; +- libinput_timer_set(&t->scroll.timer, +- t->millis + DEFAULT_SCROLL_LOCK_TIMEOUT); ++ tp_edge_scroll_set_timer(tp, t); + break; + case EDGE_SCROLL_TOUCH_STATE_EDGE: + break; +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 2474340..2919267 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1350,14 +1350,11 @@ tp_scroll_config_scroll_method_get_methods(struct libinput_device *device) + { + struct evdev_device *evdev = (struct evdev_device*)device; + struct tp_dispatch *tp = (struct tp_dispatch*)evdev->dispatch; +- uint32_t methods = LIBINPUT_CONFIG_SCROLL_NO_SCROLL; ++ uint32_t methods = LIBINPUT_CONFIG_SCROLL_EDGE; + + if (tp->ntouches >= 2) + methods |= LIBINPUT_CONFIG_SCROLL_2FG; + +- if (!tp->buttons.is_clickpad) +- methods |= LIBINPUT_CONFIG_SCROLL_EDGE; +- + return methods; + } + +diff --git a/test/touchpad.c b/test/touchpad.c +index 4eed097..1e51eb2 100644 +--- a/test/touchpad.c ++++ b/test/touchpad.c +@@ -1490,6 +1490,42 @@ START_TEST(touchpad_edge_scroll) + } + END_TEST + ++START_TEST(touchpad_scroll_defaults) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput_device *device = dev->libinput_device; ++ struct libevdev *evdev = dev->evdev; ++ enum libinput_config_scroll_method method, expected; ++ enum libinput_config_status status; ++ ++ method = libinput_device_config_scroll_get_methods(device); ++ ck_assert(method & LIBINPUT_CONFIG_SCROLL_EDGE); ++ if (libevdev_get_num_slots(evdev) > 1) ++ ck_assert(method & LIBINPUT_CONFIG_SCROLL_2FG); ++ ++ if (libevdev_get_num_slots(evdev) > 1) ++ expected = LIBINPUT_CONFIG_SCROLL_2FG; ++ else ++ expected = LIBINPUT_CONFIG_SCROLL_EDGE; ++ ++ method = libinput_device_config_scroll_get_method(device); ++ ck_assert_int_eq(method, expected); ++ method = libinput_device_config_scroll_get_default_method(device); ++ ck_assert_int_eq(method, expected); ++ ++ status = libinput_device_config_scroll_set_method(device, ++ LIBINPUT_CONFIG_SCROLL_EDGE); ++ ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); ++ status = libinput_device_config_scroll_set_method(device, ++ LIBINPUT_CONFIG_SCROLL_2FG); ++ ++ if (libevdev_get_num_slots(evdev) > 1) ++ ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); ++ else ++ ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_UNSUPPORTED); ++} ++END_TEST ++ + START_TEST(touchpad_edge_scroll_timeout) + { + struct litest_device *dev = litest_current_device(); +@@ -1639,6 +1675,164 @@ START_TEST(touchpad_edge_scroll_no_2fg) + } + END_TEST + ++START_TEST(touchpad_edge_scroll_into_buttonareas) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput *li = dev->libinput; ++ ++ enable_buttonareas(dev); ++ enable_edge_scroll(dev); ++ litest_drain_events(li); ++ ++ litest_touch_down(dev, 0, 99, 40); ++ litest_touch_move_to(dev, 0, 99, 40, 99, 95, 10, 0); ++ litest_assert_only_typed_events(li, ++ LIBINPUT_EVENT_POINTER_AXIS); ++ /* in the button zone now, make sure we still get events */ ++ litest_touch_move_to(dev, 0, 99, 95, 99, 100, 10, 0); ++ litest_assert_only_typed_events(li, ++ LIBINPUT_EVENT_POINTER_AXIS); ++ ++ /* and out of the zone again */ ++ litest_touch_move_to(dev, 0, 99, 100, 99, 70, 10, 0); ++ litest_assert_only_typed_events(li, ++ LIBINPUT_EVENT_POINTER_AXIS); ++ ++ /* still out of the zone */ ++ litest_touch_move_to(dev, 0, 99, 70, 99, 50, 10, 0); ++ litest_assert_only_typed_events(li, ++ LIBINPUT_EVENT_POINTER_AXIS); ++} ++END_TEST ++ ++START_TEST(touchpad_edge_scroll_within_buttonareas) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput *li = dev->libinput; ++ ++ enable_buttonareas(dev); ++ enable_edge_scroll(dev); ++ litest_drain_events(li); ++ ++ litest_touch_down(dev, 0, 20, 99); ++ ++ /* within left button */ ++ litest_touch_move_to(dev, 0, 20, 99, 40, 99, 10, 0); ++ litest_assert_only_typed_events(li, ++ LIBINPUT_EVENT_POINTER_AXIS); ++ ++ /* over to right button */ ++ litest_touch_move_to(dev, 0, 40, 99, 60, 99, 10, 0); ++ litest_assert_only_typed_events(li, ++ LIBINPUT_EVENT_POINTER_AXIS); ++ ++ /* within right button */ ++ litest_touch_move_to(dev, 0, 60, 99, 80, 99, 10, 0); ++ litest_assert_only_typed_events(li, ++ LIBINPUT_EVENT_POINTER_AXIS); ++} ++END_TEST ++ ++START_TEST(touchpad_edge_scroll_buttonareas_click_stops_scroll) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput *li = dev->libinput; ++ struct libinput_event *event; ++ struct libinput_event_pointer *ptrev; ++ double val; ++ ++ enable_buttonareas(dev); ++ enable_edge_scroll(dev); ++ litest_drain_events(li); ++ ++ litest_touch_down(dev, 0, 20, 95); ++ litest_touch_move_to(dev, 0, 20, 95, 70, 95, 10, 5); ++ litest_assert_only_typed_events(li, ++ LIBINPUT_EVENT_POINTER_AXIS); ++ ++ litest_button_click(dev, BTN_LEFT, true); ++ libinput_dispatch(li); ++ ++ event = libinput_get_event(li); ++ ptrev = litest_is_axis_event(event, ++ LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, ++ LIBINPUT_POINTER_AXIS_SOURCE_FINGER); ++ val = libinput_event_pointer_get_axis_value(ptrev, ++ LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL); ++ ck_assert(val == 0.0); ++ libinput_event_destroy(event); ++ ++ event = libinput_get_event(li); ++ ptrev = litest_is_button_event(event, ++ BTN_RIGHT, ++ LIBINPUT_BUTTON_STATE_PRESSED); ++ ++ libinput_event_destroy(event); ++ ++ /* within button areas -> no movement */ ++ litest_touch_move_to(dev, 0, 70, 95, 90, 95, 10, 0); ++ litest_assert_empty_queue(li); ++ ++ litest_button_click(dev, BTN_LEFT, false); ++ ++ litest_assert_only_typed_events(li, ++ LIBINPUT_EVENT_POINTER_BUTTON); ++ ++ litest_touch_up(dev, 0); ++} ++END_TEST ++ ++START_TEST(touchpad_edge_scroll_clickfinger_click_stops_scroll) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput *li = dev->libinput; ++ struct libinput_event *event; ++ struct libinput_event_pointer *ptrev; ++ double val; ++ ++ enable_clickfinger(dev); ++ enable_edge_scroll(dev); ++ litest_drain_events(li); ++ ++ litest_touch_down(dev, 0, 20, 95); ++ litest_touch_move_to(dev, 0, 20, 95, 70, 95, 10, 5); ++ litest_assert_only_typed_events(li, ++ LIBINPUT_EVENT_POINTER_AXIS); ++ ++ litest_button_click(dev, BTN_LEFT, true); ++ libinput_dispatch(li); ++ ++ event = libinput_get_event(li); ++ ptrev = litest_is_axis_event(event, ++ LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, ++ LIBINPUT_POINTER_AXIS_SOURCE_FINGER); ++ val = libinput_event_pointer_get_axis_value(ptrev, ++ LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL); ++ ck_assert(val == 0.0); ++ libinput_event_destroy(event); ++ ++ event = libinput_get_event(li); ++ ptrev = litest_is_button_event(event, ++ BTN_LEFT, ++ LIBINPUT_BUTTON_STATE_PRESSED); ++ ++ libinput_event_destroy(event); ++ ++ /* clickfinger releases pointer -> expect movement */ ++ litest_touch_move_to(dev, 0, 70, 95, 90, 95, 10, 0); ++ litest_assert_only_typed_events(li, ++ LIBINPUT_EVENT_POINTER_MOTION); ++ litest_assert_empty_queue(li); ++ ++ litest_button_click(dev, BTN_LEFT, false); ++ ++ litest_assert_only_typed_events(li, ++ LIBINPUT_EVENT_POINTER_BUTTON); ++ ++ litest_touch_up(dev, 0); ++} ++END_TEST ++ + static int + touchpad_has_palm_detect_size(struct litest_device *dev) + { +@@ -3522,12 +3716,17 @@ litest_setup_tests(void) + litest_add("touchpad:scroll", touchpad_scroll_natural_defaults, LITEST_TOUCHPAD, LITEST_ANY); + litest_add("touchpad:scroll", touchpad_scroll_natural_enable_config, LITEST_TOUCHPAD, LITEST_ANY); + litest_add("touchpad:scroll", touchpad_scroll_natural, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); +- litest_add("touchpad:scroll", touchpad_edge_scroll, LITEST_TOUCHPAD, LITEST_CLICKPAD); +- litest_add("touchpad:scroll", touchpad_edge_scroll_no_motion, LITEST_TOUCHPAD, LITEST_CLICKPAD); +- litest_add("touchpad:scroll", touchpad_edge_scroll_no_edge_after_motion, LITEST_TOUCHPAD, LITEST_CLICKPAD); +- litest_add("touchpad:scroll", touchpad_edge_scroll_timeout, LITEST_TOUCHPAD, LITEST_CLICKPAD); +- litest_add("touchpad:scroll", touchpad_edge_scroll_source, LITEST_TOUCHPAD, LITEST_CLICKPAD); +- litest_add("touchpad:scroll", touchpad_edge_scroll_no_2fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_CLICKPAD); ++ litest_add("touchpad:scroll", touchpad_scroll_defaults, LITEST_TOUCHPAD, LITEST_ANY); ++ litest_add("touchpad:scroll", touchpad_edge_scroll, LITEST_TOUCHPAD, LITEST_ANY); ++ litest_add("touchpad:scroll", touchpad_edge_scroll_no_motion, LITEST_TOUCHPAD, LITEST_ANY); ++ litest_add("touchpad:scroll", touchpad_edge_scroll_no_edge_after_motion, LITEST_TOUCHPAD, LITEST_ANY); ++ litest_add("touchpad:scroll", touchpad_edge_scroll_timeout, LITEST_TOUCHPAD, LITEST_ANY); ++ litest_add("touchpad:scroll", touchpad_edge_scroll_source, LITEST_TOUCHPAD, LITEST_ANY); ++ litest_add("touchpad:scroll", touchpad_edge_scroll_no_2fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); ++ litest_add("touchpad:scroll", touchpad_edge_scroll_into_buttonareas, LITEST_CLICKPAD, LITEST_ANY); ++ litest_add("touchpad:scroll", touchpad_edge_scroll_within_buttonareas, LITEST_CLICKPAD, LITEST_ANY); ++ litest_add("touchpad:scroll", touchpad_edge_scroll_buttonareas_click_stops_scroll, LITEST_CLICKPAD, LITEST_ANY); ++ litest_add("touchpad:scroll", touchpad_edge_scroll_clickfinger_click_stops_scroll, LITEST_CLICKPAD, LITEST_ANY); + + litest_add("touchpad:palm", touchpad_palm_detect_at_edge, LITEST_TOUCHPAD, LITEST_ANY); + litest_add("touchpad:palm", touchpad_palm_detect_at_bottom_corners, LITEST_TOUCHPAD, LITEST_CLICKPAD); +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index 185aea9..64fc05a 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.19.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,10 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-test-move-enable_edge_scroll-up.patch +Patch02: 0002-test-add-helper-function-for-enabling-click-methods.patch +Patch03: 0003-touchpad-allow-edge-scrolling-on-clickpads.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -94,6 +98,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Jul 09 2015 Peter Hutterer 0.19.0-2 +- enable edge scrolling on clickpads (#1225579) + * Mon Jul 06 2015 Peter Hutterer 0.19.0-1 - libinput 0.19.0 From 8ed156bd588dcece30c54855940449b2d4346280 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 14 Jul 2015 09:47:06 +1000 Subject: [PATCH 036/317] Only edge scroll when the finger is on the actual edge --- ...ge-scroll-while-the-finger-is-in-the.patch | 35 +++++++++++++++++++ libinput.spec | 6 +++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-only-edge-scroll-while-the-finger-is-in-the.patch diff --git a/0001-touchpad-only-edge-scroll-while-the-finger-is-in-the.patch b/0001-touchpad-only-edge-scroll-while-the-finger-is-in-the.patch new file mode 100644 index 0000000..dead811 --- /dev/null +++ b/0001-touchpad-only-edge-scroll-while-the-finger-is-in-the.patch @@ -0,0 +1,35 @@ +From 0d320c87c99e93b2feb1703f5bfd5d4fcc0a2857 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 13 Jul 2015 14:14:42 +1000 +Subject: [PATCH libinput] touchpad: only edge-scroll while the finger is in + the edge area + +When the touch leaves the area for edge scrolling after starting to scroll, +discard any movement. This signals to the user that they've left the area and +forces them to lift the finger to switch back to motion. If the finger moves +back into the area, scrolling continues. + +Signed-off-by: Peter Hutterer +--- + src/evdev-mt-touchpad-edge-scroll.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c +index ca9ef4a..4f8362c 100644 +--- a/src/evdev-mt-touchpad-edge-scroll.c ++++ b/src/evdev-mt-touchpad-edge-scroll.c +@@ -384,6 +384,11 @@ tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time) + if (t->palm.state != PALM_NONE) + continue; + ++ /* only scroll with the finger in the previous edge */ ++ if (t->scroll.edge && ++ (tp_touch_get_edge(tp, t) & t->scroll.edge) == 0) ++ continue; ++ + switch (t->scroll.edge) { + case EDGE_NONE: + if (t->scroll.direction != -1) { +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index 64fc05a..f937cf8 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.19.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,6 +21,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} Patch01: 0001-test-move-enable_edge_scroll-up.patch Patch02: 0002-test-add-helper-function-for-enabling-click-methods.patch Patch03: 0003-touchpad-allow-edge-scrolling-on-clickpads.patch +Patch04: 0001-touchpad-only-edge-scroll-while-the-finger-is-in-the.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -98,6 +99,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Jul 14 2015 Peter Hutterer 0.19.0-3 +- Only edge scroll when the finger is on the actual edge + * Thu Jul 09 2015 Peter Hutterer 0.19.0-2 - enable edge scrolling on clickpads (#1225579) From a40d43da67c634fdeba16641e949fabcbf630c4b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 16 Jul 2015 15:07:26 +1000 Subject: [PATCH 037/317] libinput 0.20 --- .gitignore | 1 + 0001-test-move-enable_edge_scroll-up.patch | 60 --- ...-don-t-install-the-litest-udev-rules.patch | 28 ++ ...-function-for-enabling-click-methods.patch | 240 ------------ ...ad-allow-edge-scrolling-on-clickpads.patch | 352 ------------------ libinput.spec | 13 +- sources | 2 +- 7 files changed, 37 insertions(+), 659 deletions(-) delete mode 100644 0001-test-move-enable_edge_scroll-up.patch create mode 100644 0001-udev-don-t-install-the-litest-udev-rules.patch delete mode 100644 0002-test-add-helper-function-for-enabling-click-methods.patch delete mode 100644 0003-touchpad-allow-edge-scrolling-on-clickpads.patch diff --git a/.gitignore b/.gitignore index df14b63..6231fd9 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /libinput-0.17.0.tar.xz /libinput-0.18.0.tar.xz /libinput-0.19.0.tar.xz +/libinput-0.20.0.tar.xz diff --git a/0001-test-move-enable_edge_scroll-up.patch b/0001-test-move-enable_edge_scroll-up.patch deleted file mode 100644 index a43a4b6..0000000 --- a/0001-test-move-enable_edge_scroll-up.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 820376e1d3136d903b97588aa547e84e6de16e66 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 3 Jul 2015 15:17:33 +1000 -Subject: [PATCH libinput 1/3] test: move enable_edge_scroll up - -No functional changes, just so we can group those helpers together. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - test/touchpad.c | 26 +++++++++++++------------- - 1 file changed, 13 insertions(+), 13 deletions(-) - -diff --git a/test/touchpad.c b/test/touchpad.c -index 443c8c1..60c1df1 100644 ---- a/test/touchpad.c -+++ b/test/touchpad.c -@@ -32,6 +32,19 @@ - #include "libinput-util.h" - #include "litest.h" - -+static void -+enable_edge_scroll(struct litest_device *dev) -+{ -+ enum libinput_config_status status, expected; -+ struct libinput_device *device = dev->libinput_device; -+ -+ status = libinput_device_config_scroll_set_method(device, -+ LIBINPUT_CONFIG_SCROLL_EDGE); -+ -+ expected = LIBINPUT_CONFIG_STATUS_SUCCESS; -+ litest_assert_int_eq(status, expected); -+} -+ - START_TEST(touchpad_1fg_motion) - { - struct litest_device *dev = litest_current_device(); -@@ -1442,19 +1455,6 @@ START_TEST(touchpad_scroll_natural) - } - END_TEST - --static void --enable_edge_scroll(struct litest_device *dev) --{ -- enum libinput_config_status status, expected; -- struct libinput_device *device = dev->libinput_device; -- -- status = libinput_device_config_scroll_set_method(device, -- LIBINPUT_CONFIG_SCROLL_EDGE); -- -- expected = LIBINPUT_CONFIG_STATUS_SUCCESS; -- litest_assert_int_eq(status, expected); --} -- - START_TEST(touchpad_edge_scroll) - { - struct litest_device *dev = litest_current_device(); --- -2.4.3 - diff --git a/0001-udev-don-t-install-the-litest-udev-rules.patch b/0001-udev-don-t-install-the-litest-udev-rules.patch new file mode 100644 index 0000000..ce06642 --- /dev/null +++ b/0001-udev-don-t-install-the-litest-udev-rules.patch @@ -0,0 +1,28 @@ +From 32f298c12700d874c265c2486ae10728bea691a0 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 16 Jul 2015 15:15:20 +1000 +Subject: [PATCH libinput] udev: don't install the litest udev rules + +They are installed by the test. + +Signed-off-by: Peter Hutterer +--- + udev/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/udev/Makefile.am b/udev/Makefile.am +index e850e09..975f537 100644 +--- a/udev/Makefile.am ++++ b/udev/Makefile.am +@@ -4,7 +4,7 @@ udev_PROGRAMS = libinput-device-group \ + + litest_rules = 80-libinput-device-groups-litest.rules \ + 90-libinput-model-quirks-litest.rules +-udev_SCRIPTS = $(litest_rules) ++noinst_SCRIPTS = $(litest_rules) + + libinput_device_group_SOURCES = libinput-device-group.c + libinput_device_group_CFLAGS = $(LIBUDEV_CFLAGS) $(GCC_CFLAGS) +-- +2.4.3 + diff --git a/0002-test-add-helper-function-for-enabling-click-methods.patch b/0002-test-add-helper-function-for-enabling-click-methods.patch deleted file mode 100644 index eac8665..0000000 --- a/0002-test-add-helper-function-for-enabling-click-methods.patch +++ /dev/null @@ -1,240 +0,0 @@ -From 1aba453326a18bc97c4aa763e3cff30d14357871 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 3 Jul 2015 15:23:41 +1000 -Subject: [PATCH libinput 2/3] test: add helper function for enabling click - methods - -Makes the test code easier to read. In tests where we explicitly check the API -the real calls were left in place. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - test/touchpad.c | 89 ++++++++++++++++++++++++++------------------------------- - 1 file changed, 41 insertions(+), 48 deletions(-) - -diff --git a/test/touchpad.c b/test/touchpad.c -index 60c1df1..4eed097 100644 ---- a/test/touchpad.c -+++ b/test/touchpad.c -@@ -45,6 +45,30 @@ enable_edge_scroll(struct litest_device *dev) - litest_assert_int_eq(status, expected); - } - -+static void -+enable_clickfinger(struct litest_device *dev) -+{ -+ enum libinput_config_status status, expected; -+ struct libinput_device *device = dev->libinput_device; -+ -+ status = libinput_device_config_click_set_method(device, -+ LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); -+ expected = LIBINPUT_CONFIG_STATUS_SUCCESS; -+ litest_assert_int_eq(status, expected); -+} -+ -+static void -+enable_buttonareas(struct litest_device *dev) -+{ -+ enum libinput_config_status status, expected; -+ struct libinput_device *device = dev->libinput_device; -+ -+ status = libinput_device_config_click_set_method(device, -+ LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS); -+ expected = LIBINPUT_CONFIG_STATUS_SUCCESS; -+ litest_assert_int_eq(status, expected); -+} -+ - START_TEST(touchpad_1fg_motion) - { - struct litest_device *dev = litest_current_device(); -@@ -192,11 +216,8 @@ START_TEST(touchpad_1fg_clickfinger) - { - struct litest_device *dev = litest_current_device(); - struct libinput *li = dev->libinput; -- enum libinput_config_status status; - -- status = libinput_device_config_click_set_method(dev->libinput_device, -- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); -- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); -+ enable_clickfinger(dev); - - litest_drain_events(li); - -@@ -220,11 +241,8 @@ START_TEST(touchpad_1fg_clickfinger_no_touch) - { - struct litest_device *dev = litest_current_device(); - struct libinput *li = dev->libinput; -- enum libinput_config_status status; - -- status = libinput_device_config_click_set_method(dev->libinput_device, -- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); -- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); -+ enable_clickfinger(dev); - - litest_drain_events(li); - -@@ -246,11 +264,8 @@ START_TEST(touchpad_2fg_clickfinger) - { - struct litest_device *dev = litest_current_device(); - struct libinput *li = dev->libinput; -- enum libinput_config_status status; - -- status = libinput_device_config_click_set_method(dev->libinput_device, -- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); -- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); -+ enable_clickfinger(dev); - - litest_drain_events(li); - -@@ -277,8 +292,8 @@ START_TEST(touchpad_2fg_clickfinger_distance) - struct litest_device *dev = litest_current_device(); - struct libinput *li = dev->libinput; - -- libinput_device_config_click_set_method(dev->libinput_device, -- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); -+ enable_clickfinger(dev); -+ - litest_drain_events(li); - - litest_touch_down(dev, 0, 90, 50); -@@ -320,14 +335,11 @@ END_TEST - START_TEST(touchpad_clickfinger_to_area_method) - { - struct litest_device *dev = litest_current_device(); -- enum libinput_config_status status; - struct libinput *li = dev->libinput; - - litest_drain_events(li); - -- status = libinput_device_config_click_set_method(dev->libinput_device, -- LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS); -- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); -+ enable_buttonareas(dev); - - litest_touch_down(dev, 0, 90, 90); - litest_event(dev, EV_KEY, BTN_LEFT, 1); -@@ -342,9 +354,7 @@ START_TEST(touchpad_clickfinger_to_area_method) - litest_assert_button_event(li, BTN_RIGHT, - LIBINPUT_BUTTON_STATE_RELEASED); - -- status = libinput_device_config_click_set_method(dev->libinput_device, -- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); -- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); -+ enable_clickfinger(dev); - - litest_drain_events(li); - -@@ -368,14 +378,11 @@ END_TEST - START_TEST(touchpad_clickfinger_to_area_method_while_down) - { - struct litest_device *dev = litest_current_device(); -- enum libinput_config_status status; - struct libinput *li = dev->libinput; - - litest_drain_events(li); - -- status = libinput_device_config_click_set_method(dev->libinput_device, -- LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS); -- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); -+ enable_buttonareas(dev); - - litest_touch_down(dev, 0, 90, 90); - litest_event(dev, EV_KEY, BTN_LEFT, 1); -@@ -384,9 +391,7 @@ START_TEST(touchpad_clickfinger_to_area_method_while_down) - litest_assert_button_event(li, BTN_RIGHT, - LIBINPUT_BUTTON_STATE_PRESSED); - -- status = libinput_device_config_click_set_method(dev->libinput_device, -- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); -- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); -+ enable_clickfinger(dev); - - litest_event(dev, EV_KEY, BTN_LEFT, 0); - litest_event(dev, EV_SYN, SYN_REPORT, 0); -@@ -418,12 +423,9 @@ END_TEST - START_TEST(touchpad_area_to_clickfinger_method) - { - struct litest_device *dev = litest_current_device(); -- enum libinput_config_status status; - struct libinput *li = dev->libinput; - -- status = libinput_device_config_click_set_method(dev->libinput_device, -- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); -- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); -+ enable_clickfinger(dev); - - litest_drain_events(li); - -@@ -441,9 +443,7 @@ START_TEST(touchpad_area_to_clickfinger_method) - litest_assert_button_event(li, BTN_LEFT, - LIBINPUT_BUTTON_STATE_RELEASED); - -- status = libinput_device_config_click_set_method(dev->libinput_device, -- LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS); -- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); -+ enable_buttonareas(dev); - - litest_touch_down(dev, 0, 90, 90); - litest_event(dev, EV_KEY, BTN_LEFT, 1); -@@ -464,12 +464,9 @@ END_TEST - START_TEST(touchpad_area_to_clickfinger_method_while_down) - { - struct litest_device *dev = litest_current_device(); -- enum libinput_config_status status; - struct libinput *li = dev->libinput; - -- status = libinput_device_config_click_set_method(dev->libinput_device, -- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); -- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); -+ enable_clickfinger(dev); - - litest_drain_events(li); - -@@ -480,9 +477,7 @@ START_TEST(touchpad_area_to_clickfinger_method_while_down) - litest_assert_button_event(li, BTN_LEFT, - LIBINPUT_BUTTON_STATE_PRESSED); - -- status = libinput_device_config_click_set_method(dev->libinput_device, -- LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS); -- ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); -+ enable_buttonareas(dev); - - litest_event(dev, EV_KEY, BTN_LEFT, 0); - litest_event(dev, EV_SYN, SYN_REPORT, 0); -@@ -534,8 +529,7 @@ START_TEST(clickpad_btn_left) - struct litest_device *dev = litest_current_device(); - struct libinput *li = dev->libinput; - -- libinput_device_config_click_set_method(dev->libinput_device, -- LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS); -+ enable_buttonareas(dev); - - litest_drain_events(li); - -@@ -1137,8 +1131,8 @@ START_TEST(clickpad_topsoftbuttons_clickfinger) - struct litest_device *dev = litest_current_device(); - struct libinput *li = dev->libinput; - -- libinput_device_config_click_set_method(dev->libinput_device, -- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); -+ enable_clickfinger(dev); -+ - litest_drain_events(li); - - litest_touch_down(dev, 0, 90, 5); -@@ -1182,10 +1176,9 @@ START_TEST(clickpad_topsoftbuttons_clickfinger_dev_disabled) - struct litest_device *trackpoint = litest_add_device(li, - LITEST_TRACKPOINT); - -- libinput_device_config_click_set_method(dev->libinput_device, -- LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER); - libinput_device_config_send_events_set_mode(dev->libinput_device, - LIBINPUT_CONFIG_SEND_EVENTS_DISABLED); -+ enable_clickfinger(dev); - litest_drain_events(li); - - litest_touch_down(dev, 0, 90, 5); --- -2.4.3 - diff --git a/0003-touchpad-allow-edge-scrolling-on-clickpads.patch b/0003-touchpad-allow-edge-scrolling-on-clickpads.patch deleted file mode 100644 index 9b39c12..0000000 --- a/0003-touchpad-allow-edge-scrolling-on-clickpads.patch +++ /dev/null @@ -1,352 +0,0 @@ -From d76adf6a52bdc5239b76f0ec738eb02d6261ac7c Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 3 Jul 2015 14:33:41 +1000 -Subject: [PATCH libinput 3/3] touchpad: allow edge scrolling on clickpads - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - doc/scrolling.dox | 6 +- - src/evdev-mt-touchpad-buttons.c | 4 + - src/evdev-mt-touchpad-edge-scroll.c | 21 +++- - src/evdev-mt-touchpad.c | 5 +- - test/touchpad.c | 211 +++++++++++++++++++++++++++++++++++- - 5 files changed, 230 insertions(+), 17 deletions(-) - -diff --git a/doc/scrolling.dox b/doc/scrolling.dox -index 1ecd033..658fe4b 100644 ---- a/doc/scrolling.dox -+++ b/doc/scrolling.dox -@@ -55,10 +55,8 @@ scroll). - Due to the layout of the edges, diagonal scrolling is not possible. The - behavior of edge scrolling using both edges at the same time is undefined. - --Edge scrolling conflicts with @ref clickpad_softbuttons and is --not usually available on clickpads. See --http://who-t.blogspot.com.au/2015/03/why-libinput-doesnt-support-edge.html --for details. -+Edge scrolling overlaps with @ref clickpad_softbuttons. A physical click on -+a clickpad ends scrolling. - - @section button_scrolling On-Button scrolling - -diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c -index 9c1c096..6def0c1 100644 ---- a/src/evdev-mt-touchpad-buttons.c -+++ b/src/evdev-mt-touchpad-buttons.c -@@ -943,6 +943,10 @@ tp_notify_clickpadbutton(struct tp_dispatch *tp, - if (tp->device->suspended) - return 0; - -+ /* A button click always terminates edge scrolling, even if we -+ * don't end up sending a button event. */ -+ tp_edge_scroll_stop_events(tp, time); -+ - /* - * If the user has requested clickfinger replace the button chosen - * by the softbutton code with one based on the number of fingers. -diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c -index 9a9d3b8..4d5f47a 100644 ---- a/src/evdev-mt-touchpad-edge-scroll.c -+++ b/src/evdev-mt-touchpad-edge-scroll.c -@@ -34,7 +34,6 @@ - - #define CASE_RETURN_STRING(a) case a: return #a - --#define DEFAULT_SCROLL_LOCK_TIMEOUT 300 /* ms */ - /* Use a reasonably large threshold until locked into scrolling mode, to - avoid accidentally locking in scrolling mode when trying to use the entire - touchpad to move the pointer. The user can wait for the timeout to trigger -@@ -92,6 +91,23 @@ tp_touch_get_edge(struct tp_dispatch *tp, struct tp_touch *t) - return edge; - } - -+static inline void -+tp_edge_scroll_set_timer(struct tp_dispatch *tp, -+ struct tp_touch *t) -+{ -+ const int DEFAULT_SCROLL_LOCK_TIMEOUT = 300; /* ms */ -+ /* if we use software buttons, we disable timeout-based -+ * edge scrolling. A finger resting on the button areas is -+ * likely there to trigger a button event. -+ */ -+ if (tp->buttons.click_method == -+ LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS) -+ return; -+ -+ libinput_timer_set(&t->scroll.timer, -+ t->millis + DEFAULT_SCROLL_LOCK_TIMEOUT); -+} -+ - static void - tp_edge_scroll_set_state(struct tp_dispatch *tp, - struct tp_touch *t, -@@ -108,8 +124,7 @@ tp_edge_scroll_set_state(struct tp_dispatch *tp, - case EDGE_SCROLL_TOUCH_STATE_EDGE_NEW: - t->scroll.edge = tp_touch_get_edge(tp, t); - t->scroll.initial = t->point; -- libinput_timer_set(&t->scroll.timer, -- t->millis + DEFAULT_SCROLL_LOCK_TIMEOUT); -+ tp_edge_scroll_set_timer(tp, t); - break; - case EDGE_SCROLL_TOUCH_STATE_EDGE: - break; -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 2474340..2919267 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -1350,14 +1350,11 @@ tp_scroll_config_scroll_method_get_methods(struct libinput_device *device) - { - struct evdev_device *evdev = (struct evdev_device*)device; - struct tp_dispatch *tp = (struct tp_dispatch*)evdev->dispatch; -- uint32_t methods = LIBINPUT_CONFIG_SCROLL_NO_SCROLL; -+ uint32_t methods = LIBINPUT_CONFIG_SCROLL_EDGE; - - if (tp->ntouches >= 2) - methods |= LIBINPUT_CONFIG_SCROLL_2FG; - -- if (!tp->buttons.is_clickpad) -- methods |= LIBINPUT_CONFIG_SCROLL_EDGE; -- - return methods; - } - -diff --git a/test/touchpad.c b/test/touchpad.c -index 4eed097..1e51eb2 100644 ---- a/test/touchpad.c -+++ b/test/touchpad.c -@@ -1490,6 +1490,42 @@ START_TEST(touchpad_edge_scroll) - } - END_TEST - -+START_TEST(touchpad_scroll_defaults) -+{ -+ struct litest_device *dev = litest_current_device(); -+ struct libinput_device *device = dev->libinput_device; -+ struct libevdev *evdev = dev->evdev; -+ enum libinput_config_scroll_method method, expected; -+ enum libinput_config_status status; -+ -+ method = libinput_device_config_scroll_get_methods(device); -+ ck_assert(method & LIBINPUT_CONFIG_SCROLL_EDGE); -+ if (libevdev_get_num_slots(evdev) > 1) -+ ck_assert(method & LIBINPUT_CONFIG_SCROLL_2FG); -+ -+ if (libevdev_get_num_slots(evdev) > 1) -+ expected = LIBINPUT_CONFIG_SCROLL_2FG; -+ else -+ expected = LIBINPUT_CONFIG_SCROLL_EDGE; -+ -+ method = libinput_device_config_scroll_get_method(device); -+ ck_assert_int_eq(method, expected); -+ method = libinput_device_config_scroll_get_default_method(device); -+ ck_assert_int_eq(method, expected); -+ -+ status = libinput_device_config_scroll_set_method(device, -+ LIBINPUT_CONFIG_SCROLL_EDGE); -+ ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); -+ status = libinput_device_config_scroll_set_method(device, -+ LIBINPUT_CONFIG_SCROLL_2FG); -+ -+ if (libevdev_get_num_slots(evdev) > 1) -+ ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); -+ else -+ ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_UNSUPPORTED); -+} -+END_TEST -+ - START_TEST(touchpad_edge_scroll_timeout) - { - struct litest_device *dev = litest_current_device(); -@@ -1639,6 +1675,164 @@ START_TEST(touchpad_edge_scroll_no_2fg) - } - END_TEST - -+START_TEST(touchpad_edge_scroll_into_buttonareas) -+{ -+ struct litest_device *dev = litest_current_device(); -+ struct libinput *li = dev->libinput; -+ -+ enable_buttonareas(dev); -+ enable_edge_scroll(dev); -+ litest_drain_events(li); -+ -+ litest_touch_down(dev, 0, 99, 40); -+ litest_touch_move_to(dev, 0, 99, 40, 99, 95, 10, 0); -+ litest_assert_only_typed_events(li, -+ LIBINPUT_EVENT_POINTER_AXIS); -+ /* in the button zone now, make sure we still get events */ -+ litest_touch_move_to(dev, 0, 99, 95, 99, 100, 10, 0); -+ litest_assert_only_typed_events(li, -+ LIBINPUT_EVENT_POINTER_AXIS); -+ -+ /* and out of the zone again */ -+ litest_touch_move_to(dev, 0, 99, 100, 99, 70, 10, 0); -+ litest_assert_only_typed_events(li, -+ LIBINPUT_EVENT_POINTER_AXIS); -+ -+ /* still out of the zone */ -+ litest_touch_move_to(dev, 0, 99, 70, 99, 50, 10, 0); -+ litest_assert_only_typed_events(li, -+ LIBINPUT_EVENT_POINTER_AXIS); -+} -+END_TEST -+ -+START_TEST(touchpad_edge_scroll_within_buttonareas) -+{ -+ struct litest_device *dev = litest_current_device(); -+ struct libinput *li = dev->libinput; -+ -+ enable_buttonareas(dev); -+ enable_edge_scroll(dev); -+ litest_drain_events(li); -+ -+ litest_touch_down(dev, 0, 20, 99); -+ -+ /* within left button */ -+ litest_touch_move_to(dev, 0, 20, 99, 40, 99, 10, 0); -+ litest_assert_only_typed_events(li, -+ LIBINPUT_EVENT_POINTER_AXIS); -+ -+ /* over to right button */ -+ litest_touch_move_to(dev, 0, 40, 99, 60, 99, 10, 0); -+ litest_assert_only_typed_events(li, -+ LIBINPUT_EVENT_POINTER_AXIS); -+ -+ /* within right button */ -+ litest_touch_move_to(dev, 0, 60, 99, 80, 99, 10, 0); -+ litest_assert_only_typed_events(li, -+ LIBINPUT_EVENT_POINTER_AXIS); -+} -+END_TEST -+ -+START_TEST(touchpad_edge_scroll_buttonareas_click_stops_scroll) -+{ -+ struct litest_device *dev = litest_current_device(); -+ struct libinput *li = dev->libinput; -+ struct libinput_event *event; -+ struct libinput_event_pointer *ptrev; -+ double val; -+ -+ enable_buttonareas(dev); -+ enable_edge_scroll(dev); -+ litest_drain_events(li); -+ -+ litest_touch_down(dev, 0, 20, 95); -+ litest_touch_move_to(dev, 0, 20, 95, 70, 95, 10, 5); -+ litest_assert_only_typed_events(li, -+ LIBINPUT_EVENT_POINTER_AXIS); -+ -+ litest_button_click(dev, BTN_LEFT, true); -+ libinput_dispatch(li); -+ -+ event = libinput_get_event(li); -+ ptrev = litest_is_axis_event(event, -+ LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, -+ LIBINPUT_POINTER_AXIS_SOURCE_FINGER); -+ val = libinput_event_pointer_get_axis_value(ptrev, -+ LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL); -+ ck_assert(val == 0.0); -+ libinput_event_destroy(event); -+ -+ event = libinput_get_event(li); -+ ptrev = litest_is_button_event(event, -+ BTN_RIGHT, -+ LIBINPUT_BUTTON_STATE_PRESSED); -+ -+ libinput_event_destroy(event); -+ -+ /* within button areas -> no movement */ -+ litest_touch_move_to(dev, 0, 70, 95, 90, 95, 10, 0); -+ litest_assert_empty_queue(li); -+ -+ litest_button_click(dev, BTN_LEFT, false); -+ -+ litest_assert_only_typed_events(li, -+ LIBINPUT_EVENT_POINTER_BUTTON); -+ -+ litest_touch_up(dev, 0); -+} -+END_TEST -+ -+START_TEST(touchpad_edge_scroll_clickfinger_click_stops_scroll) -+{ -+ struct litest_device *dev = litest_current_device(); -+ struct libinput *li = dev->libinput; -+ struct libinput_event *event; -+ struct libinput_event_pointer *ptrev; -+ double val; -+ -+ enable_clickfinger(dev); -+ enable_edge_scroll(dev); -+ litest_drain_events(li); -+ -+ litest_touch_down(dev, 0, 20, 95); -+ litest_touch_move_to(dev, 0, 20, 95, 70, 95, 10, 5); -+ litest_assert_only_typed_events(li, -+ LIBINPUT_EVENT_POINTER_AXIS); -+ -+ litest_button_click(dev, BTN_LEFT, true); -+ libinput_dispatch(li); -+ -+ event = libinput_get_event(li); -+ ptrev = litest_is_axis_event(event, -+ LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, -+ LIBINPUT_POINTER_AXIS_SOURCE_FINGER); -+ val = libinput_event_pointer_get_axis_value(ptrev, -+ LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL); -+ ck_assert(val == 0.0); -+ libinput_event_destroy(event); -+ -+ event = libinput_get_event(li); -+ ptrev = litest_is_button_event(event, -+ BTN_LEFT, -+ LIBINPUT_BUTTON_STATE_PRESSED); -+ -+ libinput_event_destroy(event); -+ -+ /* clickfinger releases pointer -> expect movement */ -+ litest_touch_move_to(dev, 0, 70, 95, 90, 95, 10, 0); -+ litest_assert_only_typed_events(li, -+ LIBINPUT_EVENT_POINTER_MOTION); -+ litest_assert_empty_queue(li); -+ -+ litest_button_click(dev, BTN_LEFT, false); -+ -+ litest_assert_only_typed_events(li, -+ LIBINPUT_EVENT_POINTER_BUTTON); -+ -+ litest_touch_up(dev, 0); -+} -+END_TEST -+ - static int - touchpad_has_palm_detect_size(struct litest_device *dev) - { -@@ -3522,12 +3716,17 @@ litest_setup_tests(void) - litest_add("touchpad:scroll", touchpad_scroll_natural_defaults, LITEST_TOUCHPAD, LITEST_ANY); - litest_add("touchpad:scroll", touchpad_scroll_natural_enable_config, LITEST_TOUCHPAD, LITEST_ANY); - litest_add("touchpad:scroll", touchpad_scroll_natural, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); -- litest_add("touchpad:scroll", touchpad_edge_scroll, LITEST_TOUCHPAD, LITEST_CLICKPAD); -- litest_add("touchpad:scroll", touchpad_edge_scroll_no_motion, LITEST_TOUCHPAD, LITEST_CLICKPAD); -- litest_add("touchpad:scroll", touchpad_edge_scroll_no_edge_after_motion, LITEST_TOUCHPAD, LITEST_CLICKPAD); -- litest_add("touchpad:scroll", touchpad_edge_scroll_timeout, LITEST_TOUCHPAD, LITEST_CLICKPAD); -- litest_add("touchpad:scroll", touchpad_edge_scroll_source, LITEST_TOUCHPAD, LITEST_CLICKPAD); -- litest_add("touchpad:scroll", touchpad_edge_scroll_no_2fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_CLICKPAD); -+ litest_add("touchpad:scroll", touchpad_scroll_defaults, LITEST_TOUCHPAD, LITEST_ANY); -+ litest_add("touchpad:scroll", touchpad_edge_scroll, LITEST_TOUCHPAD, LITEST_ANY); -+ litest_add("touchpad:scroll", touchpad_edge_scroll_no_motion, LITEST_TOUCHPAD, LITEST_ANY); -+ litest_add("touchpad:scroll", touchpad_edge_scroll_no_edge_after_motion, LITEST_TOUCHPAD, LITEST_ANY); -+ litest_add("touchpad:scroll", touchpad_edge_scroll_timeout, LITEST_TOUCHPAD, LITEST_ANY); -+ litest_add("touchpad:scroll", touchpad_edge_scroll_source, LITEST_TOUCHPAD, LITEST_ANY); -+ litest_add("touchpad:scroll", touchpad_edge_scroll_no_2fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); -+ litest_add("touchpad:scroll", touchpad_edge_scroll_into_buttonareas, LITEST_CLICKPAD, LITEST_ANY); -+ litest_add("touchpad:scroll", touchpad_edge_scroll_within_buttonareas, LITEST_CLICKPAD, LITEST_ANY); -+ litest_add("touchpad:scroll", touchpad_edge_scroll_buttonareas_click_stops_scroll, LITEST_CLICKPAD, LITEST_ANY); -+ litest_add("touchpad:scroll", touchpad_edge_scroll_clickfinger_click_stops_scroll, LITEST_CLICKPAD, LITEST_ANY); - - litest_add("touchpad:palm", touchpad_palm_detect_at_edge, LITEST_TOUCHPAD, LITEST_ANY); - litest_add("touchpad:palm", touchpad_palm_detect_at_bottom_corners, LITEST_TOUCHPAD, LITEST_CLICKPAD); --- -2.4.3 - diff --git a/libinput.spec b/libinput.spec index f937cf8..b2596cf 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 0.19.0 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 0.20.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,10 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-test-move-enable_edge_scroll-up.patch -Patch02: 0002-test-add-helper-function-for-enabling-click-methods.patch -Patch03: 0003-touchpad-allow-edge-scrolling-on-clickpads.patch Patch04: 0001-touchpad-only-edge-scroll-while-the-finger-is-in-the.patch +Patch05: 0001-udev-don-t-install-the-litest-udev-rules.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -83,7 +81,7 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %doc COPYING %{_libdir}/libinput.so.* %{udevdir}/libinput-device-group -%{udevdir}/rules.d/80-libinput-device-groups.rules +%{udevdir}/libinput-model-quirks %{udevdir}/rules.d/80-libinput-device-groups.rules %{udevdir}/rules.d/90-libinput-model-quirks.rules %{udevdir}/hwdb.d/90-libinput-model-quirks.hwdb @@ -99,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Jul 16 2015 Peter Hutterer 0.20.0-1 +- libinput 0.20 + * Tue Jul 14 2015 Peter Hutterer 0.19.0-3 - Only edge scroll when the finger is on the actual edge diff --git a/sources b/sources index 1907a2c..9e00cd3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ddb2c98687c2b9766a9757fd6ec90753 libinput-0.19.0.tar.xz +444f3a4061be560310cb761cac6fa178 libinput-0.20.0.tar.xz From d704a72b3d920e44300ef31d2549036d031df3d7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 21 Jul 2015 15:21:10 +1000 Subject: [PATCH 038/317] Restore parsing for trackpoing const accel --- ...inting-stick-const-accel-property-pa.patch | 58 +++++++++++++++++++ libinput.spec | 6 +- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 0001-evdev-restore-pointing-stick-const-accel-property-pa.patch diff --git a/0001-evdev-restore-pointing-stick-const-accel-property-pa.patch b/0001-evdev-restore-pointing-stick-const-accel-property-pa.patch new file mode 100644 index 0000000..2ecf862 --- /dev/null +++ b/0001-evdev-restore-pointing-stick-const-accel-property-pa.patch @@ -0,0 +1,58 @@ +From c096bedd8b21864b5ce27403a628c519ad00e148 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 21 Jul 2015 09:33:47 +1000 +Subject: [PATCH libinput] evdev: restore pointing stick const accel property + parsing + +Regression introduced in 8302860. + +Reading the DPI before evdev_configure_device makes it lose on the trackpoint +flag, causing libinput to ignore the POINTINGSTICK_CONST_ACCEL property. + +8302860 moved it up so we can init accel based on the DPI, this patch simply +moves istart t before the acceleration is initialized. + +https://bugs.freedesktop.org/show_bug.cgi?id=91369 + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index 05d9b17..07934de 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1958,6 +1958,10 @@ evdev_configure_device(struct evdev_device *device) + + if (udev_tags & EVDEV_UDEV_TAG_MOUSE || + udev_tags & EVDEV_UDEV_TAG_POINTINGSTICK) { ++ evdev_tag_external_mouse(device, device->udev_device); ++ evdev_tag_trackpoint(device, device->udev_device); ++ device->dpi = evdev_read_dpi_prop(device); ++ + if (libevdev_has_event_code(evdev, EV_REL, REL_X) && + libevdev_has_event_code(evdev, EV_REL, REL_Y) && + evdev_init_accel(device) == -1) +@@ -1975,9 +1979,6 @@ evdev_configure_device(struct evdev_device *device) + device->scroll.natural_scrolling_enabled = true; + /* want button scrolling config option */ + device->scroll.want_button = 1; +- +- evdev_tag_external_mouse(device, device->udev_device); +- evdev_tag_trackpoint(device, device->udev_device); + } + + if (udev_tags & EVDEV_UDEV_TAG_KEYBOARD) { +@@ -2146,7 +2147,7 @@ evdev_device_create(struct libinput_seat *seat, + device->scroll.wheel_click_angle = + evdev_read_wheel_click_prop(device); + device->model = evdev_read_model(device); +- device->dpi = evdev_read_dpi_prop(device); ++ device->dpi = DEFAULT_MOUSE_DPI; + + /* at most 5 SYN_DROPPED log-messages per 30s */ + ratelimit_init(&device->syn_drop_limit, 30ULL * 1000, 5); +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index b2596cf..8e600cf 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.20.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -20,6 +20,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} Patch04: 0001-touchpad-only-edge-scroll-while-the-finger-is-in-the.patch Patch05: 0001-udev-don-t-install-the-litest-udev-rules.patch +Patch06: 0001-evdev-restore-pointing-stick-const-accel-property-pa.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -97,6 +98,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Jul 21 2015 Peter Hutterer 0.20.0-2 +- Restore parsing for trackpoing const accel + * Thu Jul 16 2015 Peter Hutterer 0.20.0-1 - libinput 0.20 From 78cb319ab72221cf15620820ef3acccc15ded74b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 24 Jul 2015 08:38:31 +1000 Subject: [PATCH 039/317] Disable thumb detection, too many false positives (#1246093) --- ...etection-it-s-too-aggressive-1246093.patch | 26 +++++++++++++++++++ libinput.spec | 7 ++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 0001-Disable-thumb-detection-it-s-too-aggressive-1246093.patch diff --git a/0001-Disable-thumb-detection-it-s-too-aggressive-1246093.patch b/0001-Disable-thumb-detection-it-s-too-aggressive-1246093.patch new file mode 100644 index 0000000..9894950 --- /dev/null +++ b/0001-Disable-thumb-detection-it-s-too-aggressive-1246093.patch @@ -0,0 +1,26 @@ +From a899d62c05d322581bd86e2d16be588e4655e1b6 Mon Sep 17 00:00:00 2001 +From: Fedora X Ninjas +Date: Fri, 24 Jul 2015 08:35:08 +1000 +Subject: [PATCH] Disable thumb detection, it's too aggressive (#1246093) + +--- + src/evdev-mt-touchpad.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index cbe8bed..360f930 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1507,6 +1507,9 @@ tp_init_thumb(struct tp_dispatch *tp) + struct evdev_device *device = tp->device; + const struct input_absinfo *abs; + ++ /* FEDORA: disable thumb detection, too aggressive */ ++ return 0; ++ + abs = libevdev_get_abs_info(device->evdev, ABS_MT_PRESSURE); + if (!abs) + return 0; +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index 8e600cf..5a0f773 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.20.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,6 +21,8 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} Patch04: 0001-touchpad-only-edge-scroll-while-the-finger-is-in-the.patch Patch05: 0001-udev-don-t-install-the-litest-udev-rules.patch Patch06: 0001-evdev-restore-pointing-stick-const-accel-property-pa.patch +# Fedora-specific, remove when thumb detection is fixed upstream +Patch07: 0001-Disable-thumb-detection-it-s-too-aggressive-1246093.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -98,6 +100,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Jul 24 2015 Peter Hutterer 0.20.0-3 +- Disable thumb detection, too many false positives (#1246093) + * Tue Jul 21 2015 Peter Hutterer 0.20.0-2 - Restore parsing for trackpoing const accel From 014ea42f096b8ea7ac5c3de8479ef5898e64cc42 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 29 Jul 2015 08:21:50 +1000 Subject: [PATCH 040/317] Disable 2fg scrolling on Synaptics semi-mt (#1235175) --- ...a-leftover-check-for-fake-resolution.patch | 47 ++++ ...multiple-LIBINPUT_MODEL_-flags-per-d.patch | 213 +++++++++++++++ ...rial-touchpads-with-a-LIBINPUT_MODEL.patch | 114 ++++++++ ...-2fg-scrolling-on-Synaptics-semi-mt-.patch | 253 ++++++++++++++++++ libinput.spec | 10 +- 5 files changed, 636 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-remove-a-leftover-check-for-fake-resolution.patch create mode 100644 0002-evdev-allow-for-multiple-LIBINPUT_MODEL_-flags-per-d.patch create mode 100644 0003-Tag-synaptics-serial-touchpads-with-a-LIBINPUT_MODEL.patch create mode 100644 0004-touchpad-disable-2fg-scrolling-on-Synaptics-semi-mt-.patch diff --git a/0001-touchpad-remove-a-leftover-check-for-fake-resolution.patch b/0001-touchpad-remove-a-leftover-check-for-fake-resolution.patch new file mode 100644 index 0000000..d86deed --- /dev/null +++ b/0001-touchpad-remove-a-leftover-check-for-fake-resolution.patch @@ -0,0 +1,47 @@ +From 7ac32de18ca54a3a7d0b8147facc0ba7ebb9dbd4 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 16 Jul 2015 15:54:47 +1000 +Subject: [PATCH libinput 1/4] touchpad: remove a leftover check for fake + resolution + +obsolete since 8658ff159d416b6a567acb2aaf72b27887ad8576. And once we remove +that all we checkf or is Apple models which we set a resolution for in +systemd. So that check is obsolete now too. + +Signed-off-by: Peter Hutterer +(cherry picked from commit 4ca70c813f750721592d1a68aced385560705256) +--- + src/evdev-mt-touchpad.c | 15 +++++---------- + 1 file changed, 5 insertions(+), 10 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 360f930..80827da 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1464,18 +1464,13 @@ tp_init_palmdetect(struct tp_dispatch *tp, + + /* Wacom doesn't have internal touchpads, + * Apple touchpads are always big enough to warrant palm detection */ +- if (device->model == EVDEV_MODEL_WACOM_TOUCHPAD) { ++ if (device->model == EVDEV_MODEL_WACOM_TOUCHPAD) + return 0; +- } else if (device->model != EVDEV_MODEL_APPLE_TOUCHPAD) { +- /* We don't know how big the touchpad is */ +- if (device->abs.absinfo_x->resolution == 1) +- return 0; + +- /* Enable palm detection on touchpads >= 70 mm. Anything smaller +- probably won't need it, until we find out it does */ +- if (width/device->abs.absinfo_x->resolution < 70) +- return 0; +- } ++ /* Enable palm detection on touchpads >= 70 mm. Anything smaller ++ probably won't need it, until we find out it does */ ++ if (width/device->abs.absinfo_x->resolution < 70) ++ return 0; + + /* palm edges are 5% of the width on each side */ + tp->palm.right_edge = device->abs.absinfo_x->maximum - width * 0.05; +-- +2.4.3 + diff --git a/0002-evdev-allow-for-multiple-LIBINPUT_MODEL_-flags-per-d.patch b/0002-evdev-allow-for-multiple-LIBINPUT_MODEL_-flags-per-d.patch new file mode 100644 index 0000000..37a6cdf --- /dev/null +++ b/0002-evdev-allow-for-multiple-LIBINPUT_MODEL_-flags-per-d.patch @@ -0,0 +1,213 @@ +From da530d630f78bc208a35fd1a6912397253f8db87 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 16 Jul 2015 15:59:01 +1000 +Subject: [PATCH libinput 2/4] evdev: allow for multiple LIBINPUT_MODEL_* flags + per device + +On some devices we need to set more than one flag, i.e. make it into actual +flags. + +Signed-off-by: Peter Hutterer +Hallelujah-expressed-by: Benjamin Tissoires +Reviewed-by: Hans de Goede +(cherry picked from commit aacf40341dc13761d564ecf910dc833073ae39ae) +--- + src/evdev-mt-touchpad-buttons.c | 17 +++++++---------- + src/evdev-mt-touchpad.c | 12 ++++-------- + src/evdev.c | 11 ++++++----- + src/evdev.h | 22 +++++++++++----------- + udev/90-libinput-model-quirks.rules.in | 10 ++-------- + 5 files changed, 30 insertions(+), 42 deletions(-) + +diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c +index 5ecdccd..6852758 100644 +--- a/src/evdev-mt-touchpad-buttons.c ++++ b/src/evdev-mt-touchpad-buttons.c +@@ -641,22 +641,19 @@ static enum libinput_config_click_method + tp_click_get_default_method(struct tp_dispatch *tp) + { + struct evdev_device *device = tp->device; ++ uint32_t clickfinger_models = EVDEV_MODEL_CHROMEBOOK | ++ EVDEV_MODEL_SYSTEM76_BONOBO | ++ EVDEV_MODEL_SYSTEM76_GALAGO | ++ EVDEV_MODEL_SYSTEM76_KUDU | ++ EVDEV_MODEL_CLEVO_W740SU; + + if (!tp->buttons.is_clickpad) + return LIBINPUT_CONFIG_CLICK_METHOD_NONE; + else if (libevdev_get_id_vendor(tp->device->evdev) == VENDOR_ID_APPLE) + return LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER; + +- switch (device->model) { +- case EVDEV_MODEL_CHROMEBOOK: +- case EVDEV_MODEL_SYSTEM76_BONOBO: +- case EVDEV_MODEL_SYSTEM76_GALAGO: +- case EVDEV_MODEL_SYSTEM76_KUDU: +- case EVDEV_MODEL_CLEVO_W740SU: ++ if (device->model_flags & clickfinger_models) + return LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER; +- default: +- break; +- } + + return LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS; + } +@@ -688,7 +685,7 @@ tp_init_middlebutton_emulation(struct tp_dispatch *tp, + if (!libevdev_has_event_code(device->evdev, EV_KEY, BTN_MIDDLE)) { + enable_by_default = true; + want_config_option = false; +- } else if (device->model == EVDEV_MODEL_ALPS_TOUCHPAD) { ++ } else if (device->model_flags & EVDEV_MODEL_ALPS_TOUCHPAD) { + enable_by_default = true; + want_config_option = true; + } else +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 80827da..c5c54bb 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1228,7 +1228,7 @@ evdev_tag_touchpad(struct evdev_device *device, + */ + bustype = libevdev_get_id_bustype(device->evdev); + if (bustype == BUS_USB) { +- if (device->model == EVDEV_MODEL_APPLE_TOUCHPAD) ++ if (device->model_flags & EVDEV_MODEL_APPLE_TOUCHPAD) + device->tags |= EVDEV_TAG_INTERNAL_TOUCHPAD; + } else if (bustype != BUS_BLUETOOTH) + device->tags |= EVDEV_TAG_INTERNAL_TOUCHPAD; +@@ -1354,14 +1354,10 @@ tp_init_accel(struct tp_dispatch *tp, double diagonal) + tp->accel.x_scale_coeff = (DEFAULT_MOUSE_DPI/25.4) / res_x; + tp->accel.y_scale_coeff = (DEFAULT_MOUSE_DPI/25.4) / res_y; + +- switch (tp->device->model) { +- case EVDEV_MODEL_LENOVO_X230: ++ if (tp->device->model_flags & EVDEV_MODEL_LENOVO_X230) + profile = touchpad_lenovo_x230_accel_profile; +- break; +- default: ++ else + profile = touchpad_accel_profile_linear; +- break; +- } + + if (evdev_device_init_pointer_acceleration(tp->device, profile) == -1) + return -1; +@@ -1464,7 +1460,7 @@ tp_init_palmdetect(struct tp_dispatch *tp, + + /* Wacom doesn't have internal touchpads, + * Apple touchpads are always big enough to warrant palm detection */ +- if (device->model == EVDEV_MODEL_WACOM_TOUCHPAD) ++ if (device->model_flags & EVDEV_MODEL_WACOM_TOUCHPAD) + return 0; + + /* Enable palm detection on touchpads >= 70 mm. Anything smaller +diff --git a/src/evdev.c b/src/evdev.c +index 950b334..2e757d8 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1521,8 +1521,8 @@ evdev_read_dpi_prop(struct evdev_device *device) + return dpi; + } + +-static inline enum evdev_device_model +-evdev_read_model(struct evdev_device *device) ++static inline uint32_t ++evdev_read_model_flags(struct evdev_device *device) + { + const struct model_map { + const char *property; +@@ -1540,15 +1540,16 @@ evdev_read_model(struct evdev_device *device) + { NULL, EVDEV_MODEL_DEFAULT }, + }; + const struct model_map *m = model_map; ++ uint32_t model_flags = 0; + + while (m->property) { + if (!!udev_device_get_property_value(device->udev_device, + m->property)) +- break; ++ model_flags |= m->model; + m++; + } + +- return m->model; ++ return model_flags; + } + + static inline int +@@ -2142,7 +2143,7 @@ evdev_device_create(struct libinput_seat *seat, + device->scroll.direction = 0; + device->scroll.wheel_click_angle = + evdev_read_wheel_click_prop(device); +- device->model = evdev_read_model(device); ++ device->model_flags = evdev_read_model_flags(device); + device->dpi = DEFAULT_MOUSE_DPI; + + /* at most 5 SYN_DROPPED log-messages per 30s */ +diff --git a/src/evdev.h b/src/evdev.h +index 77db1b4..363f93b 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -95,16 +95,16 @@ enum evdev_middlebutton_event { + }; + + enum evdev_device_model { +- EVDEV_MODEL_DEFAULT, +- EVDEV_MODEL_LENOVO_X230, +- EVDEV_MODEL_CHROMEBOOK, +- EVDEV_MODEL_SYSTEM76_BONOBO, +- EVDEV_MODEL_SYSTEM76_GALAGO, +- EVDEV_MODEL_SYSTEM76_KUDU, +- EVDEV_MODEL_CLEVO_W740SU, +- EVDEV_MODEL_APPLE_TOUCHPAD, +- EVDEV_MODEL_WACOM_TOUCHPAD, +- EVDEV_MODEL_ALPS_TOUCHPAD, ++ EVDEV_MODEL_DEFAULT = 0, ++ EVDEV_MODEL_LENOVO_X230 = (1 << 0), ++ EVDEV_MODEL_CHROMEBOOK = (1 << 1), ++ EVDEV_MODEL_SYSTEM76_BONOBO = (1 << 2), ++ EVDEV_MODEL_SYSTEM76_GALAGO = (1 << 3), ++ EVDEV_MODEL_SYSTEM76_KUDU = (1 << 4), ++ EVDEV_MODEL_CLEVO_W740SU = (1 << 5), ++ EVDEV_MODEL_APPLE_TOUCHPAD = (1 << 6), ++ EVDEV_MODEL_WACOM_TOUCHPAD = (1 << 7), ++ EVDEV_MODEL_ALPS_TOUCHPAD = (1 << 8), + }; + + struct mt_slot { +@@ -221,7 +221,7 @@ struct evdev_device { + int dpi; /* HW resolution */ + struct ratelimit syn_drop_limit; /* ratelimit for SYN_DROPPED logging */ + +- enum evdev_device_model model; ++ uint32_t model_flags; + }; + + #define EVDEV_UNHANDLED_DEVICE ((struct evdev_device *) 1) +diff --git a/udev/90-libinput-model-quirks.rules.in b/udev/90-libinput-model-quirks.rules.in +index d834155..5b07726 100644 +--- a/udev/90-libinput-model-quirks.rules.in ++++ b/udev/90-libinput-model-quirks.rules.in +@@ -25,18 +25,12 @@ KERNELS=="*input*", \ + IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:fwversion:$env{LIBINPUT_MODEL_FIRMWARE_VERSION}'" + # End of touchpad firmware detection + +-# Matches below are exclusive, if one matches we skip the rest +-# hwdb matches: +-# + # libinput:touchpad: + ENV{ID_INPUT_TOUCHPAD}=="1", \ +- IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=libinput:touchpad:", \ +- GOTO="libinput_model_quirks_end" ++ IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=libinput:touchpad:" + + # libinput:name::dmi: + KERNELS=="input*", \ +- IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:$attr{[dmi/id]modalias}'", \ +- GOTO="libinput_model_quirks_end" +- ++ IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:$attr{[dmi/id]modalias}'" + + LABEL="libinput_model_quirks_end" +-- +2.4.3 + diff --git a/0003-Tag-synaptics-serial-touchpads-with-a-LIBINPUT_MODEL.patch b/0003-Tag-synaptics-serial-touchpads-with-a-LIBINPUT_MODEL.patch new file mode 100644 index 0000000..6bd10c7 --- /dev/null +++ b/0003-Tag-synaptics-serial-touchpads-with-a-LIBINPUT_MODEL.patch @@ -0,0 +1,114 @@ +From 7c249ed9722f411e0acdd12e14dc81c617309974 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 16 Jul 2015 16:05:48 +1000 +Subject: [PATCH libinput 3/4] Tag synaptics serial touchpads with a + LIBINPUT_MODEL tag + +Signed-off-by: Peter Hutterer +Hallelujah-expressed-by: Benjamin Tissoires +Reviewed-by: Hans de Goede +(cherry picked from commit ab016fd8ed84b58a8f9cabc958cd91ebb4110e57) +--- + src/evdev.c | 1 + + src/evdev.h | 1 + + src/libinput-util.h | 2 ++ + test/device.c | 23 +++++++++++++++++++++++ + udev/90-libinput-model-quirks.hwdb | 6 ++++++ + 5 files changed, 33 insertions(+) + +diff --git a/src/evdev.c b/src/evdev.c +index 2e757d8..96ad2a7 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1537,6 +1537,7 @@ evdev_read_model_flags(struct evdev_device *device) + { "LIBINPUT_MODEL_APPLE_TOUCHPAD", EVDEV_MODEL_APPLE_TOUCHPAD }, + { "LIBINPUT_MODEL_WACOM_TOUCHPAD", EVDEV_MODEL_WACOM_TOUCHPAD }, + { "LIBINPUT_MODEL_ALPS_TOUCHPAD", EVDEV_MODEL_ALPS_TOUCHPAD }, ++ { "LIBINPUT_MODEL_SYNAPTICS_SERIAL_TOUCHPAD", EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD }, + { NULL, EVDEV_MODEL_DEFAULT }, + }; + const struct model_map *m = model_map; +diff --git a/src/evdev.h b/src/evdev.h +index 363f93b..6a71232 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -105,6 +105,7 @@ enum evdev_device_model { + EVDEV_MODEL_APPLE_TOUCHPAD = (1 << 6), + EVDEV_MODEL_WACOM_TOUCHPAD = (1 << 7), + EVDEV_MODEL_ALPS_TOUCHPAD = (1 << 8), ++ EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD = (1 << 9), + }; + + struct mt_slot { +diff --git a/src/libinput-util.h b/src/libinput-util.h +index f27bcfd..85fc93a 100644 +--- a/src/libinput-util.h ++++ b/src/libinput-util.h +@@ -37,6 +37,8 @@ + + #define VENDOR_ID_APPLE 0x5ac + #define VENDOR_ID_WACOM 0x56a ++#define VENDOR_ID_SYNAPTICS_SERIAL 0x002 ++#define PRODUCT_ID_SYNAPTICS_SERIAL 0x007 + + /* The HW DPI rate we normalize to before calculating pointer acceleration */ + #define DEFAULT_MOUSE_DPI 1000 +diff --git a/test/device.c b/test/device.c +index f43228c..59939d6 100644 +--- a/test/device.c ++++ b/test/device.c +@@ -1008,6 +1008,28 @@ START_TEST(device_udev_tag_apple) + udev_device_unref(d); + } + END_TEST ++ ++START_TEST(device_udev_tag_synaptics_serial) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput_device *device = dev->libinput_device; ++ struct udev_device *d; ++ const char *prop; ++ ++ d = libinput_device_get_udev_device(device); ++ prop = udev_device_get_property_value(d, ++ "LIBINPUT_MODEL_SYNAPTICS_SERIAL_TOUCHPAD"); ++ ++ if (libevdev_get_id_vendor(dev->evdev) == VENDOR_ID_SYNAPTICS_SERIAL && ++ libevdev_get_id_product(dev->evdev) == PRODUCT_ID_SYNAPTICS_SERIAL) ++ ck_assert_notnull(prop); ++ else ++ ck_assert(prop == NULL); ++ ++ udev_device_unref(d); ++} ++END_TEST ++ + void + litest_setup_tests(void) + { +@@ -1054,4 +1076,5 @@ litest_setup_tests(void) + litest_add("device:udev tags", device_udev_tag_alps, LITEST_TOUCHPAD, LITEST_ANY); + litest_add("device:udev tags", device_udev_tag_wacom, LITEST_TOUCHPAD, LITEST_ANY); + litest_add("device:udev tags", device_udev_tag_apple, LITEST_TOUCHPAD, LITEST_ANY); ++ litest_add("device:udev tags", device_udev_tag_synaptics_serial, LITEST_TOUCHPAD, LITEST_ANY); + } +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index eec00b6..a34b8f1 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -71,6 +71,12 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX230* + LIBINPUT_MODEL_LENOVO_X230=1 + + ########################################## ++# Synaptics ++########################################## ++libinput:touchpad:input:b0011v0002p0007* ++ LIBINPUT_MODEL_SYNAPTICS_SERIAL_TOUCHPAD=1 ++ ++########################################## + # System76 + ########################################## + +-- +2.4.3 + diff --git a/0004-touchpad-disable-2fg-scrolling-on-Synaptics-semi-mt-.patch b/0004-touchpad-disable-2fg-scrolling-on-Synaptics-semi-mt-.patch new file mode 100644 index 0000000..8149da0 --- /dev/null +++ b/0004-touchpad-disable-2fg-scrolling-on-Synaptics-semi-mt-.patch @@ -0,0 +1,253 @@ +From a4923241ca5b14e78224b50f9b0056f940e0cb7d Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 14 Jul 2015 10:27:46 +1000 +Subject: [PATCH libinput 4/4] touchpad: disable 2fg scrolling on Synaptics + semi-mt touchpads + +These touchpads have a terrible resolution when two fingers are down, causing +scrolling to jump around a lot. That then turns into bug reports that we can't +do much about, the data is simply garbage. + +https://bugs.freedesktop.org/show_bug.cgi?id=91135 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +(cherry picked from commit eb146677eb5abb7951af4ead80874c992915b90d) +--- + doc/scrolling.dox | 7 +++++++ + src/evdev-mt-touchpad.c | 36 +++++++++++++++++++++++++++++------- + src/evdev.c | 1 + + src/evdev.h | 1 + + test/litest-device-synaptics-hover.c | 10 ++++++++++ + test/touchpad.c | 21 ++++++++++++++++++--- + udev/libinput-model-quirks.c | 26 ++++++++++++++++++++++++++ + 7 files changed, 92 insertions(+), 10 deletions(-) + +diff --git a/doc/scrolling.dox b/doc/scrolling.dox +index 658fe4b..0c03c98 100644 +--- a/doc/scrolling.dox ++++ b/doc/scrolling.dox +@@ -44,6 +44,13 @@ movements will translate into tiny scroll movements. + Scrolling in both directions at once is possible by meeting the required + distance thresholds to enable each direction separately. + ++Two-finger scrolling requires the touchpad to track both touch points with ++reasonable precision. Unfortunately, some so-called "semi-mt" touchpads can ++only track the bounding box of the two fingers rather than the actual ++position of each finger. In addition, that bounding box usually suffers from ++a low resolution, causing jumpy movement during two-finger scrolling. ++libinput does not provide two-finger scrolling on those touchpads. ++ + @section edge_scrolling Edge scrolling + + On some touchpads, edge scrolling is available, triggered by moving a single +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index c5c54bb..a9f4000 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1366,18 +1366,29 @@ tp_init_accel(struct tp_dispatch *tp, double diagonal) + } + + static uint32_t +-tp_scroll_config_scroll_method_get_methods(struct libinput_device *device) ++tp_scroll_get_methods(struct tp_dispatch *tp) + { +- struct evdev_device *evdev = (struct evdev_device*)device; +- struct tp_dispatch *tp = (struct tp_dispatch*)evdev->dispatch; + uint32_t methods = LIBINPUT_CONFIG_SCROLL_EDGE; + +- if (tp->ntouches >= 2) ++ /* some Synaptics semi-mt touchpads have a terrible 2fg resolution, ++ * causing scroll jumps. For all other 2fg touchpads, we enable 2fg ++ * scrolling */ ++ if (tp->ntouches >= 2 && ++ (tp->device->model_flags & EVDEV_MODEL_JUMPING_SEMI_MT) == 0) + methods |= LIBINPUT_CONFIG_SCROLL_2FG; + + return methods; + } + ++static uint32_t ++tp_scroll_config_scroll_method_get_methods(struct libinput_device *device) ++{ ++ struct evdev_device *evdev = (struct evdev_device*)device; ++ struct tp_dispatch *tp = (struct tp_dispatch*)evdev->dispatch; ++ ++ return tp_scroll_get_methods(tp); ++} ++ + static enum libinput_config_status + tp_scroll_config_scroll_method_set_method(struct libinput_device *device, + enum libinput_config_scroll_method method) +@@ -1409,10 +1420,21 @@ tp_scroll_config_scroll_method_get_method(struct libinput_device *device) + static enum libinput_config_scroll_method + tp_scroll_get_default_method(struct tp_dispatch *tp) + { +- if (tp->ntouches >= 2) +- return LIBINPUT_CONFIG_SCROLL_2FG; ++ uint32_t methods; ++ enum libinput_config_scroll_method method; ++ ++ methods = tp_scroll_get_methods(tp); ++ ++ if (methods & LIBINPUT_CONFIG_SCROLL_2FG) ++ method = LIBINPUT_CONFIG_SCROLL_2FG; + else +- return LIBINPUT_CONFIG_SCROLL_EDGE; ++ method = LIBINPUT_CONFIG_SCROLL_EDGE; ++ ++ if ((methods & method) == 0) ++ log_bug_libinput(tp_libinput_context(tp), ++ "Invalid default scroll method %d\n", ++ method); ++ return method; + } + + static enum libinput_config_scroll_method +diff --git a/src/evdev.c b/src/evdev.c +index 96ad2a7..35fc2a3 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1538,6 +1538,7 @@ evdev_read_model_flags(struct evdev_device *device) + { "LIBINPUT_MODEL_WACOM_TOUCHPAD", EVDEV_MODEL_WACOM_TOUCHPAD }, + { "LIBINPUT_MODEL_ALPS_TOUCHPAD", EVDEV_MODEL_ALPS_TOUCHPAD }, + { "LIBINPUT_MODEL_SYNAPTICS_SERIAL_TOUCHPAD", EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD }, ++ { "LIBINPUT_MODEL_JUMPING_SEMI_MT", EVDEV_MODEL_JUMPING_SEMI_MT }, + { NULL, EVDEV_MODEL_DEFAULT }, + }; + const struct model_map *m = model_map; +diff --git a/src/evdev.h b/src/evdev.h +index 6a71232..1c4ebc0 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -106,6 +106,7 @@ enum evdev_device_model { + EVDEV_MODEL_WACOM_TOUCHPAD = (1 << 7), + EVDEV_MODEL_ALPS_TOUCHPAD = (1 << 8), + EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD = (1 << 9), ++ EVDEV_MODEL_JUMPING_SEMI_MT = (1 << 10), + }; + + struct mt_slot { +diff --git a/test/litest-device-synaptics-hover.c b/test/litest-device-synaptics-hover.c +index 2cc9b72..3c36aff 100644 +--- a/test/litest-device-synaptics-hover.c ++++ b/test/litest-device-synaptics-hover.c +@@ -102,6 +102,15 @@ static struct input_absinfo absinfo[] = { + { .value = -1 } + }; + ++static const char udev_rule[] = ++"ACTION==\"remove\", GOTO=\"synaptics_semi_mt_end\"\n" ++"KERNEL!=\"event*\", GOTO=\"synaptics_semi_mt_end\"\n" ++"\n" ++"ATTRS{name}==\"SynPS/2 Synaptics TouchPad\",\n" ++" ENV{LIBINPUT_MODEL_JUMPING_SEMI_MT}=\"1\"\n" ++"\n" ++"LABEL=\"synaptics_semi_mt_end\""; ++ + struct litest_test_device litest_synaptics_hover_device = { + .type = LITEST_SYNAPTICS_HOVER_SEMI_MT, + .features = LITEST_TOUCHPAD | LITEST_SEMI_MT | LITEST_BUTTON, +@@ -114,6 +123,7 @@ struct litest_test_device litest_synaptics_hover_device = { + .id = &input_id, + .events = events, + .absinfo = absinfo, ++ .udev_rule = udev_rule, + }; + + static void +diff --git a/test/touchpad.c b/test/touchpad.c +index 12bceea..759f82a 100644 +--- a/test/touchpad.c ++++ b/test/touchpad.c +@@ -69,6 +69,16 @@ enable_buttonareas(struct litest_device *dev) + litest_assert_int_eq(status, expected); + } + ++static inline int ++is_synaptics_semi_mt(struct litest_device *dev) ++{ ++ struct libevdev *evdev = dev->evdev; ++ ++ return libevdev_has_property(evdev, INPUT_PROP_SEMI_MT) && ++ libevdev_get_id_vendor(evdev) == 0x2 && ++ libevdev_get_id_product(evdev) == 0x7; ++} ++ + START_TEST(touchpad_1fg_motion) + { + struct litest_device *dev = litest_current_device(); +@@ -1581,10 +1591,14 @@ START_TEST(touchpad_scroll_defaults) + + method = libinput_device_config_scroll_get_methods(device); + ck_assert(method & LIBINPUT_CONFIG_SCROLL_EDGE); +- if (libevdev_get_num_slots(evdev) > 1) ++ if (libevdev_get_num_slots(evdev) > 1 && ++ !is_synaptics_semi_mt(dev)) + ck_assert(method & LIBINPUT_CONFIG_SCROLL_2FG); ++ else ++ ck_assert((method & LIBINPUT_CONFIG_SCROLL_2FG) == 0); + +- if (libevdev_get_num_slots(evdev) > 1) ++ if (libevdev_get_num_slots(evdev) > 1 && ++ !is_synaptics_semi_mt(dev)) + expected = LIBINPUT_CONFIG_SCROLL_2FG; + else + expected = LIBINPUT_CONFIG_SCROLL_EDGE; +@@ -1600,7 +1614,8 @@ START_TEST(touchpad_scroll_defaults) + status = libinput_device_config_scroll_set_method(device, + LIBINPUT_CONFIG_SCROLL_2FG); + +- if (libevdev_get_num_slots(evdev) > 1) ++ if (libevdev_get_num_slots(evdev) > 1 && ++ !is_synaptics_semi_mt(dev)) + ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); + else + ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_UNSUPPORTED); +diff --git a/udev/libinput-model-quirks.c b/udev/libinput-model-quirks.c +index fc3dbe8..0e737a4 100644 +--- a/udev/libinput-model-quirks.c ++++ b/udev/libinput-model-quirks.c +@@ -69,6 +69,30 @@ handle_touchpad_alps(struct udev_device *device) + } + + static void ++handle_touchpad_synaptics(struct udev_device *device) ++{ ++ const char *product, *props; ++ int bus, vid, pid, version; ++ int prop; ++ ++ product = prop_value(device, "PRODUCT"); ++ if (!product) ++ return; ++ ++ if (sscanf(product, "%x/%x/%x/%x", &bus, &vid, &pid, &version) != 4) ++ return; ++ ++ if (bus != BUS_I8042 || vid != 0x2 || pid != 0x7) ++ return; ++ ++ props = prop_value(device, "PROP"); ++ if (sscanf(props, "%x", &prop) != 1) ++ return; ++ if (prop & (1 << INPUT_PROP_SEMI_MT)) ++ printf("LIBINPUT_MODEL_JUMPING_SEMI_MT=1\n"); ++} ++ ++static void + handle_touchpad(struct udev_device *device) + { + const char *name = NULL; +@@ -79,6 +103,8 @@ handle_touchpad(struct udev_device *device) + + if (strstr(name, "AlpsPS/2 ALPS") != NULL) + handle_touchpad_alps(device); ++ if (strstr(name, "Synaptics ") != NULL) ++ handle_touchpad_synaptics(device); + } + + int main(int argc, char **argv) +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index 5a0f773..033f910 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.20.0 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -23,6 +23,11 @@ Patch05: 0001-udev-don-t-install-the-litest-udev-rules.patch Patch06: 0001-evdev-restore-pointing-stick-const-accel-property-pa.patch # Fedora-specific, remove when thumb detection is fixed upstream Patch07: 0001-Disable-thumb-detection-it-s-too-aggressive-1246093.patch +# Bug 1235175 - Synaptics Touchpad two-finger scrolling jumps +Patch08: 0001-touchpad-remove-a-leftover-check-for-fake-resolution.patch +Patch09: 0002-evdev-allow-for-multiple-LIBINPUT_MODEL_-flags-per-d.patch +Patch10: 0003-Tag-synaptics-serial-touchpads-with-a-LIBINPUT_MODEL.patch +Patch11: 0004-touchpad-disable-2fg-scrolling-on-Synaptics-semi-mt-.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -100,6 +105,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Jul 29 2015 Peter Hutterer 0.20.0-4 +- Disable 2fg scrolling on Synaptics semi-mt (#1235175) + * Fri Jul 24 2015 Peter Hutterer 0.20.0-3 - Disable thumb detection, too many false positives (#1246093) From 3abc61691587fab5daf9a8078f41e3988905918b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 29 Jul 2015 11:11:58 +1000 Subject: [PATCH 041/317] Add a size hint for Apple one-button touchpads (#1246651) --- ...nt-for-appletouch-one-button-touchpa.patch | 27 +++++++++++++++++++ libinput.spec | 7 ++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0001-udev-add-size-hint-for-appletouch-one-button-touchpa.patch diff --git a/0001-udev-add-size-hint-for-appletouch-one-button-touchpa.patch b/0001-udev-add-size-hint-for-appletouch-one-button-touchpa.patch new file mode 100644 index 0000000..d209406 --- /dev/null +++ b/0001-udev-add-size-hint-for-appletouch-one-button-touchpa.patch @@ -0,0 +1,27 @@ +From b849aaf4d3441f3d007889a06ff105e49d197be8 Mon Sep 17 00:00:00 2001 +From: Fedora X Ninjas +Date: Tue, 28 Jul 2015 08:23:29 +1000 +Subject: [PATCH] udev: add size hint for appletouch one-button touchpad + +--- + udev/90-libinput-model-quirks.hwdb | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index eec00b6..2d2a449 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -34,6 +34,10 @@ libinput:touchpad:input:b0005v05ACp* + LIBINPUT_MODEL_APPLE_TOUCHPAD=1 + LIBINPUT_ATTR_SIZE_HINT=104x75 + ++# appletouch one-button touchpad (rhbz#1246651) ++libinput:touchpad:input:b0003v05ACp021B* ++ LIBINPUT_ATTR_SIZE_HINT=100x48 ++ + ########################################## + # Elantech + ########################################## +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index 033f910..fa93486 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.20.0 -Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 5%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -28,6 +28,8 @@ Patch08: 0001-touchpad-remove-a-leftover-check-for-fake-resolution.patch Patch09: 0002-evdev-allow-for-multiple-LIBINPUT_MODEL_-flags-per-d.patch Patch10: 0003-Tag-synaptics-serial-touchpads-with-a-LIBINPUT_MODEL.patch Patch11: 0004-touchpad-disable-2fg-scrolling-on-Synaptics-semi-mt-.patch +# Bug 1246651 - two-finger scroll stopped working with upgrade to 0.20.0-1 +Patch12: 0001-udev-add-size-hint-for-appletouch-one-button-touchpa.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -105,6 +107,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Jul 29 2015 Peter Hutterer 0.20.0-5 +- Add a size hint for Apple one-button touchpads (#1246651) + * Wed Jul 29 2015 Peter Hutterer 0.20.0-4 - Disable 2fg scrolling on Synaptics semi-mt (#1235175) From 5d1af9d38205e0675ef1cf2a37c7af4b66e5b429 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 30 Jul 2015 13:53:39 +1000 Subject: [PATCH 042/317] Fix broken 2fg scrolling on single-touch touchpads (#1246651) - Drop distance threshold for 2fg gesture detection (#1246868) --- ...distance-threshold-to-detect-pinches.patch | 59 +++++++++++++++++++ ...touches-not-just-num_slots-for-the-n.patch | 32 ++++++++++ libinput.spec | 9 ++- 3 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-drop-distance-threshold-to-detect-pinches.patch create mode 100644 0002-gestures-check-ntouches-not-just-num_slots-for-the-n.patch diff --git a/0001-touchpad-drop-distance-threshold-to-detect-pinches.patch b/0001-touchpad-drop-distance-threshold-to-detect-pinches.patch new file mode 100644 index 0000000..37aa8e7 --- /dev/null +++ b/0001-touchpad-drop-distance-threshold-to-detect-pinches.patch @@ -0,0 +1,59 @@ +From 6b59b4273c38570258519d16357dd0953b650bc8 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 28 Jul 2015 12:54:16 +1000 +Subject: [PATCH libinput] touchpad: drop distance threshold to detect pinches + +This gives us too many false positives of 2fg scroll being detected as pinch +gesture. Reporter in [1] uses index+ring finger and thus exceeds the distance +easily (that's admittedly a special case). + +This is worsed by the lack of a client stack that handles the gestures. User's +don't see that they're inadvertently performing a gesture, they just see 2fg +scroll not working. + +Drop the distance for now, once we have a ubiquitous client stack we can +revisit and bring it back. + +[1] https://bugzilla.redhat.com/show_bug.cgi?id=1246868 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad-gestures.c | 17 +---------------- + 1 file changed, 1 insertion(+), 16 deletions(-) + +diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c +index 6b1a273..3b1839e 100644 +--- a/src/evdev-mt-touchpad-gestures.c ++++ b/src/evdev-mt-touchpad-gestures.c +@@ -264,26 +264,11 @@ tp_gesture_twofinger_handle_state_none(struct tp_dispatch *tp, uint64_t time) + static enum tp_gesture_2fg_state + tp_gesture_twofinger_handle_state_unknown(struct tp_dispatch *tp, uint64_t time) + { +- struct normalized_coords normalized; +- struct device_float_coords delta; + struct tp_touch *first = tp->gesture.touches[0], + *second = tp->gesture.touches[1]; + int dir1, dir2; + +- delta = device_delta(first->point, second->point); +- normalized = tp_normalize_delta(tp, delta); +- +- /* If fingers are further than 3 cm apart assume pinch */ +- if (normalized_length(normalized) > TP_MM_TO_DPI_NORMALIZED(30)) { +- tp_gesture_get_pinch_info(tp, +- &tp->gesture.initial_distance, +- &tp->gesture.angle, +- &tp->gesture.center); +- tp->gesture.prev_scale = 1.0; +- return GESTURE_2FG_STATE_PINCH; +- } +- +- /* Elif fingers have been close together for a while, scroll */ ++ /* if fingers stay unmoving for a while, assume (slow) scroll */ + if (time > (tp->gesture.initial_time + DEFAULT_GESTURE_2FG_SCROLL_TIMEOUT)) { + tp_gesture_set_scroll_buildup(tp); + return GESTURE_2FG_STATE_SCROLL; +-- +2.4.3 + diff --git a/0002-gestures-check-ntouches-not-just-num_slots-for-the-n.patch b/0002-gestures-check-ntouches-not-just-num_slots-for-the-n.patch new file mode 100644 index 0000000..b00fa0b --- /dev/null +++ b/0002-gestures-check-ntouches-not-just-num_slots-for-the-n.patch @@ -0,0 +1,32 @@ +From c24a69a0db8cc18e580cc813b91fae6aff9bb74a Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 29 Jul 2015 17:12:53 +1000 +Subject: [PATCH libinput] 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 +--- + src/evdev-mt-touchpad-gestures.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c +index 8bcdeb4..6b1a273 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; +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index fa93486..2eb7839 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.20.0 -Release: 5%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 6%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -30,6 +30,9 @@ Patch10: 0003-Tag-synaptics-serial-touchpads-with-a-LIBINPUT_MODEL.patch Patch11: 0004-touchpad-disable-2fg-scrolling-on-Synaptics-semi-mt-.patch # Bug 1246651 - two-finger scroll stopped working with upgrade to 0.20.0-1 Patch12: 0001-udev-add-size-hint-for-appletouch-one-button-touchpa.patch +Patch13: 0002-gestures-check-ntouches-not-just-num_slots-for-the-n.patch +# Bug 1246868 Two finger scrolling does not work with first and fourth fingers (cf. Synaptics driver) +Patch14: 0001-touchpad-drop-distance-threshold-to-detect-pinches.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -107,6 +110,10 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Jul 30 2015 Peter Hutterer 0.20.0-6 +- Fix broken 2fg scrolling on single-touch touchpads (#1246651) +- Drop distance threshold for 2fg gesture detection (#1246868) + * Wed Jul 29 2015 Peter Hutterer 0.20.0-5 - Add a size hint for Apple one-button touchpads (#1246651) From 6af3f5842bf8961dbfc68e021301f69cd560e480 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 4 Aug 2015 11:52:44 +1000 Subject: [PATCH 043/317] libinput 0.21.0 - fix 3fg touch detection on Synaptics semi-mt touchpads --- .gitignore | 1 + ...etection-it-s-too-aggressive-1246093.patch | 26 -- ...inting-stick-const-accel-property-pa.patch | 58 ---- ...distance-threshold-to-detect-pinches.patch | 59 ---- ...ge-scroll-while-the-finger-is-in-the.patch | 35 --- ...a-leftover-check-for-fake-resolution.patch | 47 ---- ...synaptics-need-to-fake-new-touches-o.patch | 60 +++++ ...nt-for-appletouch-one-button-touchpa.patch | 27 -- ...-don-t-install-the-litest-udev-rules.patch | 28 -- ...multiple-LIBINPUT_MODEL_-flags-per-d.patch | 213 --------------- ...touches-not-just-num_slots-for-the-n.patch | 32 --- ...rial-touchpads-with-a-LIBINPUT_MODEL.patch | 114 -------- ...-2fg-scrolling-on-Synaptics-semi-mt-.patch | 253 ------------------ libinput.spec | 25 +- sources | 2 +- 15 files changed, 70 insertions(+), 910 deletions(-) delete mode 100644 0001-Disable-thumb-detection-it-s-too-aggressive-1246093.patch delete mode 100644 0001-evdev-restore-pointing-stick-const-accel-property-pa.patch delete mode 100644 0001-touchpad-drop-distance-threshold-to-detect-pinches.patch delete mode 100644 0001-touchpad-only-edge-scroll-while-the-finger-is-in-the.patch delete mode 100644 0001-touchpad-remove-a-leftover-check-for-fake-resolution.patch create mode 100644 0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch delete mode 100644 0001-udev-add-size-hint-for-appletouch-one-button-touchpa.patch delete mode 100644 0001-udev-don-t-install-the-litest-udev-rules.patch delete mode 100644 0002-evdev-allow-for-multiple-LIBINPUT_MODEL_-flags-per-d.patch delete mode 100644 0002-gestures-check-ntouches-not-just-num_slots-for-the-n.patch delete mode 100644 0003-Tag-synaptics-serial-touchpads-with-a-LIBINPUT_MODEL.patch delete mode 100644 0004-touchpad-disable-2fg-scrolling-on-Synaptics-semi-mt-.patch diff --git a/.gitignore b/.gitignore index 6231fd9..d88f043 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /libinput-0.18.0.tar.xz /libinput-0.19.0.tar.xz /libinput-0.20.0.tar.xz +/libinput-0.21.0.tar.xz diff --git a/0001-Disable-thumb-detection-it-s-too-aggressive-1246093.patch b/0001-Disable-thumb-detection-it-s-too-aggressive-1246093.patch deleted file mode 100644 index 9894950..0000000 --- a/0001-Disable-thumb-detection-it-s-too-aggressive-1246093.patch +++ /dev/null @@ -1,26 +0,0 @@ -From a899d62c05d322581bd86e2d16be588e4655e1b6 Mon Sep 17 00:00:00 2001 -From: Fedora X Ninjas -Date: Fri, 24 Jul 2015 08:35:08 +1000 -Subject: [PATCH] Disable thumb detection, it's too aggressive (#1246093) - ---- - src/evdev-mt-touchpad.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index cbe8bed..360f930 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -1507,6 +1507,9 @@ tp_init_thumb(struct tp_dispatch *tp) - struct evdev_device *device = tp->device; - const struct input_absinfo *abs; - -+ /* FEDORA: disable thumb detection, too aggressive */ -+ return 0; -+ - abs = libevdev_get_abs_info(device->evdev, ABS_MT_PRESSURE); - if (!abs) - return 0; --- -2.4.3 - diff --git a/0001-evdev-restore-pointing-stick-const-accel-property-pa.patch b/0001-evdev-restore-pointing-stick-const-accel-property-pa.patch deleted file mode 100644 index 2ecf862..0000000 --- a/0001-evdev-restore-pointing-stick-const-accel-property-pa.patch +++ /dev/null @@ -1,58 +0,0 @@ -From c096bedd8b21864b5ce27403a628c519ad00e148 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 21 Jul 2015 09:33:47 +1000 -Subject: [PATCH libinput] evdev: restore pointing stick const accel property - parsing - -Regression introduced in 8302860. - -Reading the DPI before evdev_configure_device makes it lose on the trackpoint -flag, causing libinput to ignore the POINTINGSTICK_CONST_ACCEL property. - -8302860 moved it up so we can init accel based on the DPI, this patch simply -moves istart t before the acceleration is initialized. - -https://bugs.freedesktop.org/show_bug.cgi?id=91369 - -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/src/evdev.c b/src/evdev.c -index 05d9b17..07934de 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1958,6 +1958,10 @@ evdev_configure_device(struct evdev_device *device) - - if (udev_tags & EVDEV_UDEV_TAG_MOUSE || - udev_tags & EVDEV_UDEV_TAG_POINTINGSTICK) { -+ evdev_tag_external_mouse(device, device->udev_device); -+ evdev_tag_trackpoint(device, device->udev_device); -+ device->dpi = evdev_read_dpi_prop(device); -+ - if (libevdev_has_event_code(evdev, EV_REL, REL_X) && - libevdev_has_event_code(evdev, EV_REL, REL_Y) && - evdev_init_accel(device) == -1) -@@ -1975,9 +1979,6 @@ evdev_configure_device(struct evdev_device *device) - device->scroll.natural_scrolling_enabled = true; - /* want button scrolling config option */ - device->scroll.want_button = 1; -- -- evdev_tag_external_mouse(device, device->udev_device); -- evdev_tag_trackpoint(device, device->udev_device); - } - - if (udev_tags & EVDEV_UDEV_TAG_KEYBOARD) { -@@ -2146,7 +2147,7 @@ evdev_device_create(struct libinput_seat *seat, - device->scroll.wheel_click_angle = - evdev_read_wheel_click_prop(device); - device->model = evdev_read_model(device); -- device->dpi = evdev_read_dpi_prop(device); -+ device->dpi = DEFAULT_MOUSE_DPI; - - /* at most 5 SYN_DROPPED log-messages per 30s */ - ratelimit_init(&device->syn_drop_limit, 30ULL * 1000, 5); --- -2.4.3 - diff --git a/0001-touchpad-drop-distance-threshold-to-detect-pinches.patch b/0001-touchpad-drop-distance-threshold-to-detect-pinches.patch deleted file mode 100644 index 37aa8e7..0000000 --- a/0001-touchpad-drop-distance-threshold-to-detect-pinches.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 6b59b4273c38570258519d16357dd0953b650bc8 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 28 Jul 2015 12:54:16 +1000 -Subject: [PATCH libinput] touchpad: drop distance threshold to detect pinches - -This gives us too many false positives of 2fg scroll being detected as pinch -gesture. Reporter in [1] uses index+ring finger and thus exceeds the distance -easily (that's admittedly a special case). - -This is worsed by the lack of a client stack that handles the gestures. User's -don't see that they're inadvertently performing a gesture, they just see 2fg -scroll not working. - -Drop the distance for now, once we have a ubiquitous client stack we can -revisit and bring it back. - -[1] https://bugzilla.redhat.com/show_bug.cgi?id=1246868 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad-gestures.c | 17 +---------------- - 1 file changed, 1 insertion(+), 16 deletions(-) - -diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c -index 6b1a273..3b1839e 100644 ---- a/src/evdev-mt-touchpad-gestures.c -+++ b/src/evdev-mt-touchpad-gestures.c -@@ -264,26 +264,11 @@ tp_gesture_twofinger_handle_state_none(struct tp_dispatch *tp, uint64_t time) - static enum tp_gesture_2fg_state - tp_gesture_twofinger_handle_state_unknown(struct tp_dispatch *tp, uint64_t time) - { -- struct normalized_coords normalized; -- struct device_float_coords delta; - struct tp_touch *first = tp->gesture.touches[0], - *second = tp->gesture.touches[1]; - int dir1, dir2; - -- delta = device_delta(first->point, second->point); -- normalized = tp_normalize_delta(tp, delta); -- -- /* If fingers are further than 3 cm apart assume pinch */ -- if (normalized_length(normalized) > TP_MM_TO_DPI_NORMALIZED(30)) { -- tp_gesture_get_pinch_info(tp, -- &tp->gesture.initial_distance, -- &tp->gesture.angle, -- &tp->gesture.center); -- tp->gesture.prev_scale = 1.0; -- return GESTURE_2FG_STATE_PINCH; -- } -- -- /* Elif fingers have been close together for a while, scroll */ -+ /* if fingers stay unmoving for a while, assume (slow) scroll */ - if (time > (tp->gesture.initial_time + DEFAULT_GESTURE_2FG_SCROLL_TIMEOUT)) { - tp_gesture_set_scroll_buildup(tp); - return GESTURE_2FG_STATE_SCROLL; --- -2.4.3 - diff --git a/0001-touchpad-only-edge-scroll-while-the-finger-is-in-the.patch b/0001-touchpad-only-edge-scroll-while-the-finger-is-in-the.patch deleted file mode 100644 index dead811..0000000 --- a/0001-touchpad-only-edge-scroll-while-the-finger-is-in-the.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0d320c87c99e93b2feb1703f5bfd5d4fcc0a2857 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 13 Jul 2015 14:14:42 +1000 -Subject: [PATCH libinput] touchpad: only edge-scroll while the finger is in - the edge area - -When the touch leaves the area for edge scrolling after starting to scroll, -discard any movement. This signals to the user that they've left the area and -forces them to lift the finger to switch back to motion. If the finger moves -back into the area, scrolling continues. - -Signed-off-by: Peter Hutterer ---- - src/evdev-mt-touchpad-edge-scroll.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c -index ca9ef4a..4f8362c 100644 ---- a/src/evdev-mt-touchpad-edge-scroll.c -+++ b/src/evdev-mt-touchpad-edge-scroll.c -@@ -384,6 +384,11 @@ tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time) - if (t->palm.state != PALM_NONE) - continue; - -+ /* only scroll with the finger in the previous edge */ -+ if (t->scroll.edge && -+ (tp_touch_get_edge(tp, t) & t->scroll.edge) == 0) -+ continue; -+ - switch (t->scroll.edge) { - case EDGE_NONE: - if (t->scroll.direction != -1) { --- -2.4.3 - diff --git a/0001-touchpad-remove-a-leftover-check-for-fake-resolution.patch b/0001-touchpad-remove-a-leftover-check-for-fake-resolution.patch deleted file mode 100644 index d86deed..0000000 --- a/0001-touchpad-remove-a-leftover-check-for-fake-resolution.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 7ac32de18ca54a3a7d0b8147facc0ba7ebb9dbd4 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 16 Jul 2015 15:54:47 +1000 -Subject: [PATCH libinput 1/4] touchpad: remove a leftover check for fake - resolution - -obsolete since 8658ff159d416b6a567acb2aaf72b27887ad8576. And once we remove -that all we checkf or is Apple models which we set a resolution for in -systemd. So that check is obsolete now too. - -Signed-off-by: Peter Hutterer -(cherry picked from commit 4ca70c813f750721592d1a68aced385560705256) ---- - src/evdev-mt-touchpad.c | 15 +++++---------- - 1 file changed, 5 insertions(+), 10 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 360f930..80827da 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -1464,18 +1464,13 @@ tp_init_palmdetect(struct tp_dispatch *tp, - - /* Wacom doesn't have internal touchpads, - * Apple touchpads are always big enough to warrant palm detection */ -- if (device->model == EVDEV_MODEL_WACOM_TOUCHPAD) { -+ if (device->model == EVDEV_MODEL_WACOM_TOUCHPAD) - return 0; -- } else if (device->model != EVDEV_MODEL_APPLE_TOUCHPAD) { -- /* We don't know how big the touchpad is */ -- if (device->abs.absinfo_x->resolution == 1) -- return 0; - -- /* Enable palm detection on touchpads >= 70 mm. Anything smaller -- probably won't need it, until we find out it does */ -- if (width/device->abs.absinfo_x->resolution < 70) -- return 0; -- } -+ /* Enable palm detection on touchpads >= 70 mm. Anything smaller -+ probably won't need it, until we find out it does */ -+ if (width/device->abs.absinfo_x->resolution < 70) -+ return 0; - - /* palm edges are 5% of the width on each side */ - tp->palm.right_edge = device->abs.absinfo_x->maximum - width * 0.05; --- -2.4.3 - diff --git a/0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch b/0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch new file mode 100644 index 0000000..1b3dba8 --- /dev/null +++ b/0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch @@ -0,0 +1,60 @@ +From 253f8e4152b6c36b87756bb23b16512c3abf7cb8 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +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 +Signed-off-by: Peter Hutterer +Tested-by: Jan Alexander Steffens +Reviewed-by: Hans de Goede +--- + 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 + diff --git a/0001-udev-add-size-hint-for-appletouch-one-button-touchpa.patch b/0001-udev-add-size-hint-for-appletouch-one-button-touchpa.patch deleted file mode 100644 index d209406..0000000 --- a/0001-udev-add-size-hint-for-appletouch-one-button-touchpa.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b849aaf4d3441f3d007889a06ff105e49d197be8 Mon Sep 17 00:00:00 2001 -From: Fedora X Ninjas -Date: Tue, 28 Jul 2015 08:23:29 +1000 -Subject: [PATCH] udev: add size hint for appletouch one-button touchpad - ---- - udev/90-libinput-model-quirks.hwdb | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index eec00b6..2d2a449 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -34,6 +34,10 @@ libinput:touchpad:input:b0005v05ACp* - LIBINPUT_MODEL_APPLE_TOUCHPAD=1 - LIBINPUT_ATTR_SIZE_HINT=104x75 - -+# appletouch one-button touchpad (rhbz#1246651) -+libinput:touchpad:input:b0003v05ACp021B* -+ LIBINPUT_ATTR_SIZE_HINT=100x48 -+ - ########################################## - # Elantech - ########################################## --- -2.4.3 - diff --git a/0001-udev-don-t-install-the-litest-udev-rules.patch b/0001-udev-don-t-install-the-litest-udev-rules.patch deleted file mode 100644 index ce06642..0000000 --- a/0001-udev-don-t-install-the-litest-udev-rules.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 32f298c12700d874c265c2486ae10728bea691a0 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 16 Jul 2015 15:15:20 +1000 -Subject: [PATCH libinput] udev: don't install the litest udev rules - -They are installed by the test. - -Signed-off-by: Peter Hutterer ---- - udev/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/udev/Makefile.am b/udev/Makefile.am -index e850e09..975f537 100644 ---- a/udev/Makefile.am -+++ b/udev/Makefile.am -@@ -4,7 +4,7 @@ udev_PROGRAMS = libinput-device-group \ - - litest_rules = 80-libinput-device-groups-litest.rules \ - 90-libinput-model-quirks-litest.rules --udev_SCRIPTS = $(litest_rules) -+noinst_SCRIPTS = $(litest_rules) - - libinput_device_group_SOURCES = libinput-device-group.c - libinput_device_group_CFLAGS = $(LIBUDEV_CFLAGS) $(GCC_CFLAGS) --- -2.4.3 - diff --git a/0002-evdev-allow-for-multiple-LIBINPUT_MODEL_-flags-per-d.patch b/0002-evdev-allow-for-multiple-LIBINPUT_MODEL_-flags-per-d.patch deleted file mode 100644 index 37a6cdf..0000000 --- a/0002-evdev-allow-for-multiple-LIBINPUT_MODEL_-flags-per-d.patch +++ /dev/null @@ -1,213 +0,0 @@ -From da530d630f78bc208a35fd1a6912397253f8db87 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 16 Jul 2015 15:59:01 +1000 -Subject: [PATCH libinput 2/4] evdev: allow for multiple LIBINPUT_MODEL_* flags - per device - -On some devices we need to set more than one flag, i.e. make it into actual -flags. - -Signed-off-by: Peter Hutterer -Hallelujah-expressed-by: Benjamin Tissoires -Reviewed-by: Hans de Goede -(cherry picked from commit aacf40341dc13761d564ecf910dc833073ae39ae) ---- - src/evdev-mt-touchpad-buttons.c | 17 +++++++---------- - src/evdev-mt-touchpad.c | 12 ++++-------- - src/evdev.c | 11 ++++++----- - src/evdev.h | 22 +++++++++++----------- - udev/90-libinput-model-quirks.rules.in | 10 ++-------- - 5 files changed, 30 insertions(+), 42 deletions(-) - -diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c -index 5ecdccd..6852758 100644 ---- a/src/evdev-mt-touchpad-buttons.c -+++ b/src/evdev-mt-touchpad-buttons.c -@@ -641,22 +641,19 @@ static enum libinput_config_click_method - tp_click_get_default_method(struct tp_dispatch *tp) - { - struct evdev_device *device = tp->device; -+ uint32_t clickfinger_models = EVDEV_MODEL_CHROMEBOOK | -+ EVDEV_MODEL_SYSTEM76_BONOBO | -+ EVDEV_MODEL_SYSTEM76_GALAGO | -+ EVDEV_MODEL_SYSTEM76_KUDU | -+ EVDEV_MODEL_CLEVO_W740SU; - - if (!tp->buttons.is_clickpad) - return LIBINPUT_CONFIG_CLICK_METHOD_NONE; - else if (libevdev_get_id_vendor(tp->device->evdev) == VENDOR_ID_APPLE) - return LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER; - -- switch (device->model) { -- case EVDEV_MODEL_CHROMEBOOK: -- case EVDEV_MODEL_SYSTEM76_BONOBO: -- case EVDEV_MODEL_SYSTEM76_GALAGO: -- case EVDEV_MODEL_SYSTEM76_KUDU: -- case EVDEV_MODEL_CLEVO_W740SU: -+ if (device->model_flags & clickfinger_models) - return LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER; -- default: -- break; -- } - - return LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS; - } -@@ -688,7 +685,7 @@ tp_init_middlebutton_emulation(struct tp_dispatch *tp, - if (!libevdev_has_event_code(device->evdev, EV_KEY, BTN_MIDDLE)) { - enable_by_default = true; - want_config_option = false; -- } else if (device->model == EVDEV_MODEL_ALPS_TOUCHPAD) { -+ } else if (device->model_flags & EVDEV_MODEL_ALPS_TOUCHPAD) { - enable_by_default = true; - want_config_option = true; - } else -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 80827da..c5c54bb 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -1228,7 +1228,7 @@ evdev_tag_touchpad(struct evdev_device *device, - */ - bustype = libevdev_get_id_bustype(device->evdev); - if (bustype == BUS_USB) { -- if (device->model == EVDEV_MODEL_APPLE_TOUCHPAD) -+ if (device->model_flags & EVDEV_MODEL_APPLE_TOUCHPAD) - device->tags |= EVDEV_TAG_INTERNAL_TOUCHPAD; - } else if (bustype != BUS_BLUETOOTH) - device->tags |= EVDEV_TAG_INTERNAL_TOUCHPAD; -@@ -1354,14 +1354,10 @@ tp_init_accel(struct tp_dispatch *tp, double diagonal) - tp->accel.x_scale_coeff = (DEFAULT_MOUSE_DPI/25.4) / res_x; - tp->accel.y_scale_coeff = (DEFAULT_MOUSE_DPI/25.4) / res_y; - -- switch (tp->device->model) { -- case EVDEV_MODEL_LENOVO_X230: -+ if (tp->device->model_flags & EVDEV_MODEL_LENOVO_X230) - profile = touchpad_lenovo_x230_accel_profile; -- break; -- default: -+ else - profile = touchpad_accel_profile_linear; -- break; -- } - - if (evdev_device_init_pointer_acceleration(tp->device, profile) == -1) - return -1; -@@ -1464,7 +1460,7 @@ tp_init_palmdetect(struct tp_dispatch *tp, - - /* Wacom doesn't have internal touchpads, - * Apple touchpads are always big enough to warrant palm detection */ -- if (device->model == EVDEV_MODEL_WACOM_TOUCHPAD) -+ if (device->model_flags & EVDEV_MODEL_WACOM_TOUCHPAD) - return 0; - - /* Enable palm detection on touchpads >= 70 mm. Anything smaller -diff --git a/src/evdev.c b/src/evdev.c -index 950b334..2e757d8 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1521,8 +1521,8 @@ evdev_read_dpi_prop(struct evdev_device *device) - return dpi; - } - --static inline enum evdev_device_model --evdev_read_model(struct evdev_device *device) -+static inline uint32_t -+evdev_read_model_flags(struct evdev_device *device) - { - const struct model_map { - const char *property; -@@ -1540,15 +1540,16 @@ evdev_read_model(struct evdev_device *device) - { NULL, EVDEV_MODEL_DEFAULT }, - }; - const struct model_map *m = model_map; -+ uint32_t model_flags = 0; - - while (m->property) { - if (!!udev_device_get_property_value(device->udev_device, - m->property)) -- break; -+ model_flags |= m->model; - m++; - } - -- return m->model; -+ return model_flags; - } - - static inline int -@@ -2142,7 +2143,7 @@ evdev_device_create(struct libinput_seat *seat, - device->scroll.direction = 0; - device->scroll.wheel_click_angle = - evdev_read_wheel_click_prop(device); -- device->model = evdev_read_model(device); -+ device->model_flags = evdev_read_model_flags(device); - device->dpi = DEFAULT_MOUSE_DPI; - - /* at most 5 SYN_DROPPED log-messages per 30s */ -diff --git a/src/evdev.h b/src/evdev.h -index 77db1b4..363f93b 100644 ---- a/src/evdev.h -+++ b/src/evdev.h -@@ -95,16 +95,16 @@ enum evdev_middlebutton_event { - }; - - enum evdev_device_model { -- EVDEV_MODEL_DEFAULT, -- EVDEV_MODEL_LENOVO_X230, -- EVDEV_MODEL_CHROMEBOOK, -- EVDEV_MODEL_SYSTEM76_BONOBO, -- EVDEV_MODEL_SYSTEM76_GALAGO, -- EVDEV_MODEL_SYSTEM76_KUDU, -- EVDEV_MODEL_CLEVO_W740SU, -- EVDEV_MODEL_APPLE_TOUCHPAD, -- EVDEV_MODEL_WACOM_TOUCHPAD, -- EVDEV_MODEL_ALPS_TOUCHPAD, -+ EVDEV_MODEL_DEFAULT = 0, -+ EVDEV_MODEL_LENOVO_X230 = (1 << 0), -+ EVDEV_MODEL_CHROMEBOOK = (1 << 1), -+ EVDEV_MODEL_SYSTEM76_BONOBO = (1 << 2), -+ EVDEV_MODEL_SYSTEM76_GALAGO = (1 << 3), -+ EVDEV_MODEL_SYSTEM76_KUDU = (1 << 4), -+ EVDEV_MODEL_CLEVO_W740SU = (1 << 5), -+ EVDEV_MODEL_APPLE_TOUCHPAD = (1 << 6), -+ EVDEV_MODEL_WACOM_TOUCHPAD = (1 << 7), -+ EVDEV_MODEL_ALPS_TOUCHPAD = (1 << 8), - }; - - struct mt_slot { -@@ -221,7 +221,7 @@ struct evdev_device { - int dpi; /* HW resolution */ - struct ratelimit syn_drop_limit; /* ratelimit for SYN_DROPPED logging */ - -- enum evdev_device_model model; -+ uint32_t model_flags; - }; - - #define EVDEV_UNHANDLED_DEVICE ((struct evdev_device *) 1) -diff --git a/udev/90-libinput-model-quirks.rules.in b/udev/90-libinput-model-quirks.rules.in -index d834155..5b07726 100644 ---- a/udev/90-libinput-model-quirks.rules.in -+++ b/udev/90-libinput-model-quirks.rules.in -@@ -25,18 +25,12 @@ KERNELS=="*input*", \ - IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:fwversion:$env{LIBINPUT_MODEL_FIRMWARE_VERSION}'" - # End of touchpad firmware detection - --# Matches below are exclusive, if one matches we skip the rest --# hwdb matches: --# - # libinput:touchpad: - ENV{ID_INPUT_TOUCHPAD}=="1", \ -- IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=libinput:touchpad:", \ -- GOTO="libinput_model_quirks_end" -+ IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=libinput:touchpad:" - - # libinput:name::dmi: - KERNELS=="input*", \ -- IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:$attr{[dmi/id]modalias}'", \ -- GOTO="libinput_model_quirks_end" -- -+ IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:$attr{[dmi/id]modalias}'" - - LABEL="libinput_model_quirks_end" --- -2.4.3 - diff --git a/0002-gestures-check-ntouches-not-just-num_slots-for-the-n.patch b/0002-gestures-check-ntouches-not-just-num_slots-for-the-n.patch deleted file mode 100644 index b00fa0b..0000000 --- a/0002-gestures-check-ntouches-not-just-num_slots-for-the-n.patch +++ /dev/null @@ -1,32 +0,0 @@ -From c24a69a0db8cc18e580cc813b91fae6aff9bb74a Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 29 Jul 2015 17:12:53 +1000 -Subject: [PATCH libinput] 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 ---- - src/evdev-mt-touchpad-gestures.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c -index 8bcdeb4..6b1a273 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; --- -2.4.3 - diff --git a/0003-Tag-synaptics-serial-touchpads-with-a-LIBINPUT_MODEL.patch b/0003-Tag-synaptics-serial-touchpads-with-a-LIBINPUT_MODEL.patch deleted file mode 100644 index 6bd10c7..0000000 --- a/0003-Tag-synaptics-serial-touchpads-with-a-LIBINPUT_MODEL.patch +++ /dev/null @@ -1,114 +0,0 @@ -From 7c249ed9722f411e0acdd12e14dc81c617309974 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 16 Jul 2015 16:05:48 +1000 -Subject: [PATCH libinput 3/4] Tag synaptics serial touchpads with a - LIBINPUT_MODEL tag - -Signed-off-by: Peter Hutterer -Hallelujah-expressed-by: Benjamin Tissoires -Reviewed-by: Hans de Goede -(cherry picked from commit ab016fd8ed84b58a8f9cabc958cd91ebb4110e57) ---- - src/evdev.c | 1 + - src/evdev.h | 1 + - src/libinput-util.h | 2 ++ - test/device.c | 23 +++++++++++++++++++++++ - udev/90-libinput-model-quirks.hwdb | 6 ++++++ - 5 files changed, 33 insertions(+) - -diff --git a/src/evdev.c b/src/evdev.c -index 2e757d8..96ad2a7 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1537,6 +1537,7 @@ evdev_read_model_flags(struct evdev_device *device) - { "LIBINPUT_MODEL_APPLE_TOUCHPAD", EVDEV_MODEL_APPLE_TOUCHPAD }, - { "LIBINPUT_MODEL_WACOM_TOUCHPAD", EVDEV_MODEL_WACOM_TOUCHPAD }, - { "LIBINPUT_MODEL_ALPS_TOUCHPAD", EVDEV_MODEL_ALPS_TOUCHPAD }, -+ { "LIBINPUT_MODEL_SYNAPTICS_SERIAL_TOUCHPAD", EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD }, - { NULL, EVDEV_MODEL_DEFAULT }, - }; - const struct model_map *m = model_map; -diff --git a/src/evdev.h b/src/evdev.h -index 363f93b..6a71232 100644 ---- a/src/evdev.h -+++ b/src/evdev.h -@@ -105,6 +105,7 @@ enum evdev_device_model { - EVDEV_MODEL_APPLE_TOUCHPAD = (1 << 6), - EVDEV_MODEL_WACOM_TOUCHPAD = (1 << 7), - EVDEV_MODEL_ALPS_TOUCHPAD = (1 << 8), -+ EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD = (1 << 9), - }; - - struct mt_slot { -diff --git a/src/libinput-util.h b/src/libinput-util.h -index f27bcfd..85fc93a 100644 ---- a/src/libinput-util.h -+++ b/src/libinput-util.h -@@ -37,6 +37,8 @@ - - #define VENDOR_ID_APPLE 0x5ac - #define VENDOR_ID_WACOM 0x56a -+#define VENDOR_ID_SYNAPTICS_SERIAL 0x002 -+#define PRODUCT_ID_SYNAPTICS_SERIAL 0x007 - - /* The HW DPI rate we normalize to before calculating pointer acceleration */ - #define DEFAULT_MOUSE_DPI 1000 -diff --git a/test/device.c b/test/device.c -index f43228c..59939d6 100644 ---- a/test/device.c -+++ b/test/device.c -@@ -1008,6 +1008,28 @@ START_TEST(device_udev_tag_apple) - udev_device_unref(d); - } - END_TEST -+ -+START_TEST(device_udev_tag_synaptics_serial) -+{ -+ struct litest_device *dev = litest_current_device(); -+ struct libinput_device *device = dev->libinput_device; -+ struct udev_device *d; -+ const char *prop; -+ -+ d = libinput_device_get_udev_device(device); -+ prop = udev_device_get_property_value(d, -+ "LIBINPUT_MODEL_SYNAPTICS_SERIAL_TOUCHPAD"); -+ -+ if (libevdev_get_id_vendor(dev->evdev) == VENDOR_ID_SYNAPTICS_SERIAL && -+ libevdev_get_id_product(dev->evdev) == PRODUCT_ID_SYNAPTICS_SERIAL) -+ ck_assert_notnull(prop); -+ else -+ ck_assert(prop == NULL); -+ -+ udev_device_unref(d); -+} -+END_TEST -+ - void - litest_setup_tests(void) - { -@@ -1054,4 +1076,5 @@ litest_setup_tests(void) - litest_add("device:udev tags", device_udev_tag_alps, LITEST_TOUCHPAD, LITEST_ANY); - litest_add("device:udev tags", device_udev_tag_wacom, LITEST_TOUCHPAD, LITEST_ANY); - litest_add("device:udev tags", device_udev_tag_apple, LITEST_TOUCHPAD, LITEST_ANY); -+ litest_add("device:udev tags", device_udev_tag_synaptics_serial, LITEST_TOUCHPAD, LITEST_ANY); - } -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index eec00b6..a34b8f1 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -71,6 +71,12 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX230* - LIBINPUT_MODEL_LENOVO_X230=1 - - ########################################## -+# Synaptics -+########################################## -+libinput:touchpad:input:b0011v0002p0007* -+ LIBINPUT_MODEL_SYNAPTICS_SERIAL_TOUCHPAD=1 -+ -+########################################## - # System76 - ########################################## - --- -2.4.3 - diff --git a/0004-touchpad-disable-2fg-scrolling-on-Synaptics-semi-mt-.patch b/0004-touchpad-disable-2fg-scrolling-on-Synaptics-semi-mt-.patch deleted file mode 100644 index 8149da0..0000000 --- a/0004-touchpad-disable-2fg-scrolling-on-Synaptics-semi-mt-.patch +++ /dev/null @@ -1,253 +0,0 @@ -From a4923241ca5b14e78224b50f9b0056f940e0cb7d Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 14 Jul 2015 10:27:46 +1000 -Subject: [PATCH libinput 4/4] touchpad: disable 2fg scrolling on Synaptics - semi-mt touchpads - -These touchpads have a terrible resolution when two fingers are down, causing -scrolling to jump around a lot. That then turns into bug reports that we can't -do much about, the data is simply garbage. - -https://bugs.freedesktop.org/show_bug.cgi?id=91135 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -(cherry picked from commit eb146677eb5abb7951af4ead80874c992915b90d) ---- - doc/scrolling.dox | 7 +++++++ - src/evdev-mt-touchpad.c | 36 +++++++++++++++++++++++++++++------- - src/evdev.c | 1 + - src/evdev.h | 1 + - test/litest-device-synaptics-hover.c | 10 ++++++++++ - test/touchpad.c | 21 ++++++++++++++++++--- - udev/libinput-model-quirks.c | 26 ++++++++++++++++++++++++++ - 7 files changed, 92 insertions(+), 10 deletions(-) - -diff --git a/doc/scrolling.dox b/doc/scrolling.dox -index 658fe4b..0c03c98 100644 ---- a/doc/scrolling.dox -+++ b/doc/scrolling.dox -@@ -44,6 +44,13 @@ movements will translate into tiny scroll movements. - Scrolling in both directions at once is possible by meeting the required - distance thresholds to enable each direction separately. - -+Two-finger scrolling requires the touchpad to track both touch points with -+reasonable precision. Unfortunately, some so-called "semi-mt" touchpads can -+only track the bounding box of the two fingers rather than the actual -+position of each finger. In addition, that bounding box usually suffers from -+a low resolution, causing jumpy movement during two-finger scrolling. -+libinput does not provide two-finger scrolling on those touchpads. -+ - @section edge_scrolling Edge scrolling - - On some touchpads, edge scrolling is available, triggered by moving a single -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index c5c54bb..a9f4000 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -1366,18 +1366,29 @@ tp_init_accel(struct tp_dispatch *tp, double diagonal) - } - - static uint32_t --tp_scroll_config_scroll_method_get_methods(struct libinput_device *device) -+tp_scroll_get_methods(struct tp_dispatch *tp) - { -- struct evdev_device *evdev = (struct evdev_device*)device; -- struct tp_dispatch *tp = (struct tp_dispatch*)evdev->dispatch; - uint32_t methods = LIBINPUT_CONFIG_SCROLL_EDGE; - -- if (tp->ntouches >= 2) -+ /* some Synaptics semi-mt touchpads have a terrible 2fg resolution, -+ * causing scroll jumps. For all other 2fg touchpads, we enable 2fg -+ * scrolling */ -+ if (tp->ntouches >= 2 && -+ (tp->device->model_flags & EVDEV_MODEL_JUMPING_SEMI_MT) == 0) - methods |= LIBINPUT_CONFIG_SCROLL_2FG; - - return methods; - } - -+static uint32_t -+tp_scroll_config_scroll_method_get_methods(struct libinput_device *device) -+{ -+ struct evdev_device *evdev = (struct evdev_device*)device; -+ struct tp_dispatch *tp = (struct tp_dispatch*)evdev->dispatch; -+ -+ return tp_scroll_get_methods(tp); -+} -+ - static enum libinput_config_status - tp_scroll_config_scroll_method_set_method(struct libinput_device *device, - enum libinput_config_scroll_method method) -@@ -1409,10 +1420,21 @@ tp_scroll_config_scroll_method_get_method(struct libinput_device *device) - static enum libinput_config_scroll_method - tp_scroll_get_default_method(struct tp_dispatch *tp) - { -- if (tp->ntouches >= 2) -- return LIBINPUT_CONFIG_SCROLL_2FG; -+ uint32_t methods; -+ enum libinput_config_scroll_method method; -+ -+ methods = tp_scroll_get_methods(tp); -+ -+ if (methods & LIBINPUT_CONFIG_SCROLL_2FG) -+ method = LIBINPUT_CONFIG_SCROLL_2FG; - else -- return LIBINPUT_CONFIG_SCROLL_EDGE; -+ method = LIBINPUT_CONFIG_SCROLL_EDGE; -+ -+ if ((methods & method) == 0) -+ log_bug_libinput(tp_libinput_context(tp), -+ "Invalid default scroll method %d\n", -+ method); -+ return method; - } - - static enum libinput_config_scroll_method -diff --git a/src/evdev.c b/src/evdev.c -index 96ad2a7..35fc2a3 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1538,6 +1538,7 @@ evdev_read_model_flags(struct evdev_device *device) - { "LIBINPUT_MODEL_WACOM_TOUCHPAD", EVDEV_MODEL_WACOM_TOUCHPAD }, - { "LIBINPUT_MODEL_ALPS_TOUCHPAD", EVDEV_MODEL_ALPS_TOUCHPAD }, - { "LIBINPUT_MODEL_SYNAPTICS_SERIAL_TOUCHPAD", EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD }, -+ { "LIBINPUT_MODEL_JUMPING_SEMI_MT", EVDEV_MODEL_JUMPING_SEMI_MT }, - { NULL, EVDEV_MODEL_DEFAULT }, - }; - const struct model_map *m = model_map; -diff --git a/src/evdev.h b/src/evdev.h -index 6a71232..1c4ebc0 100644 ---- a/src/evdev.h -+++ b/src/evdev.h -@@ -106,6 +106,7 @@ enum evdev_device_model { - EVDEV_MODEL_WACOM_TOUCHPAD = (1 << 7), - EVDEV_MODEL_ALPS_TOUCHPAD = (1 << 8), - EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD = (1 << 9), -+ EVDEV_MODEL_JUMPING_SEMI_MT = (1 << 10), - }; - - struct mt_slot { -diff --git a/test/litest-device-synaptics-hover.c b/test/litest-device-synaptics-hover.c -index 2cc9b72..3c36aff 100644 ---- a/test/litest-device-synaptics-hover.c -+++ b/test/litest-device-synaptics-hover.c -@@ -102,6 +102,15 @@ static struct input_absinfo absinfo[] = { - { .value = -1 } - }; - -+static const char udev_rule[] = -+"ACTION==\"remove\", GOTO=\"synaptics_semi_mt_end\"\n" -+"KERNEL!=\"event*\", GOTO=\"synaptics_semi_mt_end\"\n" -+"\n" -+"ATTRS{name}==\"SynPS/2 Synaptics TouchPad\",\n" -+" ENV{LIBINPUT_MODEL_JUMPING_SEMI_MT}=\"1\"\n" -+"\n" -+"LABEL=\"synaptics_semi_mt_end\""; -+ - struct litest_test_device litest_synaptics_hover_device = { - .type = LITEST_SYNAPTICS_HOVER_SEMI_MT, - .features = LITEST_TOUCHPAD | LITEST_SEMI_MT | LITEST_BUTTON, -@@ -114,6 +123,7 @@ struct litest_test_device litest_synaptics_hover_device = { - .id = &input_id, - .events = events, - .absinfo = absinfo, -+ .udev_rule = udev_rule, - }; - - static void -diff --git a/test/touchpad.c b/test/touchpad.c -index 12bceea..759f82a 100644 ---- a/test/touchpad.c -+++ b/test/touchpad.c -@@ -69,6 +69,16 @@ enable_buttonareas(struct litest_device *dev) - litest_assert_int_eq(status, expected); - } - -+static inline int -+is_synaptics_semi_mt(struct litest_device *dev) -+{ -+ struct libevdev *evdev = dev->evdev; -+ -+ return libevdev_has_property(evdev, INPUT_PROP_SEMI_MT) && -+ libevdev_get_id_vendor(evdev) == 0x2 && -+ libevdev_get_id_product(evdev) == 0x7; -+} -+ - START_TEST(touchpad_1fg_motion) - { - struct litest_device *dev = litest_current_device(); -@@ -1581,10 +1591,14 @@ START_TEST(touchpad_scroll_defaults) - - method = libinput_device_config_scroll_get_methods(device); - ck_assert(method & LIBINPUT_CONFIG_SCROLL_EDGE); -- if (libevdev_get_num_slots(evdev) > 1) -+ if (libevdev_get_num_slots(evdev) > 1 && -+ !is_synaptics_semi_mt(dev)) - ck_assert(method & LIBINPUT_CONFIG_SCROLL_2FG); -+ else -+ ck_assert((method & LIBINPUT_CONFIG_SCROLL_2FG) == 0); - -- if (libevdev_get_num_slots(evdev) > 1) -+ if (libevdev_get_num_slots(evdev) > 1 && -+ !is_synaptics_semi_mt(dev)) - expected = LIBINPUT_CONFIG_SCROLL_2FG; - else - expected = LIBINPUT_CONFIG_SCROLL_EDGE; -@@ -1600,7 +1614,8 @@ START_TEST(touchpad_scroll_defaults) - status = libinput_device_config_scroll_set_method(device, - LIBINPUT_CONFIG_SCROLL_2FG); - -- if (libevdev_get_num_slots(evdev) > 1) -+ if (libevdev_get_num_slots(evdev) > 1 && -+ !is_synaptics_semi_mt(dev)) - ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); - else - ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_UNSUPPORTED); -diff --git a/udev/libinput-model-quirks.c b/udev/libinput-model-quirks.c -index fc3dbe8..0e737a4 100644 ---- a/udev/libinput-model-quirks.c -+++ b/udev/libinput-model-quirks.c -@@ -69,6 +69,30 @@ handle_touchpad_alps(struct udev_device *device) - } - - static void -+handle_touchpad_synaptics(struct udev_device *device) -+{ -+ const char *product, *props; -+ int bus, vid, pid, version; -+ int prop; -+ -+ product = prop_value(device, "PRODUCT"); -+ if (!product) -+ return; -+ -+ if (sscanf(product, "%x/%x/%x/%x", &bus, &vid, &pid, &version) != 4) -+ return; -+ -+ if (bus != BUS_I8042 || vid != 0x2 || pid != 0x7) -+ return; -+ -+ props = prop_value(device, "PROP"); -+ if (sscanf(props, "%x", &prop) != 1) -+ return; -+ if (prop & (1 << INPUT_PROP_SEMI_MT)) -+ printf("LIBINPUT_MODEL_JUMPING_SEMI_MT=1\n"); -+} -+ -+static void - handle_touchpad(struct udev_device *device) - { - const char *name = NULL; -@@ -79,6 +103,8 @@ handle_touchpad(struct udev_device *device) - - if (strstr(name, "AlpsPS/2 ALPS") != NULL) - handle_touchpad_alps(device); -+ if (strstr(name, "Synaptics ") != NULL) -+ handle_touchpad_synaptics(device); - } - - int main(int argc, char **argv) --- -2.4.3 - diff --git a/libinput.spec b/libinput.spec index 2eb7839..9b14cd4 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 0.20.0 -Release: 6%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 0.21.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,21 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch04: 0001-touchpad-only-edge-scroll-while-the-finger-is-in-the.patch -Patch05: 0001-udev-don-t-install-the-litest-udev-rules.patch -Patch06: 0001-evdev-restore-pointing-stick-const-accel-property-pa.patch -# Fedora-specific, remove when thumb detection is fixed upstream -Patch07: 0001-Disable-thumb-detection-it-s-too-aggressive-1246093.patch -# Bug 1235175 - Synaptics Touchpad two-finger scrolling jumps -Patch08: 0001-touchpad-remove-a-leftover-check-for-fake-resolution.patch -Patch09: 0002-evdev-allow-for-multiple-LIBINPUT_MODEL_-flags-per-d.patch -Patch10: 0003-Tag-synaptics-serial-touchpads-with-a-LIBINPUT_MODEL.patch -Patch11: 0004-touchpad-disable-2fg-scrolling-on-Synaptics-semi-mt-.patch -# Bug 1246651 - two-finger scroll stopped working with upgrade to 0.20.0-1 -Patch12: 0001-udev-add-size-hint-for-appletouch-one-button-touchpa.patch -Patch13: 0002-gestures-check-ntouches-not-just-num_slots-for-the-n.patch -# Bug 1246868 Two finger scrolling does not work with first and fourth fingers (cf. Synaptics driver) -Patch14: 0001-touchpad-drop-distance-threshold-to-detect-pinches.patch +# 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 @@ -110,6 +97,10 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Aug 04 2015 Peter Hutterer 0.21.0-1 +- libinput 0.21.0 +- fix 3fg touch detection on Synaptics semi-mt touchpads + * Thu Jul 30 2015 Peter Hutterer 0.20.0-6 - Fix broken 2fg scrolling on single-touch touchpads (#1246651) - Drop distance threshold for 2fg gesture detection (#1246868) diff --git a/sources b/sources index 9e00cd3..e567f73 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -444f3a4061be560310cb761cac6fa178 libinput-0.20.0.tar.xz +f91d8f4ced986f1ae16d52ea02bc7837 libinput-0.21.0.tar.xz From f214e24e936c089f2c16b6e2cf72994f56d105d2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 4 Aug 2015 16:36:45 +1000 Subject: [PATCH 044/317] Fix pointer speed configuration, broke with 0.21.0 --- ...ix-acceleration-threshold-assignment.patch | 45 +++++++++++++++++++ libinput.spec | 7 ++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 0001-filter-fix-acceleration-threshold-assignment.patch diff --git a/0001-filter-fix-acceleration-threshold-assignment.patch b/0001-filter-fix-acceleration-threshold-assignment.patch new file mode 100644 index 0000000..3bd6ad4 --- /dev/null +++ b/0001-filter-fix-acceleration-threshold-assignment.patch @@ -0,0 +1,45 @@ +From 254f87564f485ff44b8426cac3ac7f8efc47e681 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 4 Aug 2015 15:08:25 +1000 +Subject: [PATCH libinput] filter: fix acceleration threshold assignment +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The new values were in units/us and didn't make the switch back to ms in +8a6825f1602. + +Signed-off-by: Peter Hutterer +Reviewed-by: Jonas Ådahl +--- + src/filter.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/filter.c b/src/filter.c +index 2506ee2..e11d58a 100644 +--- a/src/filter.c ++++ b/src/filter.c +@@ -78,6 +78,7 @@ filter_get_speed(struct motion_filter *filter) + */ + + #define DEFAULT_THRESHOLD 0.4 /* in units/ms */ ++#define MINIMUM_THRESHOLD 0.2 /* in units/ms */ + #define DEFAULT_ACCELERATION 2.0 /* unitless factor */ + #define DEFAULT_INCLINE 1.1 /* unitless factor */ + +@@ -333,9 +334,9 @@ accelerator_set_speed(struct motion_filter *filter, + assert(speed >= -1.0 && speed <= 1.0); + + /* delay when accel kicks in */ +- accel_filter->threshold = DEFAULT_THRESHOLD - speed / 4000.0; +- if (accel_filter->threshold < 0.0002) +- accel_filter->threshold = 0.0002; ++ accel_filter->threshold = DEFAULT_THRESHOLD - speed / 4.0; ++ if (accel_filter->threshold < MINIMUM_THRESHOLD) ++ accel_filter->threshold = MINIMUM_THRESHOLD; + + /* adjust max accel factor */ + accel_filter->accel = DEFAULT_ACCELERATION + speed * 1.5; +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index 9b14cd4..80b7d38 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.21.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,6 +21,8 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 +Patch02: 0001-filter-fix-acceleration-threshold-assignment.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -97,6 +99,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Aug 04 2015 Peter Hutterer 0.21.0-2 +- Fix pointer speed configuration, broke with 0.21.0 + * Tue Aug 04 2015 Peter Hutterer 0.21.0-1 - libinput 0.21.0 - fix 3fg touch detection on Synaptics semi-mt touchpads From 83d26eb5cf6e2eaa362501b08add75a0677a6075 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 5 Aug 2015 11:40:45 +1000 Subject: [PATCH 045/317] Fix 2fg scroll threshold handling (#1249365) --- ...ll-threshold-and-direction-lock-thre.patch | 81 +++++++++++++++++++ libinput.spec | 7 +- 2 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 0001-evdev-split-scroll-threshold-and-direction-lock-thre.patch diff --git a/0001-evdev-split-scroll-threshold-and-direction-lock-thre.patch b/0001-evdev-split-scroll-threshold-and-direction-lock-thre.patch new file mode 100644 index 0000000..8aceff0 --- /dev/null +++ b/0001-evdev-split-scroll-threshold-and-direction-lock-thre.patch @@ -0,0 +1,81 @@ +From 323357335db0a470fdcc7fe4f1929aac2154e214 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 5 Aug 2015 10:55:39 +1000 +Subject: [PATCH libinput] evdev: split scroll threshold and direction lock + threshold into two + +The previous code used a 5mm threshold before axis events were posted. This +threshold was on top of the 2mm 2fg threshold (and timeout handling) in the +gesture code and effectively prevented events from being sent after a timeout, +or in the 2mm-5mm range. + +We still want a directional lock though, so split the two out. The default 5mm +threshold is set to 0 for touchpads since we have our own handling of the +threshold there. The directional lock only applies once scrollin has started +and remains on 5mm. + +Signed-off-by: Peter Hutterer +--- + src/evdev-mt-touchpad.c | 5 +++-- + src/evdev.c | 5 +++-- + src/evdev.h | 1 + + 3 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index a683d9a..872da98 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1628,8 +1628,9 @@ tp_init_scroll(struct tp_dispatch *tp, struct evdev_device *device) + tp->scroll.method = tp_scroll_get_default_method(tp); + tp->device->base.config.scroll_method = &tp->scroll.config_method; + +- /* In mm for touchpads with valid resolution, see tp_init_accel() */ +- tp->device->scroll.threshold = 5.0; ++ /* In mm for touchpads with valid resolution, see tp_init_accel() */ ++ tp->device->scroll.threshold = 0.0; ++ tp->device->scroll.direction_lock_threshold = 5.0; + + return 0; + } +diff --git a/src/evdev.c b/src/evdev.c +index 17c2604..53ebf9d 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -2146,6 +2146,7 @@ evdev_device_create(struct libinput_seat *seat, + device->pending_event = EVDEV_NONE; + device->devname = libevdev_get_name(device->evdev); + device->scroll.threshold = 5.0; /* Default may be overridden */ ++ device->scroll.direction_lock_threshold = 5.0; /* Default may be overridden */ + device->scroll.direction = 0; + device->scroll.wheel_click_angle = + evdev_read_wheel_click_prop(device); +@@ -2414,12 +2415,12 @@ evdev_post_scroll(struct evdev_device *device, + trigger speed to start scrolling in the other direction */ + } else if (!evdev_is_scrolling(device, + LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL)) { +- if (fabs(delta->y) >= device->scroll.threshold) ++ if (fabs(delta->y) >= device->scroll.direction_lock_threshold) + evdev_start_scrolling(device, + LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL); + } else if (!evdev_is_scrolling(device, + LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL)) { +- if (fabs(delta->x) >= device->scroll.threshold) ++ if (fabs(delta->x) >= device->scroll.direction_lock_threshold) + evdev_start_scrolling(device, + LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL); + } +diff --git a/src/evdev.h b/src/evdev.h +index be5df0d..65c5a41 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -166,6 +166,7 @@ struct evdev_device { + void (*change_scroll_method)(struct evdev_device *device); + bool button_scroll_active; + double threshold; ++ double direction_lock_threshold; + uint32_t direction; + struct normalized_coords buildup; + +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index 80b7d38..8379340 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.21.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -22,6 +22,8 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} Patch01: 0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch Patch02: 0001-filter-fix-acceleration-threshold-assignment.patch +# Bug 1249365 - Two finger scrolling is insensitive for small movements, then too sensitive +Patch03: 0001-evdev-split-scroll-threshold-and-direction-lock-thre.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -99,6 +101,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Aug 05 2015 Peter Hutterer 0.21.0-3 +- Fix 2fg scroll threshold handling (#1249365) + * Tue Aug 04 2015 Peter Hutterer 0.21.0-2 - Fix pointer speed configuration, broke with 0.21.0 From b9843a4adcddabc30ff2796a3070f35ffd1b232b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 21 Aug 2015 11:36:58 +1000 Subject: [PATCH 046/317] libinput 1.0RC1 --- .gitignore | 1 + ...ll-threshold-and-direction-lock-thre.patch | 81 ------------------- ...ix-acceleration-threshold-assignment.patch | 45 ----------- libinput.spec | 11 ++- sources | 2 +- 5 files changed, 7 insertions(+), 133 deletions(-) delete mode 100644 0001-evdev-split-scroll-threshold-and-direction-lock-thre.patch delete mode 100644 0001-filter-fix-acceleration-threshold-assignment.patch diff --git a/.gitignore b/.gitignore index d88f043..f6b3d40 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ /libinput-0.19.0.tar.xz /libinput-0.20.0.tar.xz /libinput-0.21.0.tar.xz +/libinput-0.99.1.tar.xz diff --git a/0001-evdev-split-scroll-threshold-and-direction-lock-thre.patch b/0001-evdev-split-scroll-threshold-and-direction-lock-thre.patch deleted file mode 100644 index 8aceff0..0000000 --- a/0001-evdev-split-scroll-threshold-and-direction-lock-thre.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 323357335db0a470fdcc7fe4f1929aac2154e214 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 5 Aug 2015 10:55:39 +1000 -Subject: [PATCH libinput] evdev: split scroll threshold and direction lock - threshold into two - -The previous code used a 5mm threshold before axis events were posted. This -threshold was on top of the 2mm 2fg threshold (and timeout handling) in the -gesture code and effectively prevented events from being sent after a timeout, -or in the 2mm-5mm range. - -We still want a directional lock though, so split the two out. The default 5mm -threshold is set to 0 for touchpads since we have our own handling of the -threshold there. The directional lock only applies once scrollin has started -and remains on 5mm. - -Signed-off-by: Peter Hutterer ---- - src/evdev-mt-touchpad.c | 5 +++-- - src/evdev.c | 5 +++-- - src/evdev.h | 1 + - 3 files changed, 7 insertions(+), 4 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index a683d9a..872da98 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -1628,8 +1628,9 @@ tp_init_scroll(struct tp_dispatch *tp, struct evdev_device *device) - tp->scroll.method = tp_scroll_get_default_method(tp); - tp->device->base.config.scroll_method = &tp->scroll.config_method; - -- /* In mm for touchpads with valid resolution, see tp_init_accel() */ -- tp->device->scroll.threshold = 5.0; -+ /* In mm for touchpads with valid resolution, see tp_init_accel() */ -+ tp->device->scroll.threshold = 0.0; -+ tp->device->scroll.direction_lock_threshold = 5.0; - - return 0; - } -diff --git a/src/evdev.c b/src/evdev.c -index 17c2604..53ebf9d 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -2146,6 +2146,7 @@ evdev_device_create(struct libinput_seat *seat, - device->pending_event = EVDEV_NONE; - device->devname = libevdev_get_name(device->evdev); - device->scroll.threshold = 5.0; /* Default may be overridden */ -+ device->scroll.direction_lock_threshold = 5.0; /* Default may be overridden */ - device->scroll.direction = 0; - device->scroll.wheel_click_angle = - evdev_read_wheel_click_prop(device); -@@ -2414,12 +2415,12 @@ evdev_post_scroll(struct evdev_device *device, - trigger speed to start scrolling in the other direction */ - } else if (!evdev_is_scrolling(device, - LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL)) { -- if (fabs(delta->y) >= device->scroll.threshold) -+ if (fabs(delta->y) >= device->scroll.direction_lock_threshold) - evdev_start_scrolling(device, - LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL); - } else if (!evdev_is_scrolling(device, - LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL)) { -- if (fabs(delta->x) >= device->scroll.threshold) -+ if (fabs(delta->x) >= device->scroll.direction_lock_threshold) - evdev_start_scrolling(device, - LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL); - } -diff --git a/src/evdev.h b/src/evdev.h -index be5df0d..65c5a41 100644 ---- a/src/evdev.h -+++ b/src/evdev.h -@@ -166,6 +166,7 @@ struct evdev_device { - void (*change_scroll_method)(struct evdev_device *device); - bool button_scroll_active; - double threshold; -+ double direction_lock_threshold; - uint32_t direction; - struct normalized_coords buildup; - --- -2.4.3 - diff --git a/0001-filter-fix-acceleration-threshold-assignment.patch b/0001-filter-fix-acceleration-threshold-assignment.patch deleted file mode 100644 index 3bd6ad4..0000000 --- a/0001-filter-fix-acceleration-threshold-assignment.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 254f87564f485ff44b8426cac3ac7f8efc47e681 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 4 Aug 2015 15:08:25 +1000 -Subject: [PATCH libinput] filter: fix acceleration threshold assignment -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The new values were in units/us and didn't make the switch back to ms in -8a6825f1602. - -Signed-off-by: Peter Hutterer -Reviewed-by: Jonas Ådahl ---- - src/filter.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/src/filter.c b/src/filter.c -index 2506ee2..e11d58a 100644 ---- a/src/filter.c -+++ b/src/filter.c -@@ -78,6 +78,7 @@ filter_get_speed(struct motion_filter *filter) - */ - - #define DEFAULT_THRESHOLD 0.4 /* in units/ms */ -+#define MINIMUM_THRESHOLD 0.2 /* in units/ms */ - #define DEFAULT_ACCELERATION 2.0 /* unitless factor */ - #define DEFAULT_INCLINE 1.1 /* unitless factor */ - -@@ -333,9 +334,9 @@ accelerator_set_speed(struct motion_filter *filter, - assert(speed >= -1.0 && speed <= 1.0); - - /* delay when accel kicks in */ -- accel_filter->threshold = DEFAULT_THRESHOLD - speed / 4000.0; -- if (accel_filter->threshold < 0.0002) -- accel_filter->threshold = 0.0002; -+ accel_filter->threshold = DEFAULT_THRESHOLD - speed / 4.0; -+ if (accel_filter->threshold < MINIMUM_THRESHOLD) -+ accel_filter->threshold = MINIMUM_THRESHOLD; - - /* adjust max accel factor */ - accel_filter->accel = DEFAULT_ACCELERATION + speed * 1.5; --- -2.4.3 - diff --git a/libinput.spec b/libinput.spec index 8379340..abec586 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 0.21.0 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 0.99.1 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,10 +21,6 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 -Patch02: 0001-filter-fix-acceleration-threshold-assignment.patch -# Bug 1249365 - Two finger scrolling is insensitive for small movements, then too sensitive -Patch03: 0001-evdev-split-scroll-threshold-and-direction-lock-thre.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -101,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Aug 21 2015 Peter Hutterer 0.99.1-1 +- libinput 1.0RC1 + * Wed Aug 05 2015 Peter Hutterer 0.21.0-3 - Fix 2fg scroll threshold handling (#1249365) diff --git a/sources b/sources index e567f73..254f88a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f91d8f4ced986f1ae16d52ea02bc7837 libinput-0.21.0.tar.xz +8be98cb916d8e7b230ec31f6e9cb97c2 libinput-0.99.1.tar.xz From b62b76138cc90ad2dfd00ba56285f74b56d19458 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 26 Aug 2015 12:09:35 +1000 Subject: [PATCH 047/317] libinput 1.0 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f6b3d40..e94986b 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ /libinput-0.20.0.tar.xz /libinput-0.21.0.tar.xz /libinput-0.99.1.tar.xz +/libinput-1.0.0.tar.xz diff --git a/libinput.spec b/libinput.spec index abec586..5d03161 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 0.99.1 +Version: 1.0.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Aug 26 2015 Peter Hutterer 1.0.0-1 +- libinput 1.0 + * Fri Aug 21 2015 Peter Hutterer 0.99.1-1 - libinput 1.0RC1 diff --git a/sources b/sources index 254f88a..2b3e766 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8be98cb916d8e7b230ec31f6e9cb97c2 libinput-0.99.1.tar.xz +bccad36d15517515443b50d48b116db0 libinput-1.0.0.tar.xz From 0a2ad2a85a289ba9e237aae37cd481676a35f803 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 3 Sep 2015 18:33:47 +1000 Subject: [PATCH 048/317] libinput 1.0.1 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e94986b..5e9fadb 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ /libinput-0.21.0.tar.xz /libinput-0.99.1.tar.xz /libinput-1.0.0.tar.xz +/libinput-1.0.1.tar.xz diff --git a/libinput.spec b/libinput.spec index 5d03161..844d3e7 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.0.0 +Version: 1.0.1 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Sep 03 2015 Peter Hutterer 1.0.1-1 +- libinput 1.0.1 + * Wed Aug 26 2015 Peter Hutterer 1.0.0-1 - libinput 1.0 diff --git a/sources b/sources index 2b3e766..c79af99 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bccad36d15517515443b50d48b116db0 libinput-1.0.0.tar.xz +f390e592aa09f77dabceabeb2ddd4419 libinput-1.0.1.tar.xz From 6ffe302aac2f3304d760ed904ee512064b68e6e7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 7 Sep 2015 10:52:08 +1000 Subject: [PATCH 049/317] Don't interpret short scrolls as right click (#1256045) --- ...ap-for-2fg-down-followed-by-a-single.patch | 594 ++++++++++++++++++ libinput.spec | 8 +- 2 files changed, 601 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-don-t-tap-for-2fg-down-followed-by-a-single.patch diff --git a/0001-touchpad-don-t-tap-for-2fg-down-followed-by-a-single.patch b/0001-touchpad-don-t-tap-for-2fg-down-followed-by-a-single.patch new file mode 100644 index 0000000..f515bde --- /dev/null +++ b/0001-touchpad-don-t-tap-for-2fg-down-followed-by-a-single.patch @@ -0,0 +1,594 @@ +From 79570fd492691b4ce97360e7775965e5765a702b Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 31 Aug 2015 11:10:58 +1000 +Subject: [PATCH libinput] touchpad: don't tap for 2fg down, followed by a + single finger up + +The following sequence currently generates a right-button event: + finger 1 down + finger 2 down + finger 1 up + finger 2 held down + +This is easily triggered with short scroll events. There are two issues here: +first is that the tapping code elsewhere treats any tap with a second finger +down as a left-button tap, not a right button one. So if anything, we should +generate a left button click here, not a right button click. + +Arguably, generating a button click here is wrong though, it's not a very well +defined sequence and relatively difficult to trigger intentionally. So the +best solution here is to simply ignore the release event and move straight +back to state HOLD - unless the second finger is released within the timeout. +If the finger is set down again during the timeout, we move straight to +TOUCH_2_HOLD - this could eventually be interpreted as a tap, but not for now. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + doc/touchpad-tap-state-machine.svg | 254 +++++++++++++++++++++++-------------- + src/evdev-mt-touchpad-tap.c | 41 +++++- + src/evdev-mt-touchpad.h | 1 + + test/touchpad-tap.c | 46 +++++++ + 4 files changed, 240 insertions(+), 102 deletions(-) + +diff --git a/doc/touchpad-tap-state-machine.svg b/doc/touchpad-tap-state-machine.svg +index b1c5995..9fee48a 100644 +--- a/doc/touchpad-tap-state-machine.svg ++++ b/doc/touchpad-tap-state-machine.svg +@@ -35,11 +35,11 @@ + + + +- ++ + +- ++ + button 1 +- ++ + press + + +@@ -72,20 +72,20 @@ + + TOUCH_2 + +- ++ + +- ++ + second +- ++ + finger up + +- +- +- ++ ++ ++ + +- ++ + button 2 +- ++ + press + + +@@ -104,45 +104,45 @@ + + + +- ++ + +- ++ + button 1 +- ++ + release + +- ++ + +- ++ + button 2 +- ++ + release + +- +- +- +- +- ++ ++ ++ ++ ++ + +- ++ + TAPPED + +- ++ + +- ++ + timeout + +- +- +- ++ ++ ++ + +- ++ + first +- ++ + finger down + +- +- ++ ++ + + + +@@ -164,10 +164,10 @@ + + + +- +- +- +- ++ ++ ++ ++ + + + +@@ -226,18 +226,18 @@ + + + +- ++ + +- ++ + first +- ++ + finger up + +- +- +- ++ ++ ++ + +- ++ + IDLE + + +@@ -249,8 +249,8 @@ + + + +- +- ++ ++ + + + +@@ -344,8 +344,6 @@ + + + +- +- + + + +@@ -371,7 +369,7 @@ + + + +- ++ + + + +@@ -558,8 +556,8 @@ + + press + +- +- ++ ++ + + + +@@ -607,15 +605,15 @@ + + TOUCH_TOUCH + +- ++ + +- ++ + TOUCH_IDLE + +- +- +- +- ++ ++ ++ ++ + + + +@@ -631,15 +629,8 @@ + + + +- +- +- +- +- +- +- +- yes +- ++ ++ + + + +@@ -667,27 +658,20 @@ + + + +- ++ + +- ++ + TOUCH_IDLE + +- +- +- ++ ++ ++ + +- ++ + TOUCH_IDLE + +- +- +- +- +- +- TOUCH_IDLE +- +- +- ++ ++ + + + +@@ -736,8 +720,8 @@ + + TOUCH_TOUCH + +- +- ++ ++ + + + +@@ -860,13 +844,6 @@ + + + +- +- +- +- state == +- +- TOUCH_TOUCH +- + + + +@@ -874,13 +851,6 @@ + + TOUCH_TOUCH + +- +- +- +- +- +- no +- + + + +@@ -1197,5 +1167,97 @@ + + + ++ ++ ++ ++ TOUCH_2_RELEASE ++ ++ ++ ++ ++ second ++ ++ finger up ++ ++ ++ ++ ++ ++ ++ timeout ++ ++ ++ ++ ++ ++ ++ move > ++ ++ threshold ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ first ++ ++ finger down ++ ++ ++ ++ ++ ++ ++ ++ ++ TOUCH_IDLE ++ ++ ++ ++ ++ ++ ++ first ++ ++ finger up ++ ++ ++ ++ ++ ++ ++ ++ ++ second ++ ++ finger down ++ ++ ++ ++ ++ ++ ++ TOUCH_DEAD ++ ++ ++ ++ ++ TOUCH_DEAD ++ ++ ++ ++ ++ ++ ++ ++ ++ + + +diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c +index de4945e..753fc6b 100644 +--- a/src/evdev-mt-touchpad-tap.c ++++ b/src/evdev-mt-touchpad-tap.c +@@ -69,6 +69,7 @@ tap_state_to_str(enum tp_tap_state state) + CASE_RETURN_STRING(TAP_STATE_TAPPED); + CASE_RETURN_STRING(TAP_STATE_TOUCH_2); + CASE_RETURN_STRING(TAP_STATE_TOUCH_2_HOLD); ++ CASE_RETURN_STRING(TAP_STATE_TOUCH_2_RELEASE); + CASE_RETURN_STRING(TAP_STATE_TOUCH_3); + CASE_RETURN_STRING(TAP_STATE_TOUCH_3_HOLD); + CASE_RETURN_STRING(TAP_STATE_DRAGGING); +@@ -275,12 +276,8 @@ tp_tap_touch2_handle_event(struct tp_dispatch *tp, + tp_tap_set_timer(tp, time); + break; + case TAP_EVENT_RELEASE: +- tp->tap.state = TAP_STATE_HOLD; +- if (t->tap.state == TAP_TOUCH_STATE_TOUCH) { +- tp_tap_notify(tp, time, 2, LIBINPUT_BUTTON_STATE_PRESSED); +- tp_tap_notify(tp, time, 2, LIBINPUT_BUTTON_STATE_RELEASED); +- } +- tp_tap_clear_timer(tp); ++ tp->tap.state = TAP_STATE_TOUCH_2_RELEASE; ++ tp_tap_set_timer(tp, time); + break; + case TAP_EVENT_MOTION: + tp_tap_clear_timer(tp); +@@ -323,6 +320,35 @@ tp_tap_touch2_hold_handle_event(struct tp_dispatch *tp, + } + + static void ++tp_tap_touch2_release_handle_event(struct tp_dispatch *tp, ++ struct tp_touch *t, ++ enum tap_event event, uint64_t time) ++{ ++ ++ switch (event) { ++ case TAP_EVENT_TOUCH: ++ tp->tap.state = TAP_STATE_TOUCH_2_HOLD; ++ t->tap.state = TAP_TOUCH_STATE_DEAD; ++ tp_tap_clear_timer(tp); ++ break; ++ case TAP_EVENT_RELEASE: ++ tp_tap_notify(tp, time, 2, LIBINPUT_BUTTON_STATE_PRESSED); ++ tp_tap_notify(tp, time, 2, LIBINPUT_BUTTON_STATE_RELEASED); ++ tp->tap.state = TAP_STATE_IDLE; ++ break; ++ case TAP_EVENT_MOTION: ++ case TAP_EVENT_TIMEOUT: ++ tp->tap.state = TAP_STATE_HOLD; ++ break; ++ case TAP_EVENT_BUTTON: ++ tp->tap.state = TAP_STATE_DEAD; ++ break; ++ case TAP_EVENT_THUMB: ++ break; ++ } ++} ++ ++static void + tp_tap_touch3_handle_event(struct tp_dispatch *tp, + struct tp_touch *t, + enum tap_event event, uint64_t time) +@@ -649,6 +675,9 @@ tp_tap_handle_event(struct tp_dispatch *tp, + case TAP_STATE_TOUCH_2_HOLD: + tp_tap_touch2_hold_handle_event(tp, t, event, time); + break; ++ case TAP_STATE_TOUCH_2_RELEASE: ++ tp_tap_touch2_release_handle_event(tp, t, event, time); ++ break; + case TAP_STATE_TOUCH_3: + tp_tap_touch3_handle_event(tp, t, event, time); + break; +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index 5f87c3f..f42fb02 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -97,6 +97,7 @@ enum tp_tap_state { + TAP_STATE_TAPPED, + TAP_STATE_TOUCH_2, + TAP_STATE_TOUCH_2_HOLD, ++ TAP_STATE_TOUCH_2_RELEASE, + TAP_STATE_TOUCH_3, + TAP_STATE_TOUCH_3_HOLD, + TAP_STATE_DRAGGING_OR_DOUBLETAP, +diff --git a/test/touchpad-tap.c b/test/touchpad-tap.c +index 62c7a5c..334d797 100644 +--- a/test/touchpad-tap.c ++++ b/test/touchpad-tap.c +@@ -966,6 +966,50 @@ START_TEST(touchpad_2fg_tap_inverted) + } + END_TEST + ++START_TEST(touchpad_2fg_tap_n_hold_first) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput *li = dev->libinput; ++ ++ litest_enable_tap(dev->libinput_device); ++ ++ litest_drain_events(dev->libinput); ++ ++ litest_touch_down(dev, 0, 50, 50); ++ litest_touch_down(dev, 1, 70, 70); ++ litest_touch_up(dev, 1); ++ ++ libinput_dispatch(li); ++ ++ litest_assert_empty_queue(li); ++ litest_timeout_tap(); ++ ++ litest_assert_empty_queue(li); ++} ++END_TEST ++ ++START_TEST(touchpad_2fg_tap_n_hold_second) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput *li = dev->libinput; ++ ++ litest_enable_tap(dev->libinput_device); ++ ++ litest_drain_events(dev->libinput); ++ ++ litest_touch_down(dev, 0, 50, 50); ++ litest_touch_down(dev, 1, 70, 70); ++ litest_touch_up(dev, 0); ++ ++ libinput_dispatch(li); ++ ++ litest_assert_empty_queue(li); ++ litest_timeout_tap(); ++ ++ litest_assert_empty_queue(li); ++} ++END_TEST ++ + START_TEST(touchpad_2fg_tap_quickrelease) + { + struct litest_device *dev = litest_current_device(); +@@ -1755,6 +1799,8 @@ litest_setup_tests(void) + litest_add("touchpad:tap", touchpad_2fg_tap_n_drag_3fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); + litest_add("touchpad:tap", touchpad_2fg_tap, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_SEMI_MT); + litest_add("touchpad:tap", touchpad_2fg_tap_inverted, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); ++ litest_add("touchpad:tap", touchpad_2fg_tap_n_hold_first, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); ++ litest_add("touchpad:tap", touchpad_2fg_tap_n_hold_second, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); + litest_add("touchpad:tap", touchpad_2fg_tap_quickrelease, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_SEMI_MT); + litest_add("touchpad:tap", touchpad_1fg_tap_click, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_CLICKPAD); + litest_add("touchpad:tap", touchpad_2fg_tap_click, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_SINGLE_TOUCH|LITEST_CLICKPAD); +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index 844d3e7..e0d5ed6 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.0.1 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,6 +21,9 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 +# Bug 1256045 - Libinput regularly interprets two-finger scrolling as right-mouse click +Patch02: 0001-touchpad-don-t-tap-for-2fg-down-followed-by-a-single.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -97,6 +100,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Sep 07 2015 Peter Hutterer 1.0.1-2 +- Don't interpret short scrolls as right click (#1256045) + * Thu Sep 03 2015 Peter Hutterer 1.0.1-1 - libinput 1.0.1 From b73b0969101f2c159c31cee696a6057833e666fe Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 19 Sep 2015 05:00:20 +1000 Subject: [PATCH 050/317] Fix the number of clicks sent in multitap (fdo #92016) --- ...-number-of-button-clicks-in-multitap.patch | 2047 +++++++++++++++++ libinput.spec | 8 +- 2 files changed, 2054 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-fix-the-number-of-button-clicks-in-multitap.patch diff --git a/0001-touchpad-fix-the-number-of-button-clicks-in-multitap.patch b/0001-touchpad-fix-the-number-of-button-clicks-in-multitap.patch new file mode 100644 index 0000000..f6bc209 --- /dev/null +++ b/0001-touchpad-fix-the-number-of-button-clicks-in-multitap.patch @@ -0,0 +1,2047 @@ +From d92ae62dad53afd894aec3c47081780ef3d9b4d2 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 18 Sep 2015 09:14:43 +1000 +Subject: [PATCH libinput] touchpad: fix the number of button clicks in + multitap + +tap-tap-down-move should emit 1 click + press, not 2 clicks + press + +https://bugs.freedesktop.org/show_bug.cgi?id=92016 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + doc/touchpad-tap-state-machine.svg | 1449 +++++++++++++++++------------------- + src/evdev-mt-touchpad-tap.c | 10 - + test/touchpad-tap.c | 10 +- + 3 files changed, 703 insertions(+), 766 deletions(-) + +diff --git a/doc/touchpad-tap-state-machine.svg b/doc/touchpad-tap-state-machine.svg +index 9fee48a..92fdb2b 100644 +--- a/doc/touchpad-tap-state-machine.svg ++++ b/doc/touchpad-tap-state-machine.svg +@@ -1,1112 +1,1058 @@ + + +- ++ + + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ + +- ++ + IDLE + +- ++ + +- ++ + TOUCH + +- ++ + +- ++ + first +- ++ + finger down + +- +- +- ++ ++ ++ + +- ++ + finger up + +- +- +- ++ ++ ++ + +- ++ + button 1 +- ++ + press + +- ++ + +- ++ + timeout + +- +- +- ++ ++ ++ + +- ++ + move > +- ++ + threshold + +- +- +- ++ ++ ++ + +- ++ + second +- ++ + finger down + +- +- +- ++ ++ ++ + +- ++ + TOUCH_2 + +- ++ + +- ++ + second +- ++ + finger up + +- +- +- ++ ++ ++ + +- ++ + button 2 +- ++ + press + +- ++ + +- ++ + move > +- ++ + threshold + +- ++ + +- ++ + timeout + +- +- +- +- +- ++ ++ ++ ++ ++ + +- ++ + button 1 +- ++ + release + +- ++ + +- ++ + button 2 +- ++ + release + +- +- +- +- +- ++ ++ ++ ++ ++ + +- ++ + TAPPED + +- ++ + +- ++ + timeout + +- +- +- ++ ++ ++ + +- ++ + first +- ++ + finger down + +- +- +- ++ ++ ++ + +- ++ + DRAGGING + +- ++ + +- ++ + first +- ++ + finger up + +- ++ + +- ++ + btn1 +- ++ + release + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ + +- ++ + IDLE + +- ++ + +- ++ + third +- ++ + finger down + +- +- +- ++ ++ ++ + +- ++ + TOUCH_3 + +- +- +- ++ ++ ++ + +- ++ + button 3 +- ++ + press + +- ++ + +- ++ + button 3 +- ++ + release + +- +- +- ++ ++ ++ + +- ++ + move > +- ++ + threshold + +- +- +- ++ ++ ++ + +- ++ + IDLE + +- ++ + +- ++ + timeout + +- +- +- ++ ++ ++ + +- ++ + first +- ++ + finger up + +- +- +- ++ ++ ++ + +- ++ + IDLE + +- ++ + +- ++ + fourth +- ++ + finger down + +- +- +- +- +- ++ ++ ++ ++ ++ + +- ++ + DRAGGING_OR_DOUBLETAP + +- +- +- ++ ++ ++ + +- ++ + timeout + +- +- +- ++ ++ ++ + +- ++ + first +- ++ + finger up + +- +- +- ++ ++ ++ + +- ++ + button 1 +- ++ + release + +- ++ + +- ++ + button 1 +- ++ + press + +- ++ + +- ++ + btn1 +- ++ + release + +- +- +- ++ ++ ++ + +- ++ + second +- ++ + finger down + +- +- +- ++ ++ ++ + +- ++ + move > +- ++ + threshold + +- +- +- +- +- ++ ++ ++ ++ ++ + +- ++ + HOLD + +- ++ + +- ++ + first +- ++ + finger up + +- +- +- +- +- ++ ++ ++ ++ ++ + +- ++ + second +- ++ + finger down + +- +- +- +- +- ++ ++ ++ ++ ++ + +- ++ + TOUCH_2_HOLD + +- ++ + +- ++ + second +- ++ + finger up + +- +- +- ++ ++ ++ + +- ++ + first +- ++ + finger up + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ + +- ++ + third +- ++ + finger down + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ + +- ++ + TOUCH_3_HOLD + +- +- +- ++ ++ ++ + +- ++ + fourth +- ++ + finger down + +- ++ + +- ++ + DEAD + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ + +- ++ + any finger up + +- ++ + +- ++ + fourth +- ++ + finger up + +- ++ + +- ++ + any finger up + +- +- +- +- ++ ++ ++ ++ + +- +- ++ ++ + yes + +- ++ + +- ++ + any finger up + +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ + +- ++ + IDLE + +- ++ + +- ++ + if finger +- ++ + count == 0 + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ + +- ++ + second +- ++ + finger up + +- ++ + +- ++ + DRAGGING_2 + +- +- +- +- +- ++ ++ ++ ++ ++ + +- ++ + first +- ++ + finger up + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ + +- ++ + second +- ++ + finger down + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ + +- ++ + third +- ++ + finger down + +- +- +- ++ ++ ++ + +- ++ + btn1 +- ++ + release + +- +- +- ++ ++ ++ + +- ++ + phys +- ++ + button +- ++ + press + +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + +- ++ + phys +- ++ + button +- ++ + press + +- +- +- ++ ++ ++ + +- ++ + button 1 +- ++ + release + +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + +- ++ + DRAGGING_WAIT + +- ++ + +- ++ + timeout + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ + +- ++ + first +- ++ + finger down + +- +- +- ++ ++ ++ + +- ++ + TOUCH_TOUCH + +- ++ + +- ++ + TOUCH_IDLE + +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ + +- ++ + TOUCH_DEAD + +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ + +- ++ + TOUCH_DEAD + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ + +- ++ + TOUCH_IDLE + +- +- +- ++ ++ ++ + +- ++ + TOUCH_TOUCH + +- +- +- +- +- ++ ++ ++ ++ ++ + +- ++ + TOUCH_IDLE + +- +- +- ++ ++ ++ + +- ++ + TOUCH_IDLE + +- +- +- ++ ++ ++ + +- ++ + TOUCH_TOUCH + +- +- +- ++ ++ ++ + +- ++ + that finger +- ++ + TOUCH_IDLE + +- +- +- ++ ++ ++ + +- ++ + TOUCH_DEAD + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ + +- ++ + that finger +- ++ + TOUCH_IDLE + +- +- +- +- ++ ++ ++ ++ + +- +- ++ ++ + no + +- ++ + +- ++ + TOUCH_TOUCH + +- +- +- ++ ++ ++ + +- ++ + TOUCH_IDLE + +- ++ + +- ++ + TOUCH_TOUCH + +- +- +- ++ ++ ++ + +- ++ + TOUCH_DEAD + +- +- +- +- +- ++ ++ ++ ++ ++ + +- ++ + TOUCH_IDLE + +- +- +- ++ ++ ++ + +- ++ + TOUCH_TOUCH + +- ++ + +- ++ + TOUCH_TOUCH + +- +- +- ++ ++ ++ + +- ++ + TOUCH_IDLE + +- +- +- ++ ++ ++ + +- ++ + TOUCH_IDLE + +- +- +- ++ ++ ++ + +- ++ + TOUCH_TOUCH + +- +- +- ++ ++ ++ + +- ++ + TOUCH_IDLE + +- +- +- ++ ++ ++ + +- ++ + TOUCH_TOUCH + +- +- +- ++ ++ ++ + +- ++ + that finger +- ++ + TOUCH_IDLE + +- +- +- ++ ++ ++ + +- ++ + TOUCH_DEAD + +- +- +- ++ ++ ++ + +- ++ + TOUCH_DEAD + +- ++ + +- ++ + TOUCH_DEAD + +- ++ + +- ++ + TOUCH_DEAD + +- +- +- ++ ++ ++ + +- ++ + TOUCH_DEAD + +- +- +- ++ ++ ++ + +- ++ + TOUCH_DEAD + +- +- +- ++ ++ ++ + +- ++ + that finger state == +- ++ + TOUCH_TOUCH + +- ++ + +- ++ + TOUCH_DEAD + +- +- +- ++ ++ ++ + +- ++ + TOUCH_DEAD + +- ++ + +- ++ + TOUCH_DEAD + +- ++ + +- ++ + first +- ++ + finger down + +- ++ + +- ++ + MULTITAP + +- +- +- +- +- ++ ++ ++ ++ ++ + +- ++ + timeout + +- +- +- +- +- ++ ++ ++ ++ ++ + +- ++ + IDLE + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ + +- ++ + MULTITAP_DOWN + +- ++ + +- ++ + button 1 +- ++ + press + +- +- +- +- +- ++ ++ ++ ++ ++ + +- ++ + first +- ++ + finger up + +- +- +- ++ ++ ++ + +- ++ + button 1 +- ++ + release + +- +- +- ++ ++ ++ + +- ++ + timeout + +- ++ + +- ++ + second +- ++ + finger down + +- ++ + +- ++ + move > +- ++ + threshold + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + +- +- button 1 +- +- release +- +- +- +- +- button 1 +- +- press +- +- +- +- +- +- +- +- +- +- +- button 1 +- +- release +- +- +- +- +- button 1 +- +- press +- +- +- +- +- +- +- +- +- +- +- button 1 +- +- release +- +- +- +- +- button 1 +- +- press +- +- +- +- +- +- +- +- +- +- +- +- ++ + TOUCH_TOUCH + +- +- +- ++ ++ ++ + +- ++ + TOUCH_IDLE + +- +- +- ++ ++ ++ + +- ++ + phys +- ++ + button +- ++ + press + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ + +- ++ + DRAGGING_OR_TAP + +- ++ + +- ++ + first +- ++ + finger up + +- +- +- ++ ++ ++ + +- ++ + timeout + +- +- +- +- +- ++ ++ ++ ++ ++ + +- ++ + move > +- ++ + threshold + +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + +- ++ + TOUCH_IDLE + +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ + + +
+@@ -1120,9 +1066,9 @@ + [Not supported by viewer] + + +- +- +- ++ ++ ++ + + +
+@@ -1134,9 +1080,9 @@ + [Not supported by viewer] + + +- +- +- ++ ++ ++ + + +
+@@ -1149,115 +1095,116 @@ + [Not supported by viewer] + + +- ++ + +- ++ + thumb + +- +- +- ++ ++ ++ + +- ++ + TOUCH_DEAD + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ + +- ++ + TOUCH_2_RELEASE + +- ++ + +- ++ + second +- ++ + finger up + +- +- +- ++ ++ ++ + +- ++ + timeout + +- +- +- ++ ++ ++ + +- ++ + move > +- ++ + threshold + +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ + +- ++ + first +- ++ + finger down + +- +- +- +- +- ++ ++ ++ ++ ++ + +- ++ + TOUCH_IDLE + +- +- +- ++ ++ ++ + +- ++ + first +- ++ + finger up + +- +- +- +- +- ++ ++ ++ ++ ++ + +- ++ + second +- ++ + finger down + +- +- +- ++ ++ ++ + +- ++ + TOUCH_DEAD + +- ++ + +- ++ + TOUCH_DEAD + +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ + + ++ +diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c +index 753fc6b..dda528a 100644 +--- a/src/evdev-mt-touchpad-tap.c ++++ b/src/evdev-mt-touchpad-tap.c +@@ -596,21 +596,11 @@ tp_tap_multitap_down_handle_event(struct tp_dispatch *tp, + break; + case TAP_EVENT_TOUCH: + tp->tap.state = TAP_STATE_DRAGGING_2; +- tp_tap_notify(tp, +- tp->tap.multitap_last_time, +- 1, +- LIBINPUT_BUTTON_STATE_RELEASED); +- tp_tap_notify(tp, time, 1, LIBINPUT_BUTTON_STATE_PRESSED); + tp_tap_clear_timer(tp); + break; + case TAP_EVENT_MOTION: + case TAP_EVENT_TIMEOUT: + tp->tap.state = TAP_STATE_DRAGGING; +- tp_tap_notify(tp, +- tp->tap.multitap_last_time, +- 1, +- LIBINPUT_BUTTON_STATE_RELEASED); +- tp_tap_notify(tp, time, 1, LIBINPUT_BUTTON_STATE_PRESSED); + tp_tap_clear_timer(tp); + break; + case TAP_EVENT_BUTTON: +diff --git a/test/touchpad-tap.c b/test/touchpad-tap.c +index 334d797..4450ec3 100644 +--- a/test/touchpad-tap.c ++++ b/test/touchpad-tap.c +@@ -191,7 +191,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_move) + litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10, 4); + libinput_dispatch(li); + +- for (ntaps = 0; ntaps <= range; ntaps++) { ++ for (ntaps = 0; ntaps < range; ntaps++) { + event = libinput_get_event(li); + ptrev = litest_is_button_event(event, + BTN_LEFT, +@@ -261,7 +261,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_2fg) + litest_touch_down(dev, 1, 70, 50); + libinput_dispatch(li); + +- for (ntaps = 0; ntaps <= range; ntaps++) { ++ for (ntaps = 0; ntaps < range; ntaps++) { + event = libinput_get_event(li); + ptrev = litest_is_button_event(event, + BTN_LEFT, +@@ -393,7 +393,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_timeout) + litest_timeout_tap(); + libinput_dispatch(li); + +- for (ntaps = 0; ntaps <= range; ntaps++) { ++ for (ntaps = 0; ntaps < range; ntaps++) { + event = libinput_get_event(li); + ptrev = litest_is_button_event(event, + BTN_LEFT, +@@ -464,7 +464,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_tap) + litest_timeout_tap(); + libinput_dispatch(li); + +- for (ntaps = 0; ntaps <= range; ntaps++) { ++ for (ntaps = 0; ntaps < range; ntaps++) { + event = libinput_get_event(li); + ptrev = litest_is_button_event(event, + BTN_LEFT, +@@ -537,7 +537,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_tap_click) + litest_timeout_tap(); + libinput_dispatch(li); + +- for (ntaps = 0; ntaps <= range; ntaps++) { ++ for (ntaps = 0; ntaps < range; ntaps++) { + event = libinput_get_event(li); + ptrev = litest_is_button_event(event, + BTN_LEFT, +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index e0d5ed6..3ead963 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.0.1 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -24,6 +24,9 @@ Patch01: 0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch # Bug 1256045 - Libinput regularly interprets two-finger scrolling as right-mouse click Patch02: 0001-touchpad-don-t-tap-for-2fg-down-followed-by-a-single.patch +# fdo Bug 92016 - Multi-tap-and-drag sends one too many clicks +Patch03: 0001-touchpad-fix-the-number-of-button-clicks-in-multitap.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -100,6 +103,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Sat Sep 19 2015 Peter Hutterer 1.0.1-3 +- Fix the number of clicks sent in multitap (fdo #92016) + * Mon Sep 07 2015 Peter Hutterer 1.0.1-2 - Don't interpret short scrolls as right click (#1256045) From 11f65b4c027234a259a11c8aa526eeba17f91365 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 21 Oct 2015 15:47:50 +1000 Subject: [PATCH 051/317] libinput 1.0.2 --- .gitignore | 1 + ...ap-for-2fg-down-followed-by-a-single.patch | 594 ----- ...-number-of-button-clicks-in-multitap.patch | 2047 ----------------- libinput.spec | 13 +- sources | 2 +- 5 files changed, 7 insertions(+), 2650 deletions(-) delete mode 100644 0001-touchpad-don-t-tap-for-2fg-down-followed-by-a-single.patch delete mode 100644 0001-touchpad-fix-the-number-of-button-clicks-in-multitap.patch diff --git a/.gitignore b/.gitignore index 5e9fadb..1b55d3a 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /libinput-0.99.1.tar.xz /libinput-1.0.0.tar.xz /libinput-1.0.1.tar.xz +/libinput-1.0.2.tar.xz diff --git a/0001-touchpad-don-t-tap-for-2fg-down-followed-by-a-single.patch b/0001-touchpad-don-t-tap-for-2fg-down-followed-by-a-single.patch deleted file mode 100644 index f515bde..0000000 --- a/0001-touchpad-don-t-tap-for-2fg-down-followed-by-a-single.patch +++ /dev/null @@ -1,594 +0,0 @@ -From 79570fd492691b4ce97360e7775965e5765a702b Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 31 Aug 2015 11:10:58 +1000 -Subject: [PATCH libinput] touchpad: don't tap for 2fg down, followed by a - single finger up - -The following sequence currently generates a right-button event: - finger 1 down - finger 2 down - finger 1 up - finger 2 held down - -This is easily triggered with short scroll events. There are two issues here: -first is that the tapping code elsewhere treats any tap with a second finger -down as a left-button tap, not a right button one. So if anything, we should -generate a left button click here, not a right button click. - -Arguably, generating a button click here is wrong though, it's not a very well -defined sequence and relatively difficult to trigger intentionally. So the -best solution here is to simply ignore the release event and move straight -back to state HOLD - unless the second finger is released within the timeout. -If the finger is set down again during the timeout, we move straight to -TOUCH_2_HOLD - this could eventually be interpreted as a tap, but not for now. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - doc/touchpad-tap-state-machine.svg | 254 +++++++++++++++++++++++-------------- - src/evdev-mt-touchpad-tap.c | 41 +++++- - src/evdev-mt-touchpad.h | 1 + - test/touchpad-tap.c | 46 +++++++ - 4 files changed, 240 insertions(+), 102 deletions(-) - -diff --git a/doc/touchpad-tap-state-machine.svg b/doc/touchpad-tap-state-machine.svg -index b1c5995..9fee48a 100644 ---- a/doc/touchpad-tap-state-machine.svg -+++ b/doc/touchpad-tap-state-machine.svg -@@ -35,11 +35,11 @@ - - - -- -+ - -- -+ - button 1 -- -+ - press - - -@@ -72,20 +72,20 @@ - - TOUCH_2 - -- -+ - -- -+ - second -- -+ - finger up - -- -- -- -+ -+ -+ - -- -+ - button 2 -- -+ - press - - -@@ -104,45 +104,45 @@ - - - -- -+ - -- -+ - button 1 -- -+ - release - -- -+ - -- -+ - button 2 -- -+ - release - -- -- -- -- -- -+ -+ -+ -+ -+ - -- -+ - TAPPED - -- -+ - -- -+ - timeout - -- -- -- -+ -+ -+ - -- -+ - first -- -+ - finger down - -- -- -+ -+ - - - -@@ -164,10 +164,10 @@ - - - -- -- -- -- -+ -+ -+ -+ - - - -@@ -226,18 +226,18 @@ - - - -- -+ - -- -+ - first -- -+ - finger up - -- -- -- -+ -+ -+ - -- -+ - IDLE - - -@@ -249,8 +249,8 @@ - - - -- -- -+ -+ - - - -@@ -344,8 +344,6 @@ - - - -- -- - - - -@@ -371,7 +369,7 @@ - - - -- -+ - - - -@@ -558,8 +556,8 @@ - - press - -- -- -+ -+ - - - -@@ -607,15 +605,15 @@ - - TOUCH_TOUCH - -- -+ - -- -+ - TOUCH_IDLE - -- -- -- -- -+ -+ -+ -+ - - - -@@ -631,15 +629,8 @@ - - - -- -- -- -- -- -- -- -- yes -- -+ -+ - - - -@@ -667,27 +658,20 @@ - - - -- -+ - -- -+ - TOUCH_IDLE - -- -- -- -+ -+ -+ - -- -+ - TOUCH_IDLE - -- -- -- -- -- -- TOUCH_IDLE -- -- -- -+ -+ - - - -@@ -736,8 +720,8 @@ - - TOUCH_TOUCH - -- -- -+ -+ - - - -@@ -860,13 +844,6 @@ - - - -- -- -- -- state == -- -- TOUCH_TOUCH -- - - - -@@ -874,13 +851,6 @@ - - TOUCH_TOUCH - -- -- -- -- -- -- no -- - - - -@@ -1197,5 +1167,97 @@ - - - -+ -+ -+ -+ TOUCH_2_RELEASE -+ -+ -+ -+ -+ second -+ -+ finger up -+ -+ -+ -+ -+ -+ -+ timeout -+ -+ -+ -+ -+ -+ -+ move > -+ -+ threshold -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ first -+ -+ finger down -+ -+ -+ -+ -+ -+ -+ -+ -+ TOUCH_IDLE -+ -+ -+ -+ -+ -+ -+ first -+ -+ finger up -+ -+ -+ -+ -+ -+ -+ -+ -+ second -+ -+ finger down -+ -+ -+ -+ -+ -+ -+ TOUCH_DEAD -+ -+ -+ -+ -+ TOUCH_DEAD -+ -+ -+ -+ -+ -+ -+ -+ -+ - - -diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c -index de4945e..753fc6b 100644 ---- a/src/evdev-mt-touchpad-tap.c -+++ b/src/evdev-mt-touchpad-tap.c -@@ -69,6 +69,7 @@ tap_state_to_str(enum tp_tap_state state) - CASE_RETURN_STRING(TAP_STATE_TAPPED); - CASE_RETURN_STRING(TAP_STATE_TOUCH_2); - CASE_RETURN_STRING(TAP_STATE_TOUCH_2_HOLD); -+ CASE_RETURN_STRING(TAP_STATE_TOUCH_2_RELEASE); - CASE_RETURN_STRING(TAP_STATE_TOUCH_3); - CASE_RETURN_STRING(TAP_STATE_TOUCH_3_HOLD); - CASE_RETURN_STRING(TAP_STATE_DRAGGING); -@@ -275,12 +276,8 @@ tp_tap_touch2_handle_event(struct tp_dispatch *tp, - tp_tap_set_timer(tp, time); - break; - case TAP_EVENT_RELEASE: -- tp->tap.state = TAP_STATE_HOLD; -- if (t->tap.state == TAP_TOUCH_STATE_TOUCH) { -- tp_tap_notify(tp, time, 2, LIBINPUT_BUTTON_STATE_PRESSED); -- tp_tap_notify(tp, time, 2, LIBINPUT_BUTTON_STATE_RELEASED); -- } -- tp_tap_clear_timer(tp); -+ tp->tap.state = TAP_STATE_TOUCH_2_RELEASE; -+ tp_tap_set_timer(tp, time); - break; - case TAP_EVENT_MOTION: - tp_tap_clear_timer(tp); -@@ -323,6 +320,35 @@ tp_tap_touch2_hold_handle_event(struct tp_dispatch *tp, - } - - static void -+tp_tap_touch2_release_handle_event(struct tp_dispatch *tp, -+ struct tp_touch *t, -+ enum tap_event event, uint64_t time) -+{ -+ -+ switch (event) { -+ case TAP_EVENT_TOUCH: -+ tp->tap.state = TAP_STATE_TOUCH_2_HOLD; -+ t->tap.state = TAP_TOUCH_STATE_DEAD; -+ tp_tap_clear_timer(tp); -+ break; -+ case TAP_EVENT_RELEASE: -+ tp_tap_notify(tp, time, 2, LIBINPUT_BUTTON_STATE_PRESSED); -+ tp_tap_notify(tp, time, 2, LIBINPUT_BUTTON_STATE_RELEASED); -+ tp->tap.state = TAP_STATE_IDLE; -+ break; -+ case TAP_EVENT_MOTION: -+ case TAP_EVENT_TIMEOUT: -+ tp->tap.state = TAP_STATE_HOLD; -+ break; -+ case TAP_EVENT_BUTTON: -+ tp->tap.state = TAP_STATE_DEAD; -+ break; -+ case TAP_EVENT_THUMB: -+ break; -+ } -+} -+ -+static void - tp_tap_touch3_handle_event(struct tp_dispatch *tp, - struct tp_touch *t, - enum tap_event event, uint64_t time) -@@ -649,6 +675,9 @@ tp_tap_handle_event(struct tp_dispatch *tp, - case TAP_STATE_TOUCH_2_HOLD: - tp_tap_touch2_hold_handle_event(tp, t, event, time); - break; -+ case TAP_STATE_TOUCH_2_RELEASE: -+ tp_tap_touch2_release_handle_event(tp, t, event, time); -+ break; - case TAP_STATE_TOUCH_3: - tp_tap_touch3_handle_event(tp, t, event, time); - break; -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index 5f87c3f..f42fb02 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -97,6 +97,7 @@ enum tp_tap_state { - TAP_STATE_TAPPED, - TAP_STATE_TOUCH_2, - TAP_STATE_TOUCH_2_HOLD, -+ TAP_STATE_TOUCH_2_RELEASE, - TAP_STATE_TOUCH_3, - TAP_STATE_TOUCH_3_HOLD, - TAP_STATE_DRAGGING_OR_DOUBLETAP, -diff --git a/test/touchpad-tap.c b/test/touchpad-tap.c -index 62c7a5c..334d797 100644 ---- a/test/touchpad-tap.c -+++ b/test/touchpad-tap.c -@@ -966,6 +966,50 @@ START_TEST(touchpad_2fg_tap_inverted) - } - END_TEST - -+START_TEST(touchpad_2fg_tap_n_hold_first) -+{ -+ struct litest_device *dev = litest_current_device(); -+ struct libinput *li = dev->libinput; -+ -+ litest_enable_tap(dev->libinput_device); -+ -+ litest_drain_events(dev->libinput); -+ -+ litest_touch_down(dev, 0, 50, 50); -+ litest_touch_down(dev, 1, 70, 70); -+ litest_touch_up(dev, 1); -+ -+ libinput_dispatch(li); -+ -+ litest_assert_empty_queue(li); -+ litest_timeout_tap(); -+ -+ litest_assert_empty_queue(li); -+} -+END_TEST -+ -+START_TEST(touchpad_2fg_tap_n_hold_second) -+{ -+ struct litest_device *dev = litest_current_device(); -+ struct libinput *li = dev->libinput; -+ -+ litest_enable_tap(dev->libinput_device); -+ -+ litest_drain_events(dev->libinput); -+ -+ litest_touch_down(dev, 0, 50, 50); -+ litest_touch_down(dev, 1, 70, 70); -+ litest_touch_up(dev, 0); -+ -+ libinput_dispatch(li); -+ -+ litest_assert_empty_queue(li); -+ litest_timeout_tap(); -+ -+ litest_assert_empty_queue(li); -+} -+END_TEST -+ - START_TEST(touchpad_2fg_tap_quickrelease) - { - struct litest_device *dev = litest_current_device(); -@@ -1755,6 +1799,8 @@ litest_setup_tests(void) - litest_add("touchpad:tap", touchpad_2fg_tap_n_drag_3fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); - litest_add("touchpad:tap", touchpad_2fg_tap, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_SEMI_MT); - litest_add("touchpad:tap", touchpad_2fg_tap_inverted, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); -+ litest_add("touchpad:tap", touchpad_2fg_tap_n_hold_first, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); -+ litest_add("touchpad:tap", touchpad_2fg_tap_n_hold_second, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); - litest_add("touchpad:tap", touchpad_2fg_tap_quickrelease, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_SEMI_MT); - litest_add("touchpad:tap", touchpad_1fg_tap_click, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_CLICKPAD); - litest_add("touchpad:tap", touchpad_2fg_tap_click, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_SINGLE_TOUCH|LITEST_CLICKPAD); --- -2.4.3 - diff --git a/0001-touchpad-fix-the-number-of-button-clicks-in-multitap.patch b/0001-touchpad-fix-the-number-of-button-clicks-in-multitap.patch deleted file mode 100644 index f6bc209..0000000 --- a/0001-touchpad-fix-the-number-of-button-clicks-in-multitap.patch +++ /dev/null @@ -1,2047 +0,0 @@ -From d92ae62dad53afd894aec3c47081780ef3d9b4d2 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 18 Sep 2015 09:14:43 +1000 -Subject: [PATCH libinput] touchpad: fix the number of button clicks in - multitap - -tap-tap-down-move should emit 1 click + press, not 2 clicks + press - -https://bugs.freedesktop.org/show_bug.cgi?id=92016 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - doc/touchpad-tap-state-machine.svg | 1449 +++++++++++++++++------------------- - src/evdev-mt-touchpad-tap.c | 10 - - test/touchpad-tap.c | 10 +- - 3 files changed, 703 insertions(+), 766 deletions(-) - -diff --git a/doc/touchpad-tap-state-machine.svg b/doc/touchpad-tap-state-machine.svg -index 9fee48a..92fdb2b 100644 ---- a/doc/touchpad-tap-state-machine.svg -+++ b/doc/touchpad-tap-state-machine.svg -@@ -1,1112 +1,1058 @@ - - -- -+ - - -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ - -- -+ - IDLE - -- -+ - -- -+ - TOUCH - -- -+ - -- -+ - first -- -+ - finger down - -- -- -- -+ -+ -+ - -- -+ - finger up - -- -- -- -+ -+ -+ - -- -+ - button 1 -- -+ - press - -- -+ - -- -+ - timeout - -- -- -- -+ -+ -+ - -- -+ - move > -- -+ - threshold - -- -- -- -+ -+ -+ - -- -+ - second -- -+ - finger down - -- -- -- -+ -+ -+ - -- -+ - TOUCH_2 - -- -+ - -- -+ - second -- -+ - finger up - -- -- -- -+ -+ -+ - -- -+ - button 2 -- -+ - press - -- -+ - -- -+ - move > -- -+ - threshold - -- -+ - -- -+ - timeout - -- -- -- -- -- -+ -+ -+ -+ -+ - -- -+ - button 1 -- -+ - release - -- -+ - -- -+ - button 2 -- -+ - release - -- -- -- -- -- -+ -+ -+ -+ -+ - -- -+ - TAPPED - -- -+ - -- -+ - timeout - -- -- -- -+ -+ -+ - -- -+ - first -- -+ - finger down - -- -- -- -+ -+ -+ - -- -+ - DRAGGING - -- -+ - -- -+ - first -- -+ - finger up - -- -+ - -- -+ - btn1 -- -+ - release - -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ - -- -+ - IDLE - -- -+ - -- -+ - third -- -+ - finger down - -- -- -- -+ -+ -+ - -- -+ - TOUCH_3 - -- -- -- -+ -+ -+ - -- -+ - button 3 -- -+ - press - -- -+ - -- -+ - button 3 -- -+ - release - -- -- -- -+ -+ -+ - -- -+ - move > -- -+ - threshold - -- -- -- -+ -+ -+ - -- -+ - IDLE - -- -+ - -- -+ - timeout - -- -- -- -+ -+ -+ - -- -+ - first -- -+ - finger up - -- -- -- -+ -+ -+ - -- -+ - IDLE - -- -+ - -- -+ - fourth -- -+ - finger down - -- -- -- -- -- -+ -+ -+ -+ -+ - -- -+ - DRAGGING_OR_DOUBLETAP - -- -- -- -+ -+ -+ - -- -+ - timeout - -- -- -- -+ -+ -+ - -- -+ - first -- -+ - finger up - -- -- -- -+ -+ -+ - -- -+ - button 1 -- -+ - release - -- -+ - -- -+ - button 1 -- -+ - press - -- -+ - -- -+ - btn1 -- -+ - release - -- -- -- -+ -+ -+ - -- -+ - second -- -+ - finger down - -- -- -- -+ -+ -+ - -- -+ - move > -- -+ - threshold - -- -- -- -- -- -+ -+ -+ -+ -+ - -- -+ - HOLD - -- -+ - -- -+ - first -- -+ - finger up - -- -- -- -- -- -+ -+ -+ -+ -+ - -- -+ - second -- -+ - finger down - -- -- -- -- -- -+ -+ -+ -+ -+ - -- -+ - TOUCH_2_HOLD - -- -+ - -- -+ - second -- -+ - finger up - -- -- -- -+ -+ -+ - -- -+ - first -- -+ - finger up - -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ - -- -+ - third -- -+ - finger down - -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ - -- -+ - TOUCH_3_HOLD - -- -- -- -+ -+ -+ - -- -+ - fourth -- -+ - finger down - -- -+ - -- -+ - DEAD - -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ - -- -+ - any finger up - -- -+ - -- -+ - fourth -- -+ - finger up - -- -+ - -- -+ - any finger up - -- -- -- -- -+ -+ -+ -+ - -- -- -+ -+ - yes - -- -+ - -- -+ - any finger up - -- -- -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ -+ -+ - -- -+ - IDLE - -- -+ - -- -+ - if finger -- -+ - count == 0 - -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ - -- -+ - second -- -+ - finger up - -- -+ - -- -+ - DRAGGING_2 - -- -- -- -- -- -+ -+ -+ -+ -+ - -- -+ - first -- -+ - finger up - -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ - -- -+ - second -- -+ - finger down - -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ - -- -+ - third -- -+ - finger down - -- -- -- -+ -+ -+ - -- -+ - btn1 -- -+ - release - -- -- -- -+ -+ -+ - -- -+ - phys -- -+ - button -- -+ - press - -- -- -- -- -- -- -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - -- -+ - phys -- -+ - button -- -+ - press - -- -- -- -+ -+ -+ - -- -+ - button 1 -- -+ - release - -- -- -- -- -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - -- -+ - DRAGGING_WAIT - -- -+ - -- -+ - timeout - -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ - -- -+ - first -- -+ - finger down - -- -- -- -+ -+ -+ - -- -+ - TOUCH_TOUCH - -- -+ - -- -+ - TOUCH_IDLE - -- -- -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ -+ -+ - -- -+ - TOUCH_DEAD - -- -- -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ -+ -+ - -- -+ - TOUCH_DEAD - -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ - -- -+ - TOUCH_IDLE - -- -- -- -+ -+ -+ - -- -+ - TOUCH_TOUCH - -- -- -- -- -- -+ -+ -+ -+ -+ - -- -+ - TOUCH_IDLE - -- -- -- -+ -+ -+ - -- -+ - TOUCH_IDLE - -- -- -- -+ -+ -+ - -- -+ - TOUCH_TOUCH - -- -- -- -+ -+ -+ - -- -+ - that finger -- -+ - TOUCH_IDLE - -- -- -- -+ -+ -+ - -- -+ - TOUCH_DEAD - -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ - -- -+ - that finger -- -+ - TOUCH_IDLE - -- -- -- -- -+ -+ -+ -+ - -- -- -+ -+ - no - -- -+ - -- -+ - TOUCH_TOUCH - -- -- -- -+ -+ -+ - -- -+ - TOUCH_IDLE - -- -+ - -- -+ - TOUCH_TOUCH - -- -- -- -+ -+ -+ - -- -+ - TOUCH_DEAD - -- -- -- -- -- -+ -+ -+ -+ -+ - -- -+ - TOUCH_IDLE - -- -- -- -+ -+ -+ - -- -+ - TOUCH_TOUCH - -- -+ - -- -+ - TOUCH_TOUCH - -- -- -- -+ -+ -+ - -- -+ - TOUCH_IDLE - -- -- -- -+ -+ -+ - -- -+ - TOUCH_IDLE - -- -- -- -+ -+ -+ - -- -+ - TOUCH_TOUCH - -- -- -- -+ -+ -+ - -- -+ - TOUCH_IDLE - -- -- -- -+ -+ -+ - -- -+ - TOUCH_TOUCH - -- -- -- -+ -+ -+ - -- -+ - that finger -- -+ - TOUCH_IDLE - -- -- -- -+ -+ -+ - -- -+ - TOUCH_DEAD - -- -- -- -+ -+ -+ - -- -+ - TOUCH_DEAD - -- -+ - -- -+ - TOUCH_DEAD - -- -+ - -- -+ - TOUCH_DEAD - -- -- -- -+ -+ -+ - -- -+ - TOUCH_DEAD - -- -- -- -+ -+ -+ - -- -+ - TOUCH_DEAD - -- -- -- -+ -+ -+ - -- -+ - that finger state == -- -+ - TOUCH_TOUCH - -- -+ - -- -+ - TOUCH_DEAD - -- -- -- -+ -+ -+ - -- -+ - TOUCH_DEAD - -- -+ - -- -+ - TOUCH_DEAD - -- -+ - -- -+ - first -- -+ - finger down - -- -+ - -- -+ - MULTITAP - -- -- -- -- -- -+ -+ -+ -+ -+ - -- -+ - timeout - -- -- -- -- -- -+ -+ -+ -+ -+ - -- -+ - IDLE - -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ - -- -+ - MULTITAP_DOWN - -- -+ - -- -+ - button 1 -- -+ - press - -- -- -- -- -- -+ -+ -+ -+ -+ - -- -+ - first -- -+ - finger up - -- -- -- -+ -+ -+ - -- -+ - button 1 -- -+ - release - -- -- -- -+ -+ -+ - -- -+ - timeout - -- -+ - -- -+ - second -- -+ - finger down - -- -+ - -- -+ - move > -- -+ - threshold - -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - -- -- button 1 -- -- release -- -- -- -- -- button 1 -- -- press -- -- -- -- -- -- -- -- -- -- -- button 1 -- -- release -- -- -- -- -- button 1 -- -- press -- -- -- -- -- -- -- -- -- -- -- button 1 -- -- release -- -- -- -- -- button 1 -- -- press -- -- -- -- -- -- -- -- -- -- -- -- -+ - TOUCH_TOUCH - -- -- -- -+ -+ -+ - -- -+ - TOUCH_IDLE - -- -- -- -+ -+ -+ - -- -+ - phys -- -+ - button -- -+ - press - -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ - -- -+ - DRAGGING_OR_TAP - -- -+ - -- -+ - first -- -+ - finger up - -- -- -- -+ -+ -+ - -- -+ - timeout - -- -- -- -- -- -+ -+ -+ -+ -+ - -- -+ - move > -- -+ - threshold - -- -- -- -- -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - -- -+ - TOUCH_IDLE - -- -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ -+ - - -
-@@ -1120,9 +1066,9 @@ - [Not supported by viewer] - - -- -- -- -+ -+ -+ - - -
-@@ -1134,9 +1080,9 @@ - [Not supported by viewer] - - -- -- -- -+ -+ -+ - - -
-@@ -1149,115 +1095,116 @@ - [Not supported by viewer] - - -- -+ - -- -+ - thumb - -- -- -- -+ -+ -+ - -- -+ - TOUCH_DEAD - -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ - -- -+ - TOUCH_2_RELEASE - -- -+ - -- -+ - second -- -+ - finger up - -- -- -- -+ -+ -+ - -- -+ - timeout - -- -- -- -+ -+ -+ - -- -+ - move > -- -+ - threshold - -- -- -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ -+ -+ - -- -+ - first -- -+ - finger down - -- -- -- -- -- -+ -+ -+ -+ -+ - -- -+ - TOUCH_IDLE - -- -- -- -+ -+ -+ - -- -+ - first -- -+ - finger up - -- -- -- -- -- -+ -+ -+ -+ -+ - -- -+ - second -- -+ - finger down - -- -- -- -+ -+ -+ - -- -+ - TOUCH_DEAD - -- -+ - -- -+ - TOUCH_DEAD - -- -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ -+ - - -+ -diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c -index 753fc6b..dda528a 100644 ---- a/src/evdev-mt-touchpad-tap.c -+++ b/src/evdev-mt-touchpad-tap.c -@@ -596,21 +596,11 @@ tp_tap_multitap_down_handle_event(struct tp_dispatch *tp, - break; - case TAP_EVENT_TOUCH: - tp->tap.state = TAP_STATE_DRAGGING_2; -- tp_tap_notify(tp, -- tp->tap.multitap_last_time, -- 1, -- LIBINPUT_BUTTON_STATE_RELEASED); -- tp_tap_notify(tp, time, 1, LIBINPUT_BUTTON_STATE_PRESSED); - tp_tap_clear_timer(tp); - break; - case TAP_EVENT_MOTION: - case TAP_EVENT_TIMEOUT: - tp->tap.state = TAP_STATE_DRAGGING; -- tp_tap_notify(tp, -- tp->tap.multitap_last_time, -- 1, -- LIBINPUT_BUTTON_STATE_RELEASED); -- tp_tap_notify(tp, time, 1, LIBINPUT_BUTTON_STATE_PRESSED); - tp_tap_clear_timer(tp); - break; - case TAP_EVENT_BUTTON: -diff --git a/test/touchpad-tap.c b/test/touchpad-tap.c -index 334d797..4450ec3 100644 ---- a/test/touchpad-tap.c -+++ b/test/touchpad-tap.c -@@ -191,7 +191,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_move) - litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10, 4); - libinput_dispatch(li); - -- for (ntaps = 0; ntaps <= range; ntaps++) { -+ for (ntaps = 0; ntaps < range; ntaps++) { - event = libinput_get_event(li); - ptrev = litest_is_button_event(event, - BTN_LEFT, -@@ -261,7 +261,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_2fg) - litest_touch_down(dev, 1, 70, 50); - libinput_dispatch(li); - -- for (ntaps = 0; ntaps <= range; ntaps++) { -+ for (ntaps = 0; ntaps < range; ntaps++) { - event = libinput_get_event(li); - ptrev = litest_is_button_event(event, - BTN_LEFT, -@@ -393,7 +393,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_timeout) - litest_timeout_tap(); - libinput_dispatch(li); - -- for (ntaps = 0; ntaps <= range; ntaps++) { -+ for (ntaps = 0; ntaps < range; ntaps++) { - event = libinput_get_event(li); - ptrev = litest_is_button_event(event, - BTN_LEFT, -@@ -464,7 +464,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_tap) - litest_timeout_tap(); - libinput_dispatch(li); - -- for (ntaps = 0; ntaps <= range; ntaps++) { -+ for (ntaps = 0; ntaps < range; ntaps++) { - event = libinput_get_event(li); - ptrev = litest_is_button_event(event, - BTN_LEFT, -@@ -537,7 +537,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_tap_click) - litest_timeout_tap(); - libinput_dispatch(li); - -- for (ntaps = 0; ntaps <= range; ntaps++) { -+ for (ntaps = 0; ntaps < range; ntaps++) { - event = libinput_get_event(li); - ptrev = litest_is_button_event(event, - BTN_LEFT, --- -2.4.3 - diff --git a/libinput.spec b/libinput.spec index 3ead963..37446cf 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.0.1 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.0.2 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,12 +21,6 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 -# Bug 1256045 - Libinput regularly interprets two-finger scrolling as right-mouse click -Patch02: 0001-touchpad-don-t-tap-for-2fg-down-followed-by-a-single.patch - -# fdo Bug 92016 - Multi-tap-and-drag sends one too many clicks -Patch03: 0001-touchpad-fix-the-number-of-button-clicks-in-multitap.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -103,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Oct 21 2015 Peter Hutterer 1.0.2-1 +- libinput 1.0.2 + * Sat Sep 19 2015 Peter Hutterer 1.0.1-3 - Fix the number of clicks sent in multitap (fdo #92016) diff --git a/sources b/sources index c79af99..c4378ec 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f390e592aa09f77dabceabeb2ddd4419 libinput-1.0.1.tar.xz +ec3690c1770ec411192d4b43e73974f5 libinput-1.0.2.tar.xz From 239559a7c583e3d627a3d74a3f5cce60ae9269ac Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 26 Oct 2015 12:13:51 +1000 Subject: [PATCH 052/317] libinput 1.1.0 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1b55d3a..5350aff 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /libinput-1.0.0.tar.xz /libinput-1.0.1.tar.xz /libinput-1.0.2.tar.xz +/libinput-1.1.0.tar.xz diff --git a/libinput.spec b/libinput.spec index 37446cf..4dd9ae0 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.0.2 +Version: 1.1.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Oct 26 2015 Peter Hutterer 1.1.0-1 +- libinput 1.1.0 + * Wed Oct 21 2015 Peter Hutterer 1.0.2-1 - libinput 1.0.2 diff --git a/sources b/sources index c4378ec..70da655 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ec3690c1770ec411192d4b43e73974f5 libinput-1.0.2.tar.xz +3610c80555f4cb13fe61d4c04511e060 libinput-1.1.0.tar.xz From a328b6006a12bd0e0c940c071294453899c1cc83 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 28 Oct 2015 10:27:31 +1000 Subject: [PATCH 053/317] Fix crash triggered by Asus RoG Gladius mouse (#1275407) --- 0001-evdev-whitespace-fix.patch | 26 ++ ...for-missing-pointer-accel-on-relativ.patch | 45 ++ ...le-motion-events-if-the-device-isn-t.patch | 30 ++ ...er-acceleration-for-any-device-with-.patch | 60 +++ 0005-test-add-Asus-RoG-Gladius-mouse.patch | 406 ++++++++++++++++++ libinput.spec | 11 +- 6 files changed, 577 insertions(+), 1 deletion(-) create mode 100644 0001-evdev-whitespace-fix.patch create mode 100644 0002-evdev-log-a-bug-for-missing-pointer-accel-on-relativ.patch create mode 100644 0003-evdev-don-t-handle-motion-events-if-the-device-isn-t.patch create mode 100644 0004-evdev-init-pointer-acceleration-for-any-device-with-.patch create mode 100644 0005-test-add-Asus-RoG-Gladius-mouse.patch diff --git a/0001-evdev-whitespace-fix.patch b/0001-evdev-whitespace-fix.patch new file mode 100644 index 0000000..8004ce2 --- /dev/null +++ b/0001-evdev-whitespace-fix.patch @@ -0,0 +1,26 @@ +From f012d78de4577e9c1b55a63033825d3b13c5d696 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 28 Oct 2015 09:18:18 +1000 +Subject: [PATCH libinput 1/5] evdev: whitespace fix + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/evdev.c b/src/evdev.c +index aef0456..45c1b1b 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -297,7 +297,7 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time) + + /* Use unaccelerated deltas for pointing stick scroll */ + if (evdev_post_trackpoint_scroll(device, unaccel, time)) +- break; ++ break; + + /* Apply pointer acceleration. */ + accel = filter_dispatch(device->pointer.filter, +-- +2.4.3 + diff --git a/0002-evdev-log-a-bug-for-missing-pointer-accel-on-relativ.patch b/0002-evdev-log-a-bug-for-missing-pointer-accel-on-relativ.patch new file mode 100644 index 0000000..fd08139 --- /dev/null +++ b/0002-evdev-log-a-bug-for-missing-pointer-accel-on-relativ.patch @@ -0,0 +1,45 @@ +From 5d961f282df3296f9b8f1126a196bc163f6ba011 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 28 Oct 2015 09:20:33 +1000 +Subject: [PATCH libinput 2/5] evdev: log a bug for missing pointer accel on + relative events + +And use the unaccelerated motion events. Better than crashing, and better than +a non-moving mouse. + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index 45c1b1b..4c947d6 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -299,11 +299,18 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time) + if (evdev_post_trackpoint_scroll(device, unaccel, time)) + break; + +- /* Apply pointer acceleration. */ +- accel = filter_dispatch(device->pointer.filter, +- &unaccel, +- device, +- time); ++ if (device->pointer.filter) { ++ /* Apply pointer acceleration. */ ++ accel = filter_dispatch(device->pointer.filter, ++ &unaccel, ++ device, ++ time); ++ } else { ++ log_bug_libinput(libinput, ++ "%s: accel filter missing\n", ++ udev_device_get_devnode(device->udev_device)); ++ accel = unaccel; ++ } + + if (normalized_is_zero(accel) && normalized_is_zero(unaccel)) + break; +-- +2.4.3 + diff --git a/0003-evdev-don-t-handle-motion-events-if-the-device-isn-t.patch b/0003-evdev-don-t-handle-motion-events-if-the-device-isn-t.patch new file mode 100644 index 0000000..410571a --- /dev/null +++ b/0003-evdev-don-t-handle-motion-events-if-the-device-isn-t.patch @@ -0,0 +1,30 @@ +From 48f1c63007c416c03363d27f4956e50b6e1c32b0 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 28 Oct 2015 09:05:37 +1000 +Subject: [PATCH libinput 3/5] evdev: don't handle motion events if the device + isn't a pointer device + +This check is already in place for all other event types. + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/evdev.c b/src/evdev.c +index 4c947d6..ba1b568 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -289,6 +289,9 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time) + case EVDEV_NONE: + return; + case EVDEV_RELATIVE_MOTION: ++ if (!(device->seat_caps & EVDEV_DEVICE_POINTER)) ++ break; ++ + normalize_delta(device, &device->rel, &unaccel); + raw.x = device->rel.x; + raw.y = device->rel.y; +-- +2.4.3 + diff --git a/0004-evdev-init-pointer-acceleration-for-any-device-with-.patch b/0004-evdev-init-pointer-acceleration-for-any-device-with-.patch new file mode 100644 index 0000000..9ce14ca --- /dev/null +++ b/0004-evdev-init-pointer-acceleration-for-any-device-with-.patch @@ -0,0 +1,60 @@ +From 64ec0dc79619c1d9cdd772abfdbcb87b6b94d71f Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 28 Oct 2015 09:13:24 +1000 +Subject: [PATCH libinput 4/5] evdev: init pointer acceleration for any device + with pointer cap and rel x/y + +The Asus RoG Gladius exposes two event nodes, one mouse, one keyboard. The +keyboard node has REL_X/Y and REL_HWHEEL on top of the various key bits and +ABS_VOLUME. + +The keyboard node does not have BTN_* set, udev tags this device as a +keyboard only, not as a pointer but we still initialize the pointer caps for +it because of the wheel. + +When moving this mouse, the deltas are sent through the keyboard node, causing +a crash because we never initialized pointer acceleration. + +https://bugzilla.redhat.com/show_bug.cgi?id=1275407 + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index ba1b568..ec3abc6 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -2062,11 +2062,6 @@ evdev_configure_device(struct evdev_device *device) + evdev_tag_trackpoint(device, device->udev_device); + device->dpi = evdev_read_dpi_prop(device); + +- if (libevdev_has_event_code(evdev, EV_REL, REL_X) && +- libevdev_has_event_code(evdev, EV_REL, REL_Y) && +- evdev_init_accel(device, LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE) == -1) +- return -1; +- + device->seat_caps |= EVDEV_DEVICE_POINTER; + + log_info(libinput, +@@ -2104,6 +2099,16 @@ evdev_configure_device(struct evdev_device *device) + device->devname, devnode); + } + ++ if (device->seat_caps & EVDEV_DEVICE_POINTER && ++ libevdev_has_event_code(evdev, EV_REL, REL_X) && ++ libevdev_has_event_code(evdev, EV_REL, REL_Y) && ++ evdev_init_accel(device, LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE) == -1) { ++ log_error(libinput, ++ "failed to initialize pointer acceleration for %s\n", ++ device->devname); ++ return -1; ++ } ++ + return 0; + } + +-- +2.4.3 + diff --git a/0005-test-add-Asus-RoG-Gladius-mouse.patch b/0005-test-add-Asus-RoG-Gladius-mouse.patch new file mode 100644 index 0000000..b56a543 --- /dev/null +++ b/0005-test-add-Asus-RoG-Gladius-mouse.patch @@ -0,0 +1,406 @@ +From 1e30238c569d95530f13e4289d55570830f631eb Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 28 Oct 2015 09:55:01 +1000 +Subject: [PATCH libinput 5/5] test: add Asus RoG Gladius mouse + +This device has the usual mouse and keyboard event nodes that most gaming mice +have. Relative events are sent through the keyboard node, not the mouse +node - and that node doesn't have any buttons and isn't tagged as pointer +device by udev. + +Signed-off-by: Peter Hutterer +--- + test/Makefile.am | 1 + + test/litest-device-asus-rog-gladius.c | 334 ++++++++++++++++++++++++++++++++++ + test/litest.c | 2 + + test/litest.h | 1 + + 4 files changed, 338 insertions(+) + create mode 100644 test/litest-device-asus-rog-gladius.c + +diff --git a/test/Makefile.am b/test/Makefile.am +index cde93b3..ff1acda 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -15,6 +15,7 @@ liblitest_la_SOURCES = \ + litest-int.h \ + litest-device-alps-semi-mt.c \ + litest-device-alps-dualpoint.c \ ++ litest-device-asus-rog-gladius.c \ + litest-device-atmel-hover.c \ + litest-device-bcm5974.c \ + litest-device-elantech-touchpad.c \ +diff --git a/test/litest-device-asus-rog-gladius.c b/test/litest-device-asus-rog-gladius.c +new file mode 100644 +index 0000000..a44396f +--- /dev/null ++++ b/test/litest-device-asus-rog-gladius.c +@@ -0,0 +1,334 @@ ++/* ++ * Copyright © 2015 Red Hat, Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the next ++ * paragraph) shall be included in all copies or substantial portions of the ++ * Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ++ * DEALINGS IN THE SOFTWARE. ++ */ ++ ++#if HAVE_CONFIG_H ++#include "config.h" ++#endif ++ ++#include "litest.h" ++#include "litest-int.h" ++ ++/* Note: this is the second event node of this mouse only, the first event ++ * node is just a normal mouse */ ++ ++static void litest_mouse_gladius_setup(void) ++{ ++ struct litest_device *d = litest_create_device(LITEST_MOUSE_GLADIUS); ++ litest_set_current_device(d); ++} ++ ++static struct input_id input_id = { ++ .bustype = 0x3, ++ .vendor = 0x0b05, ++ .product = 0x181a, ++}; ++ ++static int events[] = { ++ EV_REL, REL_X, ++ EV_REL, REL_Y, ++ EV_REL, REL_HWHEEL, ++ EV_KEY, KEY_ESC, ++ EV_KEY, KEY_1, ++ EV_KEY, KEY_2, ++ EV_KEY, KEY_3, ++ EV_KEY, KEY_4, ++ EV_KEY, KEY_5, ++ EV_KEY, KEY_6, ++ EV_KEY, KEY_7, ++ EV_KEY, KEY_8, ++ EV_KEY, KEY_9, ++ EV_KEY, KEY_0, ++ EV_KEY, KEY_MINUS, ++ EV_KEY, KEY_EQUAL, ++ EV_KEY, KEY_BACKSPACE, ++ EV_KEY, KEY_TAB, ++ EV_KEY, KEY_Q, ++ EV_KEY, KEY_W, ++ EV_KEY, KEY_E, ++ EV_KEY, KEY_R, ++ EV_KEY, KEY_T, ++ EV_KEY, KEY_Y, ++ EV_KEY, KEY_U, ++ EV_KEY, KEY_I, ++ EV_KEY, KEY_O, ++ EV_KEY, KEY_P, ++ EV_KEY, KEY_LEFTBRACE, ++ EV_KEY, KEY_RIGHTBRACE, ++ EV_KEY, KEY_ENTER, ++ EV_KEY, KEY_LEFTCTRL, ++ EV_KEY, KEY_A, ++ EV_KEY, KEY_S, ++ EV_KEY, KEY_D, ++ EV_KEY, KEY_F, ++ EV_KEY, KEY_G, ++ EV_KEY, KEY_H, ++ EV_KEY, KEY_J, ++ EV_KEY, KEY_K, ++ EV_KEY, KEY_L, ++ EV_KEY, KEY_SEMICOLON, ++ EV_KEY, KEY_APOSTROPHE, ++ EV_KEY, KEY_GRAVE, ++ EV_KEY, KEY_LEFTSHIFT, ++ EV_KEY, KEY_BACKSLASH, ++ EV_KEY, KEY_Z, ++ EV_KEY, KEY_X, ++ EV_KEY, KEY_C, ++ EV_KEY, KEY_V, ++ EV_KEY, KEY_B, ++ EV_KEY, KEY_N, ++ EV_KEY, KEY_M, ++ EV_KEY, KEY_COMMA, ++ EV_KEY, KEY_DOT, ++ EV_KEY, KEY_SLASH, ++ EV_KEY, KEY_RIGHTSHIFT, ++ EV_KEY, KEY_KPASTERISK, ++ EV_KEY, KEY_LEFTALT, ++ EV_KEY, KEY_SPACE, ++ EV_KEY, KEY_CAPSLOCK, ++ EV_KEY, KEY_F1, ++ EV_KEY, KEY_F2, ++ EV_KEY, KEY_F3, ++ EV_KEY, KEY_F4, ++ EV_KEY, KEY_F5, ++ EV_KEY, KEY_F6, ++ EV_KEY, KEY_F7, ++ EV_KEY, KEY_F8, ++ EV_KEY, KEY_F9, ++ EV_KEY, KEY_F10, ++ EV_KEY, KEY_NUMLOCK, ++ EV_KEY, KEY_SCROLLLOCK, ++ EV_KEY, KEY_KP7, ++ EV_KEY, KEY_KP8, ++ EV_KEY, KEY_KP9, ++ EV_KEY, KEY_KPMINUS, ++ EV_KEY, KEY_KP4, ++ EV_KEY, KEY_KP5, ++ EV_KEY, KEY_KP6, ++ EV_KEY, KEY_KPPLUS, ++ EV_KEY, KEY_KP1, ++ EV_KEY, KEY_KP2, ++ EV_KEY, KEY_KP3, ++ EV_KEY, KEY_KP0, ++ EV_KEY, KEY_KPDOT, ++ EV_KEY, KEY_ZENKAKUHANKAKU, ++ EV_KEY, KEY_102ND, ++ EV_KEY, KEY_F11, ++ EV_KEY, KEY_F12, ++ EV_KEY, KEY_RO, ++ EV_KEY, KEY_KATAKANA, ++ EV_KEY, KEY_HIRAGANA, ++ EV_KEY, KEY_HENKAN, ++ EV_KEY, KEY_KATAKANAHIRAGANA, ++ EV_KEY, KEY_MUHENKAN, ++ EV_KEY, KEY_KPJPCOMMA, ++ EV_KEY, KEY_KPENTER, ++ EV_KEY, KEY_RIGHTCTRL, ++ EV_KEY, KEY_KPSLASH, ++ EV_KEY, KEY_SYSRQ, ++ EV_KEY, KEY_RIGHTALT, ++ EV_KEY, KEY_HOME, ++ EV_KEY, KEY_UP, ++ EV_KEY, KEY_PAGEUP, ++ EV_KEY, KEY_LEFT, ++ EV_KEY, KEY_RIGHT, ++ EV_KEY, KEY_END, ++ EV_KEY, KEY_DOWN, ++ EV_KEY, KEY_PAGEDOWN, ++ EV_KEY, KEY_INSERT, ++ EV_KEY, KEY_DELETE, ++ EV_KEY, KEY_MUTE, ++ EV_KEY, KEY_VOLUMEDOWN, ++ EV_KEY, KEY_VOLUMEUP, ++ EV_KEY, KEY_POWER, ++ EV_KEY, KEY_KPEQUAL, ++ EV_KEY, KEY_PAUSE, ++ EV_KEY, KEY_KPCOMMA, ++ EV_KEY, KEY_HANGEUL, ++ EV_KEY, KEY_HANJA, ++ EV_KEY, KEY_YEN, ++ EV_KEY, KEY_LEFTMETA, ++ EV_KEY, KEY_RIGHTMETA, ++ EV_KEY, KEY_COMPOSE, ++ EV_KEY, KEY_STOP, ++ EV_KEY, KEY_AGAIN, ++ EV_KEY, KEY_PROPS, ++ EV_KEY, KEY_UNDO, ++ EV_KEY, KEY_FRONT, ++ EV_KEY, KEY_COPY, ++ EV_KEY, KEY_OPEN, ++ EV_KEY, KEY_PASTE, ++ EV_KEY, KEY_FIND, ++ EV_KEY, KEY_CUT, ++ EV_KEY, KEY_HELP, ++ EV_KEY, KEY_MENU, ++ EV_KEY, KEY_CALC, ++ EV_KEY, KEY_SLEEP, ++ EV_KEY, KEY_FILE, ++ EV_KEY, KEY_WWW, ++ EV_KEY, KEY_COFFEE, ++ EV_KEY, KEY_MAIL, ++ EV_KEY, KEY_BOOKMARKS, ++ EV_KEY, KEY_BACK, ++ EV_KEY, KEY_FORWARD, ++ EV_KEY, KEY_EJECTCD, ++ EV_KEY, KEY_NEXTSONG, ++ EV_KEY, KEY_PLAYPAUSE, ++ EV_KEY, KEY_PREVIOUSSONG, ++ EV_KEY, KEY_STOPCD, ++ EV_KEY, KEY_RECORD, ++ EV_KEY, KEY_REWIND, ++ EV_KEY, KEY_PHONE, ++ EV_KEY, KEY_CONFIG, ++ EV_KEY, KEY_HOMEPAGE, ++ EV_KEY, KEY_REFRESH, ++ EV_KEY, KEY_EXIT, ++ EV_KEY, KEY_EDIT, ++ EV_KEY, KEY_SCROLLUP, ++ EV_KEY, KEY_SCROLLDOWN, ++ EV_KEY, KEY_KPLEFTPAREN, ++ EV_KEY, KEY_KPRIGHTPAREN, ++ EV_KEY, KEY_NEW, ++ EV_KEY, KEY_REDO, ++ EV_KEY, KEY_F13, ++ EV_KEY, KEY_F14, ++ EV_KEY, KEY_F15, ++ EV_KEY, KEY_F16, ++ EV_KEY, KEY_F17, ++ EV_KEY, KEY_F18, ++ EV_KEY, KEY_F19, ++ EV_KEY, KEY_F20, ++ EV_KEY, KEY_F21, ++ EV_KEY, KEY_F22, ++ EV_KEY, KEY_F23, ++ EV_KEY, KEY_F24, ++ EV_KEY, KEY_CLOSE, ++ EV_KEY, KEY_PLAY, ++ EV_KEY, KEY_FASTFORWARD, ++ EV_KEY, KEY_BASSBOOST, ++ EV_KEY, KEY_PRINT, ++ EV_KEY, KEY_CAMERA, ++ EV_KEY, KEY_CHAT, ++ EV_KEY, KEY_SEARCH, ++ EV_KEY, KEY_FINANCE, ++ EV_KEY, KEY_CANCEL, ++ EV_KEY, KEY_BRIGHTNESSDOWN, ++ EV_KEY, KEY_BRIGHTNESSUP, ++ EV_KEY, KEY_KBDILLUMTOGGLE, ++ EV_KEY, KEY_SEND, ++ EV_KEY, KEY_REPLY, ++ EV_KEY, KEY_FORWARDMAIL, ++ EV_KEY, KEY_SAVE, ++ EV_KEY, KEY_DOCUMENTS, ++ EV_KEY, KEY_UNKNOWN, ++ EV_KEY, KEY_VIDEO_NEXT, ++ EV_KEY, KEY_BRIGHTNESS_AUTO, ++ EV_KEY, BTN_0, ++ EV_KEY, KEY_SELECT, ++ EV_KEY, KEY_GOTO, ++ EV_KEY, KEY_INFO, ++ EV_KEY, KEY_PROGRAM, ++ EV_KEY, KEY_PVR, ++ EV_KEY, KEY_SUBTITLE, ++ EV_KEY, KEY_ZOOM, ++ EV_KEY, KEY_KEYBOARD, ++ EV_KEY, KEY_PC, ++ EV_KEY, KEY_TV, ++ EV_KEY, KEY_TV2, ++ EV_KEY, KEY_VCR, ++ EV_KEY, KEY_VCR2, ++ EV_KEY, KEY_SAT, ++ EV_KEY, KEY_CD, ++ EV_KEY, KEY_TAPE, ++ EV_KEY, KEY_TUNER, ++ EV_KEY, KEY_PLAYER, ++ EV_KEY, KEY_DVD, ++ EV_KEY, KEY_AUDIO, ++ EV_KEY, KEY_VIDEO, ++ EV_KEY, KEY_MEMO, ++ EV_KEY, KEY_CALENDAR, ++ EV_KEY, KEY_RED, ++ EV_KEY, KEY_GREEN, ++ EV_KEY, KEY_YELLOW, ++ EV_KEY, KEY_BLUE, ++ EV_KEY, KEY_CHANNELUP, ++ EV_KEY, KEY_CHANNELDOWN, ++ EV_KEY, KEY_LAST, ++ EV_KEY, KEY_NEXT, ++ EV_KEY, KEY_RESTART, ++ EV_KEY, KEY_SLOW, ++ EV_KEY, KEY_SHUFFLE, ++ EV_KEY, KEY_PREVIOUS, ++ EV_KEY, KEY_VIDEOPHONE, ++ EV_KEY, KEY_GAMES, ++ EV_KEY, KEY_ZOOMIN, ++ EV_KEY, KEY_ZOOMOUT, ++ EV_KEY, KEY_ZOOMRESET, ++ EV_KEY, KEY_WORDPROCESSOR, ++ EV_KEY, KEY_EDITOR, ++ EV_KEY, KEY_SPREADSHEET, ++ EV_KEY, KEY_GRAPHICSEDITOR, ++ EV_KEY, KEY_PRESENTATION, ++ EV_KEY, KEY_DATABASE, ++ EV_KEY, KEY_NEWS, ++ EV_KEY, KEY_VOICEMAIL, ++ EV_KEY, KEY_ADDRESSBOOK, ++ EV_KEY, KEY_MESSENGER, ++ EV_KEY, KEY_DISPLAYTOGGLE, ++ EV_KEY, KEY_SPELLCHECK, ++ EV_KEY, KEY_LOGOFF, ++ EV_KEY, KEY_MEDIA_REPEAT, ++ EV_KEY, KEY_IMAGES, ++ EV_KEY, KEY_BUTTONCONFIG, ++ EV_KEY, KEY_TASKMANAGER, ++ EV_KEY, KEY_JOURNAL, ++ EV_KEY, KEY_CONTROLPANEL, ++ EV_KEY, KEY_APPSELECT, ++ EV_KEY, KEY_SCREENSAVER, ++ EV_KEY, KEY_VOICECOMMAND, ++ EV_KEY, KEY_BRIGHTNESS_MIN, ++ EV_KEY, KEY_BRIGHTNESS_MAX, ++ EV_LED, LED_NUML, ++ EV_LED, LED_CAPSL, ++ EV_LED, LED_SCROLLL, ++ EV_LED, LED_COMPOSE, ++ EV_LED, LED_KANA, ++ -1 , -1, ++}; ++ ++static struct input_absinfo absinfo[] = { ++ { ABS_VOLUME, 0, 668, 0, 0, 0 }, ++ { .value = -1 } ++}; ++ ++struct litest_test_device litest_mouse_gladius_device = { ++ .type = LITEST_MOUSE_GLADIUS, ++ .features = LITEST_RELATIVE | LITEST_WHEEL | LITEST_KEYS, ++ .shortname = "mouse_gladius", ++ .setup = litest_mouse_gladius_setup, ++ .interface = NULL, ++ ++ .name = "ASUS ROG GLADIUS", ++ .id = &input_id, ++ .absinfo = absinfo, ++ .events = events, ++}; +diff --git a/test/litest.c b/test/litest.c +index bfa28f4..c7cb274 100644 +--- a/test/litest.c ++++ b/test/litest.c +@@ -365,6 +365,7 @@ extern struct litest_test_device litest_generic_multitouch_screen_device; + extern struct litest_test_device litest_nexus4_device; + extern struct litest_test_device litest_magicpad_device; + extern struct litest_test_device litest_elantech_touchpad_device; ++extern struct litest_test_device litest_mouse_gladius_device; + + struct litest_test_device* devices[] = { + &litest_synaptics_clickpad_device, +@@ -396,6 +397,7 @@ struct litest_test_device* devices[] = { + &litest_nexus4_device, + &litest_magicpad_device, + &litest_elantech_touchpad_device, ++ &litest_mouse_gladius_device, + NULL, + }; + +diff --git a/test/litest.h b/test/litest.h +index 8a4b33d..058057e 100644 +--- a/test/litest.h ++++ b/test/litest.h +@@ -142,6 +142,7 @@ enum litest_device_type { + LITEST_NEXUS4_TOUCH_SCREEN = -28, + LITEST_MAGIC_TRACKPAD = -29, + LITEST_ELANTECH_TOUCHPAD = -30, ++ LITEST_MOUSE_GLADIUS = -31, + }; + + enum litest_device_feature { +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index 4dd9ae0..075a90c 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.1.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,6 +21,12 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 +Patch02: 0001-evdev-whitespace-fix.patch +Patch03: 0002-evdev-log-a-bug-for-missing-pointer-accel-on-relativ.patch +Patch04: 0003-evdev-don-t-handle-motion-events-if-the-device-isn-t.patch +Patch05: 0004-evdev-init-pointer-acceleration-for-any-device-with-.patch +Patch06: 0005-test-add-Asus-RoG-Gladius-mouse.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -97,6 +103,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Oct 28 2015 Peter Hutterer 1.1.0-2 +- Fix crash triggered by Asus RoG Gladius mouse (#1275407) + * Mon Oct 26 2015 Peter Hutterer 1.1.0-1 - libinput 1.1.0 From a3190ae7941107373a983c7c779a7c5583f6d89d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 2 Nov 2015 11:22:32 +1000 Subject: [PATCH 054/317] Fix invalid device group pointer, causing invalid memory access --- ...ice_group_find_group-to-return-NULL-.patch | 31 +++++++++++++++++++ libinput.spec | 6 +++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-libinput_device_group_find_group-to-return-NULL-.patch diff --git a/0001-Fix-libinput_device_group_find_group-to-return-NULL-.patch b/0001-Fix-libinput_device_group_find_group-to-return-NULL-.patch new file mode 100644 index 0000000..26f385e --- /dev/null +++ b/0001-Fix-libinput_device_group_find_group-to-return-NULL-.patch @@ -0,0 +1,31 @@ +From 9949d4ee0859ef8361afc00363a941ff3d133d88 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 2 Nov 2015 08:46:25 +1000 +Subject: [PATCH libinput] Fix libinput_device_group_find_group() to return + NULL on failure + +struct list isn't a null-terminated list, list_for_each() causes 'g' to be set +to the list head at the end of the loop. Returning that as group caused random +memory to be overwritten. + +Signed-off-by: Peter Hutterer +--- + src/libinput.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libinput.c b/src/libinput.c +index f5c75b0..24f2b69 100644 +--- a/src/libinput.c ++++ b/src/libinput.c +@@ -2011,7 +2011,7 @@ libinput_device_group_find_group(struct libinput *libinput, + } + } + +- return g; ++ return NULL; + } + + void +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index 075a90c..5cb8eb3 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.1.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -26,6 +26,7 @@ Patch03: 0002-evdev-log-a-bug-for-missing-pointer-accel-on-relativ.patch Patch04: 0003-evdev-don-t-handle-motion-events-if-the-device-isn-t.patch Patch05: 0004-evdev-init-pointer-acceleration-for-any-device-with-.patch Patch06: 0005-test-add-Asus-RoG-Gladius-mouse.patch +Patch07: 0001-Fix-libinput_device_group_find_group-to-return-NULL-.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -103,6 +104,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Nov 02 2015 Peter Hutterer 1.1.0-3 +- Fix invalid device group pointer, causing invalid memory access + * Wed Oct 28 2015 Peter Hutterer 1.1.0-2 - Fix crash triggered by Asus RoG Gladius mouse (#1275407) From f7dc5ca778d0e138f6ea8ab4f5b3387e0d242096 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 16 Nov 2015 09:08:02 +1000 Subject: [PATCH 055/317] libinput 1.1.1 --- .gitignore | 1 + ...ice_group_find_group-to-return-NULL-.patch | 31 -- 0001-evdev-whitespace-fix.patch | 26 -- ...for-missing-pointer-accel-on-relativ.patch | 45 -- ...le-motion-events-if-the-device-isn-t.patch | 30 -- ...er-acceleration-for-any-device-with-.patch | 60 --- 0005-test-add-Asus-RoG-Gladius-mouse.patch | 406 ------------------ libinput.spec | 14 +- sources | 2 +- 9 files changed, 7 insertions(+), 608 deletions(-) delete mode 100644 0001-Fix-libinput_device_group_find_group-to-return-NULL-.patch delete mode 100644 0001-evdev-whitespace-fix.patch delete mode 100644 0002-evdev-log-a-bug-for-missing-pointer-accel-on-relativ.patch delete mode 100644 0003-evdev-don-t-handle-motion-events-if-the-device-isn-t.patch delete mode 100644 0004-evdev-init-pointer-acceleration-for-any-device-with-.patch delete mode 100644 0005-test-add-Asus-RoG-Gladius-mouse.patch diff --git a/.gitignore b/.gitignore index 5350aff..a45fa00 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ /libinput-1.0.1.tar.xz /libinput-1.0.2.tar.xz /libinput-1.1.0.tar.xz +/libinput-1.1.1.tar.xz diff --git a/0001-Fix-libinput_device_group_find_group-to-return-NULL-.patch b/0001-Fix-libinput_device_group_find_group-to-return-NULL-.patch deleted file mode 100644 index 26f385e..0000000 --- a/0001-Fix-libinput_device_group_find_group-to-return-NULL-.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 9949d4ee0859ef8361afc00363a941ff3d133d88 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 2 Nov 2015 08:46:25 +1000 -Subject: [PATCH libinput] Fix libinput_device_group_find_group() to return - NULL on failure - -struct list isn't a null-terminated list, list_for_each() causes 'g' to be set -to the list head at the end of the loop. Returning that as group caused random -memory to be overwritten. - -Signed-off-by: Peter Hutterer ---- - src/libinput.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libinput.c b/src/libinput.c -index f5c75b0..24f2b69 100644 ---- a/src/libinput.c -+++ b/src/libinput.c -@@ -2011,7 +2011,7 @@ libinput_device_group_find_group(struct libinput *libinput, - } - } - -- return g; -+ return NULL; - } - - void --- -2.4.3 - diff --git a/0001-evdev-whitespace-fix.patch b/0001-evdev-whitespace-fix.patch deleted file mode 100644 index 8004ce2..0000000 --- a/0001-evdev-whitespace-fix.patch +++ /dev/null @@ -1,26 +0,0 @@ -From f012d78de4577e9c1b55a63033825d3b13c5d696 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 28 Oct 2015 09:18:18 +1000 -Subject: [PATCH libinput 1/5] evdev: whitespace fix - -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/evdev.c b/src/evdev.c -index aef0456..45c1b1b 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -297,7 +297,7 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time) - - /* Use unaccelerated deltas for pointing stick scroll */ - if (evdev_post_trackpoint_scroll(device, unaccel, time)) -- break; -+ break; - - /* Apply pointer acceleration. */ - accel = filter_dispatch(device->pointer.filter, --- -2.4.3 - diff --git a/0002-evdev-log-a-bug-for-missing-pointer-accel-on-relativ.patch b/0002-evdev-log-a-bug-for-missing-pointer-accel-on-relativ.patch deleted file mode 100644 index fd08139..0000000 --- a/0002-evdev-log-a-bug-for-missing-pointer-accel-on-relativ.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 5d961f282df3296f9b8f1126a196bc163f6ba011 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 28 Oct 2015 09:20:33 +1000 -Subject: [PATCH libinput 2/5] evdev: log a bug for missing pointer accel on - relative events - -And use the unaccelerated motion events. Better than crashing, and better than -a non-moving mouse. - -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/src/evdev.c b/src/evdev.c -index 45c1b1b..4c947d6 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -299,11 +299,18 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time) - if (evdev_post_trackpoint_scroll(device, unaccel, time)) - break; - -- /* Apply pointer acceleration. */ -- accel = filter_dispatch(device->pointer.filter, -- &unaccel, -- device, -- time); -+ if (device->pointer.filter) { -+ /* Apply pointer acceleration. */ -+ accel = filter_dispatch(device->pointer.filter, -+ &unaccel, -+ device, -+ time); -+ } else { -+ log_bug_libinput(libinput, -+ "%s: accel filter missing\n", -+ udev_device_get_devnode(device->udev_device)); -+ accel = unaccel; -+ } - - if (normalized_is_zero(accel) && normalized_is_zero(unaccel)) - break; --- -2.4.3 - diff --git a/0003-evdev-don-t-handle-motion-events-if-the-device-isn-t.patch b/0003-evdev-don-t-handle-motion-events-if-the-device-isn-t.patch deleted file mode 100644 index 410571a..0000000 --- a/0003-evdev-don-t-handle-motion-events-if-the-device-isn-t.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 48f1c63007c416c03363d27f4956e50b6e1c32b0 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 28 Oct 2015 09:05:37 +1000 -Subject: [PATCH libinput 3/5] evdev: don't handle motion events if the device - isn't a pointer device - -This check is already in place for all other event types. - -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/evdev.c b/src/evdev.c -index 4c947d6..ba1b568 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -289,6 +289,9 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time) - case EVDEV_NONE: - return; - case EVDEV_RELATIVE_MOTION: -+ if (!(device->seat_caps & EVDEV_DEVICE_POINTER)) -+ break; -+ - normalize_delta(device, &device->rel, &unaccel); - raw.x = device->rel.x; - raw.y = device->rel.y; --- -2.4.3 - diff --git a/0004-evdev-init-pointer-acceleration-for-any-device-with-.patch b/0004-evdev-init-pointer-acceleration-for-any-device-with-.patch deleted file mode 100644 index 9ce14ca..0000000 --- a/0004-evdev-init-pointer-acceleration-for-any-device-with-.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 64ec0dc79619c1d9cdd772abfdbcb87b6b94d71f Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 28 Oct 2015 09:13:24 +1000 -Subject: [PATCH libinput 4/5] evdev: init pointer acceleration for any device - with pointer cap and rel x/y - -The Asus RoG Gladius exposes two event nodes, one mouse, one keyboard. The -keyboard node has REL_X/Y and REL_HWHEEL on top of the various key bits and -ABS_VOLUME. - -The keyboard node does not have BTN_* set, udev tags this device as a -keyboard only, not as a pointer but we still initialize the pointer caps for -it because of the wheel. - -When moving this mouse, the deltas are sent through the keyboard node, causing -a crash because we never initialized pointer acceleration. - -https://bugzilla.redhat.com/show_bug.cgi?id=1275407 - -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) - -diff --git a/src/evdev.c b/src/evdev.c -index ba1b568..ec3abc6 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -2062,11 +2062,6 @@ evdev_configure_device(struct evdev_device *device) - evdev_tag_trackpoint(device, device->udev_device); - device->dpi = evdev_read_dpi_prop(device); - -- if (libevdev_has_event_code(evdev, EV_REL, REL_X) && -- libevdev_has_event_code(evdev, EV_REL, REL_Y) && -- evdev_init_accel(device, LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE) == -1) -- return -1; -- - device->seat_caps |= EVDEV_DEVICE_POINTER; - - log_info(libinput, -@@ -2104,6 +2099,16 @@ evdev_configure_device(struct evdev_device *device) - device->devname, devnode); - } - -+ if (device->seat_caps & EVDEV_DEVICE_POINTER && -+ libevdev_has_event_code(evdev, EV_REL, REL_X) && -+ libevdev_has_event_code(evdev, EV_REL, REL_Y) && -+ evdev_init_accel(device, LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE) == -1) { -+ log_error(libinput, -+ "failed to initialize pointer acceleration for %s\n", -+ device->devname); -+ return -1; -+ } -+ - return 0; - } - --- -2.4.3 - diff --git a/0005-test-add-Asus-RoG-Gladius-mouse.patch b/0005-test-add-Asus-RoG-Gladius-mouse.patch deleted file mode 100644 index b56a543..0000000 --- a/0005-test-add-Asus-RoG-Gladius-mouse.patch +++ /dev/null @@ -1,406 +0,0 @@ -From 1e30238c569d95530f13e4289d55570830f631eb Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 28 Oct 2015 09:55:01 +1000 -Subject: [PATCH libinput 5/5] test: add Asus RoG Gladius mouse - -This device has the usual mouse and keyboard event nodes that most gaming mice -have. Relative events are sent through the keyboard node, not the mouse -node - and that node doesn't have any buttons and isn't tagged as pointer -device by udev. - -Signed-off-by: Peter Hutterer ---- - test/Makefile.am | 1 + - test/litest-device-asus-rog-gladius.c | 334 ++++++++++++++++++++++++++++++++++ - test/litest.c | 2 + - test/litest.h | 1 + - 4 files changed, 338 insertions(+) - create mode 100644 test/litest-device-asus-rog-gladius.c - -diff --git a/test/Makefile.am b/test/Makefile.am -index cde93b3..ff1acda 100644 ---- a/test/Makefile.am -+++ b/test/Makefile.am -@@ -15,6 +15,7 @@ liblitest_la_SOURCES = \ - litest-int.h \ - litest-device-alps-semi-mt.c \ - litest-device-alps-dualpoint.c \ -+ litest-device-asus-rog-gladius.c \ - litest-device-atmel-hover.c \ - litest-device-bcm5974.c \ - litest-device-elantech-touchpad.c \ -diff --git a/test/litest-device-asus-rog-gladius.c b/test/litest-device-asus-rog-gladius.c -new file mode 100644 -index 0000000..a44396f ---- /dev/null -+++ b/test/litest-device-asus-rog-gladius.c -@@ -0,0 +1,334 @@ -+/* -+ * Copyright © 2015 Red Hat, Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the next -+ * paragraph) shall be included in all copies or substantial portions of the -+ * Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+ * DEALINGS IN THE SOFTWARE. -+ */ -+ -+#if HAVE_CONFIG_H -+#include "config.h" -+#endif -+ -+#include "litest.h" -+#include "litest-int.h" -+ -+/* Note: this is the second event node of this mouse only, the first event -+ * node is just a normal mouse */ -+ -+static void litest_mouse_gladius_setup(void) -+{ -+ struct litest_device *d = litest_create_device(LITEST_MOUSE_GLADIUS); -+ litest_set_current_device(d); -+} -+ -+static struct input_id input_id = { -+ .bustype = 0x3, -+ .vendor = 0x0b05, -+ .product = 0x181a, -+}; -+ -+static int events[] = { -+ EV_REL, REL_X, -+ EV_REL, REL_Y, -+ EV_REL, REL_HWHEEL, -+ EV_KEY, KEY_ESC, -+ EV_KEY, KEY_1, -+ EV_KEY, KEY_2, -+ EV_KEY, KEY_3, -+ EV_KEY, KEY_4, -+ EV_KEY, KEY_5, -+ EV_KEY, KEY_6, -+ EV_KEY, KEY_7, -+ EV_KEY, KEY_8, -+ EV_KEY, KEY_9, -+ EV_KEY, KEY_0, -+ EV_KEY, KEY_MINUS, -+ EV_KEY, KEY_EQUAL, -+ EV_KEY, KEY_BACKSPACE, -+ EV_KEY, KEY_TAB, -+ EV_KEY, KEY_Q, -+ EV_KEY, KEY_W, -+ EV_KEY, KEY_E, -+ EV_KEY, KEY_R, -+ EV_KEY, KEY_T, -+ EV_KEY, KEY_Y, -+ EV_KEY, KEY_U, -+ EV_KEY, KEY_I, -+ EV_KEY, KEY_O, -+ EV_KEY, KEY_P, -+ EV_KEY, KEY_LEFTBRACE, -+ EV_KEY, KEY_RIGHTBRACE, -+ EV_KEY, KEY_ENTER, -+ EV_KEY, KEY_LEFTCTRL, -+ EV_KEY, KEY_A, -+ EV_KEY, KEY_S, -+ EV_KEY, KEY_D, -+ EV_KEY, KEY_F, -+ EV_KEY, KEY_G, -+ EV_KEY, KEY_H, -+ EV_KEY, KEY_J, -+ EV_KEY, KEY_K, -+ EV_KEY, KEY_L, -+ EV_KEY, KEY_SEMICOLON, -+ EV_KEY, KEY_APOSTROPHE, -+ EV_KEY, KEY_GRAVE, -+ EV_KEY, KEY_LEFTSHIFT, -+ EV_KEY, KEY_BACKSLASH, -+ EV_KEY, KEY_Z, -+ EV_KEY, KEY_X, -+ EV_KEY, KEY_C, -+ EV_KEY, KEY_V, -+ EV_KEY, KEY_B, -+ EV_KEY, KEY_N, -+ EV_KEY, KEY_M, -+ EV_KEY, KEY_COMMA, -+ EV_KEY, KEY_DOT, -+ EV_KEY, KEY_SLASH, -+ EV_KEY, KEY_RIGHTSHIFT, -+ EV_KEY, KEY_KPASTERISK, -+ EV_KEY, KEY_LEFTALT, -+ EV_KEY, KEY_SPACE, -+ EV_KEY, KEY_CAPSLOCK, -+ EV_KEY, KEY_F1, -+ EV_KEY, KEY_F2, -+ EV_KEY, KEY_F3, -+ EV_KEY, KEY_F4, -+ EV_KEY, KEY_F5, -+ EV_KEY, KEY_F6, -+ EV_KEY, KEY_F7, -+ EV_KEY, KEY_F8, -+ EV_KEY, KEY_F9, -+ EV_KEY, KEY_F10, -+ EV_KEY, KEY_NUMLOCK, -+ EV_KEY, KEY_SCROLLLOCK, -+ EV_KEY, KEY_KP7, -+ EV_KEY, KEY_KP8, -+ EV_KEY, KEY_KP9, -+ EV_KEY, KEY_KPMINUS, -+ EV_KEY, KEY_KP4, -+ EV_KEY, KEY_KP5, -+ EV_KEY, KEY_KP6, -+ EV_KEY, KEY_KPPLUS, -+ EV_KEY, KEY_KP1, -+ EV_KEY, KEY_KP2, -+ EV_KEY, KEY_KP3, -+ EV_KEY, KEY_KP0, -+ EV_KEY, KEY_KPDOT, -+ EV_KEY, KEY_ZENKAKUHANKAKU, -+ EV_KEY, KEY_102ND, -+ EV_KEY, KEY_F11, -+ EV_KEY, KEY_F12, -+ EV_KEY, KEY_RO, -+ EV_KEY, KEY_KATAKANA, -+ EV_KEY, KEY_HIRAGANA, -+ EV_KEY, KEY_HENKAN, -+ EV_KEY, KEY_KATAKANAHIRAGANA, -+ EV_KEY, KEY_MUHENKAN, -+ EV_KEY, KEY_KPJPCOMMA, -+ EV_KEY, KEY_KPENTER, -+ EV_KEY, KEY_RIGHTCTRL, -+ EV_KEY, KEY_KPSLASH, -+ EV_KEY, KEY_SYSRQ, -+ EV_KEY, KEY_RIGHTALT, -+ EV_KEY, KEY_HOME, -+ EV_KEY, KEY_UP, -+ EV_KEY, KEY_PAGEUP, -+ EV_KEY, KEY_LEFT, -+ EV_KEY, KEY_RIGHT, -+ EV_KEY, KEY_END, -+ EV_KEY, KEY_DOWN, -+ EV_KEY, KEY_PAGEDOWN, -+ EV_KEY, KEY_INSERT, -+ EV_KEY, KEY_DELETE, -+ EV_KEY, KEY_MUTE, -+ EV_KEY, KEY_VOLUMEDOWN, -+ EV_KEY, KEY_VOLUMEUP, -+ EV_KEY, KEY_POWER, -+ EV_KEY, KEY_KPEQUAL, -+ EV_KEY, KEY_PAUSE, -+ EV_KEY, KEY_KPCOMMA, -+ EV_KEY, KEY_HANGEUL, -+ EV_KEY, KEY_HANJA, -+ EV_KEY, KEY_YEN, -+ EV_KEY, KEY_LEFTMETA, -+ EV_KEY, KEY_RIGHTMETA, -+ EV_KEY, KEY_COMPOSE, -+ EV_KEY, KEY_STOP, -+ EV_KEY, KEY_AGAIN, -+ EV_KEY, KEY_PROPS, -+ EV_KEY, KEY_UNDO, -+ EV_KEY, KEY_FRONT, -+ EV_KEY, KEY_COPY, -+ EV_KEY, KEY_OPEN, -+ EV_KEY, KEY_PASTE, -+ EV_KEY, KEY_FIND, -+ EV_KEY, KEY_CUT, -+ EV_KEY, KEY_HELP, -+ EV_KEY, KEY_MENU, -+ EV_KEY, KEY_CALC, -+ EV_KEY, KEY_SLEEP, -+ EV_KEY, KEY_FILE, -+ EV_KEY, KEY_WWW, -+ EV_KEY, KEY_COFFEE, -+ EV_KEY, KEY_MAIL, -+ EV_KEY, KEY_BOOKMARKS, -+ EV_KEY, KEY_BACK, -+ EV_KEY, KEY_FORWARD, -+ EV_KEY, KEY_EJECTCD, -+ EV_KEY, KEY_NEXTSONG, -+ EV_KEY, KEY_PLAYPAUSE, -+ EV_KEY, KEY_PREVIOUSSONG, -+ EV_KEY, KEY_STOPCD, -+ EV_KEY, KEY_RECORD, -+ EV_KEY, KEY_REWIND, -+ EV_KEY, KEY_PHONE, -+ EV_KEY, KEY_CONFIG, -+ EV_KEY, KEY_HOMEPAGE, -+ EV_KEY, KEY_REFRESH, -+ EV_KEY, KEY_EXIT, -+ EV_KEY, KEY_EDIT, -+ EV_KEY, KEY_SCROLLUP, -+ EV_KEY, KEY_SCROLLDOWN, -+ EV_KEY, KEY_KPLEFTPAREN, -+ EV_KEY, KEY_KPRIGHTPAREN, -+ EV_KEY, KEY_NEW, -+ EV_KEY, KEY_REDO, -+ EV_KEY, KEY_F13, -+ EV_KEY, KEY_F14, -+ EV_KEY, KEY_F15, -+ EV_KEY, KEY_F16, -+ EV_KEY, KEY_F17, -+ EV_KEY, KEY_F18, -+ EV_KEY, KEY_F19, -+ EV_KEY, KEY_F20, -+ EV_KEY, KEY_F21, -+ EV_KEY, KEY_F22, -+ EV_KEY, KEY_F23, -+ EV_KEY, KEY_F24, -+ EV_KEY, KEY_CLOSE, -+ EV_KEY, KEY_PLAY, -+ EV_KEY, KEY_FASTFORWARD, -+ EV_KEY, KEY_BASSBOOST, -+ EV_KEY, KEY_PRINT, -+ EV_KEY, KEY_CAMERA, -+ EV_KEY, KEY_CHAT, -+ EV_KEY, KEY_SEARCH, -+ EV_KEY, KEY_FINANCE, -+ EV_KEY, KEY_CANCEL, -+ EV_KEY, KEY_BRIGHTNESSDOWN, -+ EV_KEY, KEY_BRIGHTNESSUP, -+ EV_KEY, KEY_KBDILLUMTOGGLE, -+ EV_KEY, KEY_SEND, -+ EV_KEY, KEY_REPLY, -+ EV_KEY, KEY_FORWARDMAIL, -+ EV_KEY, KEY_SAVE, -+ EV_KEY, KEY_DOCUMENTS, -+ EV_KEY, KEY_UNKNOWN, -+ EV_KEY, KEY_VIDEO_NEXT, -+ EV_KEY, KEY_BRIGHTNESS_AUTO, -+ EV_KEY, BTN_0, -+ EV_KEY, KEY_SELECT, -+ EV_KEY, KEY_GOTO, -+ EV_KEY, KEY_INFO, -+ EV_KEY, KEY_PROGRAM, -+ EV_KEY, KEY_PVR, -+ EV_KEY, KEY_SUBTITLE, -+ EV_KEY, KEY_ZOOM, -+ EV_KEY, KEY_KEYBOARD, -+ EV_KEY, KEY_PC, -+ EV_KEY, KEY_TV, -+ EV_KEY, KEY_TV2, -+ EV_KEY, KEY_VCR, -+ EV_KEY, KEY_VCR2, -+ EV_KEY, KEY_SAT, -+ EV_KEY, KEY_CD, -+ EV_KEY, KEY_TAPE, -+ EV_KEY, KEY_TUNER, -+ EV_KEY, KEY_PLAYER, -+ EV_KEY, KEY_DVD, -+ EV_KEY, KEY_AUDIO, -+ EV_KEY, KEY_VIDEO, -+ EV_KEY, KEY_MEMO, -+ EV_KEY, KEY_CALENDAR, -+ EV_KEY, KEY_RED, -+ EV_KEY, KEY_GREEN, -+ EV_KEY, KEY_YELLOW, -+ EV_KEY, KEY_BLUE, -+ EV_KEY, KEY_CHANNELUP, -+ EV_KEY, KEY_CHANNELDOWN, -+ EV_KEY, KEY_LAST, -+ EV_KEY, KEY_NEXT, -+ EV_KEY, KEY_RESTART, -+ EV_KEY, KEY_SLOW, -+ EV_KEY, KEY_SHUFFLE, -+ EV_KEY, KEY_PREVIOUS, -+ EV_KEY, KEY_VIDEOPHONE, -+ EV_KEY, KEY_GAMES, -+ EV_KEY, KEY_ZOOMIN, -+ EV_KEY, KEY_ZOOMOUT, -+ EV_KEY, KEY_ZOOMRESET, -+ EV_KEY, KEY_WORDPROCESSOR, -+ EV_KEY, KEY_EDITOR, -+ EV_KEY, KEY_SPREADSHEET, -+ EV_KEY, KEY_GRAPHICSEDITOR, -+ EV_KEY, KEY_PRESENTATION, -+ EV_KEY, KEY_DATABASE, -+ EV_KEY, KEY_NEWS, -+ EV_KEY, KEY_VOICEMAIL, -+ EV_KEY, KEY_ADDRESSBOOK, -+ EV_KEY, KEY_MESSENGER, -+ EV_KEY, KEY_DISPLAYTOGGLE, -+ EV_KEY, KEY_SPELLCHECK, -+ EV_KEY, KEY_LOGOFF, -+ EV_KEY, KEY_MEDIA_REPEAT, -+ EV_KEY, KEY_IMAGES, -+ EV_KEY, KEY_BUTTONCONFIG, -+ EV_KEY, KEY_TASKMANAGER, -+ EV_KEY, KEY_JOURNAL, -+ EV_KEY, KEY_CONTROLPANEL, -+ EV_KEY, KEY_APPSELECT, -+ EV_KEY, KEY_SCREENSAVER, -+ EV_KEY, KEY_VOICECOMMAND, -+ EV_KEY, KEY_BRIGHTNESS_MIN, -+ EV_KEY, KEY_BRIGHTNESS_MAX, -+ EV_LED, LED_NUML, -+ EV_LED, LED_CAPSL, -+ EV_LED, LED_SCROLLL, -+ EV_LED, LED_COMPOSE, -+ EV_LED, LED_KANA, -+ -1 , -1, -+}; -+ -+static struct input_absinfo absinfo[] = { -+ { ABS_VOLUME, 0, 668, 0, 0, 0 }, -+ { .value = -1 } -+}; -+ -+struct litest_test_device litest_mouse_gladius_device = { -+ .type = LITEST_MOUSE_GLADIUS, -+ .features = LITEST_RELATIVE | LITEST_WHEEL | LITEST_KEYS, -+ .shortname = "mouse_gladius", -+ .setup = litest_mouse_gladius_setup, -+ .interface = NULL, -+ -+ .name = "ASUS ROG GLADIUS", -+ .id = &input_id, -+ .absinfo = absinfo, -+ .events = events, -+}; -diff --git a/test/litest.c b/test/litest.c -index bfa28f4..c7cb274 100644 ---- a/test/litest.c -+++ b/test/litest.c -@@ -365,6 +365,7 @@ extern struct litest_test_device litest_generic_multitouch_screen_device; - extern struct litest_test_device litest_nexus4_device; - extern struct litest_test_device litest_magicpad_device; - extern struct litest_test_device litest_elantech_touchpad_device; -+extern struct litest_test_device litest_mouse_gladius_device; - - struct litest_test_device* devices[] = { - &litest_synaptics_clickpad_device, -@@ -396,6 +397,7 @@ struct litest_test_device* devices[] = { - &litest_nexus4_device, - &litest_magicpad_device, - &litest_elantech_touchpad_device, -+ &litest_mouse_gladius_device, - NULL, - }; - -diff --git a/test/litest.h b/test/litest.h -index 8a4b33d..058057e 100644 ---- a/test/litest.h -+++ b/test/litest.h -@@ -142,6 +142,7 @@ enum litest_device_type { - LITEST_NEXUS4_TOUCH_SCREEN = -28, - LITEST_MAGIC_TRACKPAD = -29, - LITEST_ELANTECH_TOUCHPAD = -30, -+ LITEST_MOUSE_GLADIUS = -31, - }; - - enum litest_device_feature { --- -2.4.3 - diff --git a/libinput.spec b/libinput.spec index 5cb8eb3..ce03d63 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.1.0 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.1.1 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,13 +21,6 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 -Patch02: 0001-evdev-whitespace-fix.patch -Patch03: 0002-evdev-log-a-bug-for-missing-pointer-accel-on-relativ.patch -Patch04: 0003-evdev-don-t-handle-motion-events-if-the-device-isn-t.patch -Patch05: 0004-evdev-init-pointer-acceleration-for-any-device-with-.patch -Patch06: 0005-test-add-Asus-RoG-Gladius-mouse.patch -Patch07: 0001-Fix-libinput_device_group_find_group-to-return-NULL-.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -104,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Nov 16 2015 Peter Hutterer 1.1.1-1 +- libinput 1.1.1 + * Mon Nov 02 2015 Peter Hutterer 1.1.0-3 - Fix invalid device group pointer, causing invalid memory access diff --git a/sources b/sources index 70da655..5c6e420 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3610c80555f4cb13fe61d4c04511e060 libinput-1.1.0.tar.xz +4a3fc842ac0b7bf0fa306ea7badc31a0 libinput-1.1.1.tar.xz From c851d384594139de5be5fe3248fd965a3f7c6035 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 7 Dec 2015 16:46:18 +1000 Subject: [PATCH 056/317] Reduce 2fg scroll threshold to 1mm (#1247958) --- ...uced-the-2fg-scroll-threshold-to-1mm.patch | 55 +++++++++++++++++++ libinput.spec | 7 ++- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-reduced-the-2fg-scroll-threshold-to-1mm.patch diff --git a/0001-touchpad-reduced-the-2fg-scroll-threshold-to-1mm.patch b/0001-touchpad-reduced-the-2fg-scroll-threshold-to-1mm.patch new file mode 100644 index 0000000..3b15250 --- /dev/null +++ b/0001-touchpad-reduced-the-2fg-scroll-threshold-to-1mm.patch @@ -0,0 +1,55 @@ +From 09a296708aa291e0dd5ada2db14f288a3095b61e Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 9 Nov 2015 16:21:36 +1000 +Subject: [PATCH libinput] touchpad: reduced the 2fg scroll threshold to 1mm + +At least on the t440, this is enough to trigger correct detection between +pinch and scroll 90% of the time. Since scrolling is significantly more +prevalent than gesturing, erring on the side of scrolling at the cost of +misdetecting some gestures is acceptable. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad-gestures.c | 2 +- + test/gestures.c | 8 ++++---- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c +index cc26e2a..80aa89f 100644 +--- a/src/evdev-mt-touchpad-gestures.c ++++ b/src/evdev-mt-touchpad-gestures.c +@@ -195,7 +195,7 @@ tp_gesture_get_direction(struct tp_dispatch *tp, struct tp_touch *touch) + (tp->device->model_flags & EVDEV_MODEL_ELANTECH_TOUCHPAD) == 0) + move_threshold = TP_MM_TO_DPI_NORMALIZED(4); + else +- move_threshold = TP_MM_TO_DPI_NORMALIZED(2); ++ move_threshold = TP_MM_TO_DPI_NORMALIZED(1); + + delta = device_delta(touch->point, touch->gesture.initial); + +diff --git a/test/gestures.c b/test/gestures.c +index 9e44724..9fc73b9 100644 +--- a/test/gestures.c ++++ b/test/gestures.c +@@ -294,13 +294,13 @@ START_TEST(gestures_spread) + for (i = 0; i < 15; i++) { + litest_push_event_frame(dev); + if (dir_x > 0.0) +- dir_x += 2; ++ dir_x += 1; + else if (dir_x < 0.0) +- dir_x -= 2; ++ dir_x -= 1; + if (dir_y > 0.0) +- dir_y += 2; ++ dir_y += 1; + else if (dir_y < 0.0) +- dir_y -= 2; ++ dir_y -= 1; + litest_touch_move(dev, + 0, + 50 + dir_x, +-- +2.5.0 + diff --git a/libinput.spec b/libinput.spec index ce03d63..0b0e60e 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.1.1 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -20,6 +20,8 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 +# https://bugzilla.redhat.com/show_bug.cgi?id=1247958 +Patch02: 0001-touchpad-reduced-the-2fg-scroll-threshold-to-1mm.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -97,6 +99,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Dec 07 2015 Peter Hutterer 1.1.1-2 +- Reduce 2fg scroll threshold to 1mm (#1247958) + * Mon Nov 16 2015 Peter Hutterer 1.1.1-1 - libinput 1.1.1 From b7b0b482028f9f3fe2071bcfdad51e561aafae67 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 9 Dec 2015 09:39:18 +1000 Subject: [PATCH 057/317] libinput 1.1.2 --- .gitignore | 1 + ...uced-the-2fg-scroll-threshold-to-1mm.patch | 55 ------------------- libinput.spec | 9 +-- sources | 2 +- 4 files changed, 7 insertions(+), 60 deletions(-) delete mode 100644 0001-touchpad-reduced-the-2fg-scroll-threshold-to-1mm.patch diff --git a/.gitignore b/.gitignore index a45fa00..fbe924d 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ /libinput-1.0.2.tar.xz /libinput-1.1.0.tar.xz /libinput-1.1.1.tar.xz +/libinput-1.1.2.tar.xz diff --git a/0001-touchpad-reduced-the-2fg-scroll-threshold-to-1mm.patch b/0001-touchpad-reduced-the-2fg-scroll-threshold-to-1mm.patch deleted file mode 100644 index 3b15250..0000000 --- a/0001-touchpad-reduced-the-2fg-scroll-threshold-to-1mm.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 09a296708aa291e0dd5ada2db14f288a3095b61e Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 9 Nov 2015 16:21:36 +1000 -Subject: [PATCH libinput] touchpad: reduced the 2fg scroll threshold to 1mm - -At least on the t440, this is enough to trigger correct detection between -pinch and scroll 90% of the time. Since scrolling is significantly more -prevalent than gesturing, erring on the side of scrolling at the cost of -misdetecting some gestures is acceptable. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad-gestures.c | 2 +- - test/gestures.c | 8 ++++---- - 2 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c -index cc26e2a..80aa89f 100644 ---- a/src/evdev-mt-touchpad-gestures.c -+++ b/src/evdev-mt-touchpad-gestures.c -@@ -195,7 +195,7 @@ tp_gesture_get_direction(struct tp_dispatch *tp, struct tp_touch *touch) - (tp->device->model_flags & EVDEV_MODEL_ELANTECH_TOUCHPAD) == 0) - move_threshold = TP_MM_TO_DPI_NORMALIZED(4); - else -- move_threshold = TP_MM_TO_DPI_NORMALIZED(2); -+ move_threshold = TP_MM_TO_DPI_NORMALIZED(1); - - delta = device_delta(touch->point, touch->gesture.initial); - -diff --git a/test/gestures.c b/test/gestures.c -index 9e44724..9fc73b9 100644 ---- a/test/gestures.c -+++ b/test/gestures.c -@@ -294,13 +294,13 @@ START_TEST(gestures_spread) - for (i = 0; i < 15; i++) { - litest_push_event_frame(dev); - if (dir_x > 0.0) -- dir_x += 2; -+ dir_x += 1; - else if (dir_x < 0.0) -- dir_x -= 2; -+ dir_x -= 1; - if (dir_y > 0.0) -- dir_y += 2; -+ dir_y += 1; - else if (dir_y < 0.0) -- dir_y -= 2; -+ dir_y -= 1; - litest_touch_move(dev, - 0, - 50 + dir_x, --- -2.5.0 - diff --git a/libinput.spec b/libinput.spec index 0b0e60e..7f9eed0 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.1.1 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.1.2 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -20,8 +20,6 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 -# https://bugzilla.redhat.com/show_bug.cgi?id=1247958 -Patch02: 0001-touchpad-reduced-the-2fg-scroll-threshold-to-1mm.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -99,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Dec 09 2015 Peter Hutterer 1.1.2-1 +- libinput 1.1.2 + * Mon Dec 07 2015 Peter Hutterer 1.1.1-2 - Reduce 2fg scroll threshold to 1mm (#1247958) diff --git a/sources b/sources index 5c6e420..4e826c0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4a3fc842ac0b7bf0fa306ea7badc31a0 libinput-1.1.1.tar.xz +634830eb423acd71262b23a13154f6f7 libinput-1.1.2.tar.xz From b8504dcd20673ccd098f57272164753e2ed658fd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 16 Dec 2015 07:36:43 +1000 Subject: [PATCH 058/317] libinput 1.1.3 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fbe924d..3349c74 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ /libinput-1.1.0.tar.xz /libinput-1.1.1.tar.xz /libinput-1.1.2.tar.xz +/libinput-1.1.3.tar.xz diff --git a/libinput.spec b/libinput.spec index 7f9eed0..66b40f7 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.1.2 +Version: 1.1.3 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Dec 16 2015 Peter Hutterer 1.1.3-1 +- libinput 1.1.3 + * Wed Dec 09 2015 Peter Hutterer 1.1.2-1 - libinput 1.1.2 diff --git a/sources b/sources index 4e826c0..0481f6b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -634830eb423acd71262b23a13154f6f7 libinput-1.1.2.tar.xz +3bca9bd8fb2853216352b347dd247726 libinput-1.1.3.tar.xz From 1d67abf08367ec4b465abd25c2c15b40c21c6301 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 22 Dec 2015 11:36:53 +1000 Subject: [PATCH 059/317] libinput 1.1.4 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3349c74..642a5e6 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ /libinput-1.1.1.tar.xz /libinput-1.1.2.tar.xz /libinput-1.1.3.tar.xz +/libinput-1.1.4.tar.xz diff --git a/libinput.spec b/libinput.spec index 66b40f7..722e516 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.1.3 +Version: 1.1.4 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Dec 22 2015 Peter Hutterer 1.1.4-1 +- libinput 1.1.4 + * Wed Dec 16 2015 Peter Hutterer 1.1.3-1 - libinput 1.1.3 diff --git a/sources b/sources index 0481f6b..6f34de7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3bca9bd8fb2853216352b347dd247726 libinput-1.1.3.tar.xz +0945318141c1a9f52857bbf65d175f32 libinput-1.1.4.tar.xz From 50ab3839fb0ee163f33d17f1a8aa64fbc773a3f1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 11 Jan 2016 13:22:06 +1000 Subject: [PATCH 060/317] fix disable-while-typing on macbooks --- ...fix-DWT-pairing-for-Macbook-Pro-2015.patch | 627 ++++++++++++++++++ libinput.spec | 7 +- 2 files changed, 633 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-fix-DWT-pairing-for-Macbook-Pro-2015.patch diff --git a/0001-touchpad-fix-DWT-pairing-for-Macbook-Pro-2015.patch b/0001-touchpad-fix-DWT-pairing-for-Macbook-Pro-2015.patch new file mode 100644 index 0000000..3dbe228 --- /dev/null +++ b/0001-touchpad-fix-DWT-pairing-for-Macbook-Pro-2015.patch @@ -0,0 +1,627 @@ +From b3f11180e337d6cd7fd997685b65e5ed48acc661 Mon Sep 17 00:00:00 2001 +From: Caibin Chen +Date: Sun, 13 Dec 2015 22:27:55 -0800 +Subject: [PATCH libinput] touchpad: fix DWT pairing for Macbook Pro 2015 + +Label internal keyboards through the udev hwdb and only pair the internal +(usb) Apple touchpads with those keyboards labelled as such. + +https://bugs.freedesktop.org/show_bug.cgi?id=93367 + +Co-authored-by: Peter Hutterer +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad.c | 9 + + src/evdev.c | 1 + + src/evdev.h | 1 + + src/libinput-util.h | 1 + + test/Makefile.am | 1 + + test/litest-device-apple-internal-keyboard.c | 239 +++++++++++++++++++++++++++ + test/litest.c | 2 + + test/litest.h | 1 + + test/touchpad.c | 87 ++++++++-- + udev/90-libinput-model-quirks.hwdb | 3 + + 10 files changed, 328 insertions(+), 17 deletions(-) + create mode 100644 test/litest-device-apple-internal-keyboard.c + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index d78a54b..aa123cd 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1285,6 +1285,8 @@ tp_want_dwt(struct evdev_device *touchpad, + { + unsigned int bus_tp = libevdev_get_id_bustype(touchpad->evdev), + bus_kbd = libevdev_get_id_bustype(keyboard->evdev); ++ unsigned int vendor_tp = evdev_device_get_id_vendor(touchpad); ++ unsigned int vendor_kbd = evdev_device_get_id_vendor(keyboard); + + if (tp_dwt_device_is_blacklisted(touchpad) || + tp_dwt_device_is_blacklisted(keyboard)) +@@ -1295,6 +1297,13 @@ tp_want_dwt(struct evdev_device *touchpad, + if (bus_tp == BUS_I8042 && bus_kbd != bus_tp) + return false; + ++ /* For Apple touchpads, always use its internal keyboard */ ++ if (vendor_tp == VENDOR_ID_APPLE) { ++ return vendor_kbd == vendor_tp && ++ keyboard->model_flags & ++ EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD; ++ } ++ + /* everything else we don't really know, so we have to assume + they go together */ + +diff --git a/src/evdev.c b/src/evdev.c +index 3708072..a6d8a60 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1662,6 +1662,7 @@ evdev_read_model_flags(struct evdev_device *device) + { "LIBINPUT_MODEL_SYNAPTICS_SERIAL_TOUCHPAD", EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD }, + { "LIBINPUT_MODEL_JUMPING_SEMI_MT", EVDEV_MODEL_JUMPING_SEMI_MT }, + { "LIBINPUT_MODEL_ELANTECH_TOUCHPAD", EVDEV_MODEL_ELANTECH_TOUCHPAD }, ++ { "LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD", EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD }, + { NULL, EVDEV_MODEL_DEFAULT }, + }; + const struct model_map *m = model_map; +diff --git a/src/evdev.h b/src/evdev.h +index 36bf7b4..97177ec 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -108,6 +108,7 @@ enum evdev_device_model { + EVDEV_MODEL_JUMPING_SEMI_MT = (1 << 10), + EVDEV_MODEL_ELANTECH_TOUCHPAD = (1 << 11), + EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), ++ EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13), + }; + + struct mt_slot { +diff --git a/src/libinput-util.h b/src/libinput-util.h +index a627e5d..25de8e5 100644 +--- a/src/libinput-util.h ++++ b/src/libinput-util.h +@@ -38,6 +38,7 @@ + #define VENDOR_ID_APPLE 0x5ac + #define VENDOR_ID_WACOM 0x56a + #define VENDOR_ID_SYNAPTICS_SERIAL 0x002 ++#define PRODUCT_ID_APPLE_KBD_TOUCHPAD 0x273 + #define PRODUCT_ID_SYNAPTICS_SERIAL 0x007 + + /* The HW DPI rate we normalize to before calculating pointer acceleration */ +diff --git a/test/Makefile.am b/test/Makefile.am +index e4ed8e5..3b18cf4 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -15,6 +15,7 @@ liblitest_la_SOURCES = \ + litest-int.h \ + litest-device-alps-semi-mt.c \ + litest-device-alps-dualpoint.c \ ++ litest-device-apple-internal-keyboard.c \ + litest-device-asus-rog-gladius.c \ + litest-device-atmel-hover.c \ + litest-device-bcm5974.c \ +diff --git a/test/litest-device-apple-internal-keyboard.c b/test/litest-device-apple-internal-keyboard.c +new file mode 100644 +index 0000000..c24403d +--- /dev/null ++++ b/test/litest-device-apple-internal-keyboard.c +@@ -0,0 +1,239 @@ ++/* ++ * Copyright © 2015 Red Hat, Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the next ++ * paragraph) shall be included in all copies or substantial portions of the ++ * Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ++ * DEALINGS IN THE SOFTWARE. ++ */ ++ ++#if HAVE_CONFIG_H ++#include "config.h" ++#endif ++ ++#include "litest.h" ++#include "litest-int.h" ++ ++static void litest_apple_keyboard_setup(void) ++{ ++ struct litest_device *d = litest_create_device(LITEST_APPLE_KEYBOARD); ++ litest_set_current_device(d); ++} ++ ++static struct input_id input_id = { ++ .bustype = 0x3, ++ .vendor = 0x5ac, ++ .product = 0x273, ++}; ++ ++static int events[] = { ++ EV_KEY, KEY_ESC, ++ EV_KEY, KEY_1, ++ EV_KEY, KEY_2, ++ EV_KEY, KEY_3, ++ EV_KEY, KEY_4, ++ EV_KEY, KEY_5, ++ EV_KEY, KEY_6, ++ EV_KEY, KEY_7, ++ EV_KEY, KEY_8, ++ EV_KEY, KEY_9, ++ EV_KEY, KEY_0, ++ EV_KEY, KEY_MINUS, ++ EV_KEY, KEY_EQUAL, ++ EV_KEY, KEY_BACKSPACE, ++ EV_KEY, KEY_TAB, ++ EV_KEY, KEY_Q, ++ EV_KEY, KEY_W, ++ EV_KEY, KEY_E, ++ EV_KEY, KEY_R, ++ EV_KEY, KEY_T, ++ EV_KEY, KEY_Y, ++ EV_KEY, KEY_U, ++ EV_KEY, KEY_I, ++ EV_KEY, KEY_O, ++ EV_KEY, KEY_P, ++ EV_KEY, KEY_LEFTBRACE, ++ EV_KEY, KEY_RIGHTBRACE, ++ EV_KEY, KEY_ENTER, ++ EV_KEY, KEY_LEFTCTRL, ++ EV_KEY, KEY_A, ++ EV_KEY, KEY_S, ++ EV_KEY, KEY_D, ++ EV_KEY, KEY_F, ++ EV_KEY, KEY_G, ++ EV_KEY, KEY_H, ++ EV_KEY, KEY_J, ++ EV_KEY, KEY_K, ++ EV_KEY, KEY_L, ++ EV_KEY, KEY_SEMICOLON, ++ EV_KEY, KEY_APOSTROPHE, ++ EV_KEY, KEY_GRAVE, ++ EV_KEY, KEY_LEFTSHIFT, ++ EV_KEY, KEY_BACKSLASH, ++ EV_KEY, KEY_Z, ++ EV_KEY, KEY_X, ++ EV_KEY, KEY_C, ++ EV_KEY, KEY_V, ++ EV_KEY, KEY_B, ++ EV_KEY, KEY_N, ++ EV_KEY, KEY_M, ++ EV_KEY, KEY_COMMA, ++ EV_KEY, KEY_DOT, ++ EV_KEY, KEY_SLASH, ++ EV_KEY, KEY_RIGHTSHIFT, ++ EV_KEY, KEY_KPASTERISK, ++ EV_KEY, KEY_LEFTALT, ++ EV_KEY, KEY_SPACE, ++ EV_KEY, KEY_CAPSLOCK, ++ EV_KEY, KEY_F1, ++ EV_KEY, KEY_F2, ++ EV_KEY, KEY_F3, ++ EV_KEY, KEY_F4, ++ EV_KEY, KEY_F5, ++ EV_KEY, KEY_F6, ++ EV_KEY, KEY_F7, ++ EV_KEY, KEY_F8, ++ EV_KEY, KEY_F9, ++ EV_KEY, KEY_F10, ++ EV_KEY, KEY_NUMLOCK, ++ EV_KEY, KEY_SCROLLLOCK, ++ EV_KEY, KEY_KP7, ++ EV_KEY, KEY_KP8, ++ EV_KEY, KEY_KP9, ++ EV_KEY, KEY_KPMINUS, ++ EV_KEY, KEY_KP4, ++ EV_KEY, KEY_KP5, ++ EV_KEY, KEY_KP6, ++ EV_KEY, KEY_KPPLUS, ++ EV_KEY, KEY_KP1, ++ EV_KEY, KEY_KP2, ++ EV_KEY, KEY_KP3, ++ EV_KEY, KEY_KP0, ++ EV_KEY, KEY_KPDOT, ++ EV_KEY, KEY_ZENKAKUHANKAKU, ++ EV_KEY, KEY_102ND, ++ EV_KEY, KEY_F11, ++ EV_KEY, KEY_F12, ++ EV_KEY, KEY_RO, ++ EV_KEY, KEY_KATAKANA, ++ EV_KEY, KEY_HIRAGANA, ++ EV_KEY, KEY_HENKAN, ++ EV_KEY, KEY_KATAKANAHIRAGANA, ++ EV_KEY, KEY_MUHENKAN, ++ EV_KEY, KEY_KPJPCOMMA, ++ EV_KEY, KEY_KPENTER, ++ EV_KEY, KEY_RIGHTCTRL, ++ EV_KEY, KEY_KPSLASH, ++ EV_KEY, KEY_SYSRQ, ++ EV_KEY, KEY_RIGHTALT, ++ EV_KEY, KEY_HOME, ++ EV_KEY, KEY_UP, ++ EV_KEY, KEY_PAGEUP, ++ EV_KEY, KEY_LEFT, ++ EV_KEY, KEY_RIGHT, ++ EV_KEY, KEY_END, ++ EV_KEY, KEY_DOWN, ++ EV_KEY, KEY_PAGEDOWN, ++ EV_KEY, KEY_INSERT, ++ EV_KEY, KEY_DELETE, ++ EV_KEY, KEY_MUTE, ++ EV_KEY, KEY_VOLUMEDOWN, ++ EV_KEY, KEY_VOLUMEUP, ++ EV_KEY, KEY_POWER, ++ EV_KEY, KEY_KPEQUAL, ++ EV_KEY, KEY_PAUSE, ++ EV_KEY, KEY_SCALE, ++ EV_KEY, KEY_KPCOMMA, ++ EV_KEY, KEY_HANGEUL, ++ EV_KEY, KEY_HANJA, ++ EV_KEY, KEY_YEN, ++ EV_KEY, KEY_LEFTMETA, ++ EV_KEY, KEY_RIGHTMETA, ++ EV_KEY, KEY_COMPOSE, ++ EV_KEY, KEY_STOP, ++ EV_KEY, KEY_AGAIN, ++ EV_KEY, KEY_PROPS, ++ EV_KEY, KEY_UNDO, ++ EV_KEY, KEY_FRONT, ++ EV_KEY, KEY_COPY, ++ EV_KEY, KEY_OPEN, ++ EV_KEY, KEY_PASTE, ++ EV_KEY, KEY_FIND, ++ EV_KEY, KEY_CUT, ++ EV_KEY, KEY_HELP, ++ EV_KEY, KEY_CALC, ++ EV_KEY, KEY_SLEEP, ++ EV_KEY, KEY_WWW, ++ EV_KEY, KEY_COFFEE, ++ EV_KEY, KEY_BACK, ++ EV_KEY, KEY_FORWARD, ++ EV_KEY, KEY_EJECTCD, ++ EV_KEY, KEY_NEXTSONG, ++ EV_KEY, KEY_PLAYPAUSE, ++ EV_KEY, KEY_PREVIOUSSONG, ++ EV_KEY, KEY_STOPCD, ++ EV_KEY, KEY_REWIND, ++ EV_KEY, KEY_REFRESH, ++ EV_KEY, KEY_EDIT, ++ EV_KEY, KEY_SCROLLUP, ++ EV_KEY, KEY_SCROLLDOWN, ++ EV_KEY, KEY_KPLEFTPAREN, ++ EV_KEY, KEY_KPRIGHTPAREN, ++ EV_KEY, KEY_F13, ++ EV_KEY, KEY_F14, ++ EV_KEY, KEY_F15, ++ EV_KEY, KEY_F16, ++ EV_KEY, KEY_F17, ++ EV_KEY, KEY_F18, ++ EV_KEY, KEY_F19, ++ EV_KEY, KEY_F20, ++ EV_KEY, KEY_F21, ++ EV_KEY, KEY_F22, ++ EV_KEY, KEY_F23, ++ EV_KEY, KEY_F24, ++ EV_KEY, KEY_DASHBOARD, ++ EV_KEY, KEY_FASTFORWARD, ++ EV_KEY, KEY_BRIGHTNESSDOWN, ++ EV_KEY, KEY_BRIGHTNESSUP, ++ EV_KEY, KEY_SWITCHVIDEOMODE, ++ EV_KEY, KEY_KBDILLUMTOGGLE, ++ EV_KEY, KEY_KBDILLUMDOWN, ++ EV_KEY, KEY_KBDILLUMUP, ++ EV_KEY, KEY_UNKNOWN, ++ EV_KEY, KEY_FN, ++ EV_MSC, MSC_SCAN, ++ ++ EV_LED, LED_NUML, ++ EV_LED, LED_CAPSL, ++ EV_LED, LED_SCROLLL, ++ EV_LED, LED_COMPOSE, ++ EV_LED, LED_KANA, ++ -1, -1 ++}; ++ ++struct litest_test_device litest_apple_keyboard_device = { ++ .type = LITEST_APPLE_KEYBOARD, ++ .features = LITEST_KEYS, ++ .shortname = "apple_keyboard", ++ .setup = litest_apple_keyboard_setup, ++ .interface = NULL, ++ ++ .name = "Apple Inc. Apple Internal Keyboard / Trackpad", ++ .id = &input_id, ++ .events = events, ++ .absinfo = NULL, ++}; +diff --git a/test/litest.c b/test/litest.c +index fc188b6..0e3a815 100644 +--- a/test/litest.c ++++ b/test/litest.c +@@ -367,6 +367,7 @@ extern struct litest_test_device litest_magicpad_device; + extern struct litest_test_device litest_elantech_touchpad_device; + extern struct litest_test_device litest_mouse_gladius_device; + extern struct litest_test_device litest_mouse_wheel_click_angle_device; ++extern struct litest_test_device litest_apple_keyboard_device; + + struct litest_test_device* devices[] = { + &litest_synaptics_clickpad_device, +@@ -400,6 +401,7 @@ struct litest_test_device* devices[] = { + &litest_elantech_touchpad_device, + &litest_mouse_gladius_device, + &litest_mouse_wheel_click_angle_device, ++ &litest_apple_keyboard_device, + NULL, + }; + +diff --git a/test/litest.h b/test/litest.h +index 1268e10..7cd550e 100644 +--- a/test/litest.h ++++ b/test/litest.h +@@ -144,6 +144,7 @@ enum litest_device_type { + LITEST_ELANTECH_TOUCHPAD = -30, + LITEST_MOUSE_GLADIUS = -31, + LITEST_MOUSE_WHEEL_CLICK_ANGLE = -32, ++ LITEST_APPLE_KEYBOARD = -33, + }; + + enum litest_device_feature { +diff --git a/test/touchpad.c b/test/touchpad.c +index dab2781..4eb9418 100644 +--- a/test/touchpad.c ++++ b/test/touchpad.c +@@ -2282,6 +2282,18 @@ has_disable_while_typing(struct litest_device *device) + return libinput_device_config_dwt_is_available(device->libinput_device); + } + ++static inline struct litest_device * ++dwt_init_paired_keyboard(struct libinput *li, ++ struct litest_device *touchpad) ++{ ++ enum litest_device_type which = LITEST_KEYBOARD; ++ ++ if (libevdev_get_id_vendor(touchpad->evdev) == VENDOR_ID_APPLE) ++ which = LITEST_APPLE_KEYBOARD; ++ ++ return litest_add_device(li, which); ++} ++ + START_TEST(touchpad_dwt) + { + struct litest_device *touchpad = litest_current_device(); +@@ -2291,7 +2303,7 @@ START_TEST(touchpad_dwt) + if (!has_disable_while_typing(touchpad)) + return; + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_disable_tap(touchpad->libinput_device); + litest_drain_events(li); + +@@ -2333,7 +2345,7 @@ START_TEST(touchpad_dwt_enable_touch) + if (!has_disable_while_typing(touchpad)) + return; + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_disable_tap(touchpad->libinput_device); + litest_drain_events(li); + +@@ -2371,7 +2383,7 @@ START_TEST(touchpad_dwt_touch_hold) + if (!has_disable_while_typing(touchpad)) + return; + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_disable_tap(touchpad->libinput_device); + litest_drain_events(li); + +@@ -2408,7 +2420,7 @@ START_TEST(touchpad_dwt_key_hold) + if (!has_disable_while_typing(touchpad)) + return; + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_disable_tap(touchpad->libinput_device); + litest_drain_events(li); + +@@ -2436,7 +2448,7 @@ START_TEST(touchpad_dwt_type) + if (!has_disable_while_typing(touchpad)) + return; + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_disable_tap(touchpad->libinput_device); + litest_drain_events(li); + +@@ -2474,7 +2486,7 @@ START_TEST(touchpad_dwt_type_short_timeout) + if (!has_disable_while_typing(touchpad)) + return; + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_disable_tap(touchpad->libinput_device); + litest_drain_events(li); + +@@ -2511,7 +2523,7 @@ START_TEST(touchpad_dwt_tap) + if (!has_disable_while_typing(touchpad)) + return; + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_enable_tap(touchpad->libinput_device); + litest_drain_events(li); + +@@ -2541,7 +2553,7 @@ START_TEST(touchpad_dwt_tap_drag) + if (!has_disable_while_typing(touchpad)) + return; + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_enable_tap(touchpad->libinput_device); + litest_drain_events(li); + +@@ -2575,7 +2587,7 @@ START_TEST(touchpad_dwt_click) + if (!has_disable_while_typing(touchpad)) + return; + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_disable_tap(touchpad->libinput_device); + litest_drain_events(li); + +@@ -2608,7 +2620,7 @@ START_TEST(touchpad_dwt_edge_scroll) + + litest_enable_edge_scroll(touchpad); + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_drain_events(li); + + litest_keyboard_key(keyboard, KEY_A, true); +@@ -2655,7 +2667,7 @@ START_TEST(touchpad_dwt_edge_scroll_interrupt) + + litest_enable_edge_scroll(touchpad); + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_drain_events(li); + + litest_touch_down(touchpad, 0, 99, 20); +@@ -2779,7 +2791,7 @@ START_TEST(touchpad_dwt_disabled) + + disable_dwt(touchpad); + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_disable_tap(touchpad->libinput_device); + litest_drain_events(li); + +@@ -2808,7 +2820,7 @@ START_TEST(touchpad_dwt_disable_during_touch) + + enable_dwt(touchpad); + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_disable_tap(touchpad->libinput_device); + litest_drain_events(li); + +@@ -2843,7 +2855,7 @@ START_TEST(touchpad_dwt_disable_before_touch) + + enable_dwt(touchpad); + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_disable_tap(touchpad->libinput_device); + litest_drain_events(li); + +@@ -2874,7 +2886,7 @@ START_TEST(touchpad_dwt_enable_during_touch) + + disable_dwt(touchpad); + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_disable_tap(touchpad->libinput_device); + litest_drain_events(li); + +@@ -2908,7 +2920,7 @@ START_TEST(touchpad_dwt_enable_before_touch) + + disable_dwt(touchpad); + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_disable_tap(touchpad->libinput_device); + litest_drain_events(li); + +@@ -2939,7 +2951,7 @@ START_TEST(touchpad_dwt_enable_during_tap) + litest_enable_tap(touchpad->libinput_device); + disable_dwt(touchpad); + +- keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ keyboard = dwt_init_paired_keyboard(li, touchpad); + litest_drain_events(li); + + litest_keyboard_key(keyboard, KEY_A, true); +@@ -2964,6 +2976,46 @@ START_TEST(touchpad_dwt_enable_during_tap) + litest_delete_device(keyboard); + } + END_TEST ++ ++START_TEST(touchpad_dwt_apple) ++{ ++ struct litest_device *touchpad = litest_current_device(); ++ struct litest_device *keyboard, *apple_keyboard; ++ struct libinput *li = touchpad->libinput; ++ ++ ck_assert(has_disable_while_typing(touchpad)); ++ ++ /* Only the apple keyboard can trigger DWT */ ++ keyboard = litest_add_device(li, LITEST_KEYBOARD); ++ litest_drain_events(li); ++ ++ litest_keyboard_key(keyboard, KEY_A, true); ++ litest_keyboard_key(keyboard, KEY_A, false); ++ litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); ++ ++ litest_touch_down(touchpad, 0, 50, 50); ++ litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); ++ litest_touch_up(touchpad, 0); ++ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); ++ ++ apple_keyboard = litest_add_device(li, LITEST_APPLE_KEYBOARD); ++ litest_drain_events(li); ++ ++ litest_keyboard_key(apple_keyboard, KEY_A, true); ++ litest_keyboard_key(apple_keyboard, KEY_A, false); ++ litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); ++ ++ litest_touch_down(touchpad, 0, 50, 50); ++ litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); ++ litest_touch_up(touchpad, 0); ++ libinput_dispatch(li); ++ litest_assert_empty_queue(li); ++ ++ litest_delete_device(keyboard); ++ litest_delete_device(apple_keyboard); ++} ++END_TEST ++ + static int + has_thumb_detect(struct litest_device *dev) + { +@@ -3632,6 +3684,7 @@ litest_setup_tests(void) + litest_add("touchpad:dwt", touchpad_dwt_enable_during_touch, LITEST_TOUCHPAD, LITEST_ANY); + litest_add("touchpad:dwt", touchpad_dwt_enable_before_touch, LITEST_TOUCHPAD, LITEST_ANY); + litest_add("touchpad:dwt", touchpad_dwt_enable_during_tap, LITEST_TOUCHPAD, LITEST_ANY); ++ litest_add_for_device("touchpad:dwt", touchpad_dwt_apple, LITEST_BCM5974); + + litest_add("touchpad:thumb", touchpad_thumb_begin_no_motion, LITEST_CLICKPAD, LITEST_ANY); + litest_add("touchpad:thumb", touchpad_thumb_update_no_motion, LITEST_CLICKPAD, LITEST_ANY); +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index 814ec40..baebcb3 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -34,6 +34,9 @@ libinput:touchpad:input:b0005v05ACp* + LIBINPUT_MODEL_APPLE_TOUCHPAD=1 + LIBINPUT_ATTR_SIZE_HINT=104x75 + ++libinput:name:*Apple Inc. Apple Internal Keyboard*:dmi:* ++ LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD=1 ++ + ########################################## + # Elantech + ########################################## +-- +2.5.0 + diff --git a/libinput.spec b/libinput.spec index 722e516..0b9aba2 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.1.4 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,6 +21,8 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 +Patch02: 0001-touchpad-fix-DWT-pairing-for-Macbook-Pro-2015.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -97,6 +99,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Jan 11 2016 Peter Hutterer 1.1.4-2 +- fix disable-while-typing on macbooks + * Tue Dec 22 2015 Peter Hutterer 1.1.4-1 - libinput 1.1.4 From 7b227b778b3af063a5387d92978a4e71d6102e7f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 19 Jan 2016 10:07:07 +1000 Subject: [PATCH 061/317] disable MT for semi-mt devices to solve the various two- and three-finger issues (at the cost of pinch gestures) (#1295073) --- ...d-disable-MT-for-all-semi-mt-devices.patch | 132 ++++++++++++++++++ ...le-MT-for-elantech-semi-mt-touchpads.patch | 38 +++++ libinput.spec | 8 +- 3 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-disable-MT-for-all-semi-mt-devices.patch create mode 100644 0001-touchpad-disable-MT-for-elantech-semi-mt-touchpads.patch diff --git a/0001-touchpad-disable-MT-for-all-semi-mt-devices.patch b/0001-touchpad-disable-MT-for-all-semi-mt-devices.patch new file mode 100644 index 0000000..f653958 --- /dev/null +++ b/0001-touchpad-disable-MT-for-all-semi-mt-devices.patch @@ -0,0 +1,132 @@ +From 7c231b7a1223b099ed15c35d703c6b9d4af1ab44 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 19 Jan 2016 09:05:31 +1000 +Subject: [PATCH libinput] touchpad: disable MT for all semi-mt devices + +Synaptics, Elantech and Alps semi-mt devices all have issues with reporting +correct MT data, even the bounding box which semi-mt devices are supposed to +report is wrong. + +Synaptics devices have massive jumps with two fingers down. Elantech devices +may open slots without coordinate data. Alps devices may send 0/0 coordinates +as initial slot position. + +All these may be addressable with specific quirks, but the actual benefit is +largely restricted to better palm detection (though even with quirks this is +unlikely to work) and support for pinch gestures (again, lack of coordinates +makes supporting those hard anyway). + +Elantech: https://bugs.freedesktop.org/show_bug.cgi?id=93583 +Alps: https://bugzilla.redhat.com/show_bug.cgi?id=1295073 + +Signed-off-by: Peter Hutterer +--- + src/evdev-mt-touchpad-gestures.c | 6 ++---- + src/evdev-mt-touchpad.c | 21 +++++++++++++-------- + test/gestures.c | 2 +- + test/litest.h | 10 ---------- + test/touchpad-tap.c | 2 +- + 5 files changed, 17 insertions(+), 24 deletions(-) + +diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c +index 80aa89f..24f6a6d 100644 +--- a/src/evdev-mt-touchpad-gestures.c ++++ b/src/evdev-mt-touchpad-gestures.c +@@ -568,10 +568,8 @@ tp_gesture_handle_state(struct tp_dispatch *tp, uint64_t time) + int + tp_init_gesture(struct tp_dispatch *tp) + { +- if (tp->device->model_flags & EVDEV_MODEL_JUMPING_SEMI_MT) +- tp->gesture.enabled = false; +- else +- tp->gesture.enabled = true; ++ /* semi-mt devices are too unreliable to do pinch gestures */ ++ tp->gesture.enabled = !tp->semi_mt; + + tp->gesture.twofinger_state = GESTURE_2FG_STATE_NONE; + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 62087fb..7f5bbf5 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1490,17 +1490,22 @@ tp_init_slots(struct tp_dispatch *tp, + + tp->semi_mt = libevdev_has_property(device->evdev, INPUT_PROP_SEMI_MT); + +- /* This device has a terrible resolution when two fingers are down, ++ /* Semi-mt devices are not reliable for true multitouch data, so we ++ * simply pretend they're single touch touchpads with BTN_TOOL bits. ++ * Synaptics: ++ * Terrible resolution when two fingers are down, + * causing scroll jumps. The single-touch emulation ABS_X/Y is + * accurate but the ABS_MT_POSITION touchpoints report the bounding +- * box and that causes jumps. So we simply pretend it's a single +- * touch touchpad with the BTN_TOOL bits. +- * See https://bugzilla.redhat.com/show_bug.cgi?id=1235175 for an +- * explanation. ++ * box and that causes jumps. See https://bugzilla.redhat.com/1235175 ++ * Elantech: ++ * On three-finger taps/clicks, one slot doesn't get a coordinate ++ * assigned. See https://bugs.freedesktop.org/show_bug.cgi?id=93583 ++ * Alps: ++ * If three fingers are set down in the same frame, one slot has the ++ * coordinates 0/0 and may not get updated for several frames. ++ * See https://bugzilla.redhat.com/show_bug.cgi?id=1295073 + */ +- if (tp->semi_mt && +- (device->model_flags & +- (EVDEV_MODEL_JUMPING_SEMI_MT|EVDEV_MODEL_ELANTECH_TOUCHPAD))) { ++ if (tp->semi_mt) { + tp->num_slots = 1; + tp->slot = 0; + tp->has_mt = false; +diff --git a/test/gestures.c b/test/gestures.c +index 9fc73b9..0fc3964 100644 +--- a/test/gestures.c ++++ b/test/gestures.c +@@ -34,7 +34,7 @@ START_TEST(gestures_cap) + struct litest_device *dev = litest_current_device(); + struct libinput_device *device = dev->libinput_device; + +- if (litest_is_synaptics_semi_mt(dev)) ++ if (libevdev_has_property(dev->evdev, INPUT_PROP_SEMI_MT)) + ck_assert(!libinput_device_has_capability(device, + LIBINPUT_DEVICE_CAP_GESTURE)); + else +diff --git a/test/litest.h b/test/litest.h +index e74e923..61b1b01 100644 +--- a/test/litest.h ++++ b/test/litest.h +@@ -552,16 +552,6 @@ litest_enable_buttonareas(struct litest_device *dev) + litest_assert_int_eq(status, expected); + } + +-static inline int +-litest_is_synaptics_semi_mt(struct litest_device *dev) +-{ +- struct libevdev *evdev = dev->evdev; +- +- return libevdev_has_property(evdev, INPUT_PROP_SEMI_MT) && +- libevdev_get_id_vendor(evdev) == 0x2 && +- libevdev_get_id_product(evdev) == 0x7; +-} +- + static inline void + litest_enable_drag_lock(struct libinput_device *device) + { +diff --git a/test/touchpad-tap.c b/test/touchpad-tap.c +index 4450ec3..7a7e64c 100644 +--- a/test/touchpad-tap.c ++++ b/test/touchpad-tap.c +@@ -241,7 +241,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_2fg) + int range = _i, + ntaps; + +- if (litest_is_synaptics_semi_mt(dev)) ++ if (libevdev_has_property(dev->evdev, INPUT_PROP_SEMI_MT)) + return; + + litest_enable_tap(dev->libinput_device); +-- +2.5.0 + diff --git a/0001-touchpad-disable-MT-for-elantech-semi-mt-touchpads.patch b/0001-touchpad-disable-MT-for-elantech-semi-mt-touchpads.patch new file mode 100644 index 0000000..5b73031 --- /dev/null +++ b/0001-touchpad-disable-MT-for-elantech-semi-mt-touchpads.patch @@ -0,0 +1,38 @@ +From 556aac04b5d56f015d5da8b96e24fd78ad231760 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 12 Jan 2016 12:24:18 +1000 +Subject: [PATCH libinput] touchpad: disable MT for elantech semi-mt touchpads + +When three fingers are set down on the touchpad, one finger tends to get a 0/0 +coordinate, triggering palm detection in the upper left corner. Handle this +like the jumping semi-mt touchpads and disable MT handling and instead +just rely on the x/y axis and the BTN_TOOL_* events. + +https://bugs.freedesktop.org/show_bug.cgi?id=93583 + +This kernel patch is required: +https://lkml.org/lkml/2016/1/11/171 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 2de2539..f91f839 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1496,7 +1496,8 @@ tp_init_slots(struct tp_dispatch *tp, + * explanation. + */ + if (tp->semi_mt && +- (device->model_flags & EVDEV_MODEL_JUMPING_SEMI_MT)) { ++ (device->model_flags & ++ (EVDEV_MODEL_JUMPING_SEMI_MT|EVDEV_MODEL_ELANTECH_TOUCHPAD))) { + tp->num_slots = 1; + tp->slot = 0; + tp->has_mt = false; +-- +2.5.0 + diff --git a/libinput.spec b/libinput.spec index 0b9aba2..5b96bcf 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.1.4 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -22,6 +22,8 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} Patch01: 0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch Patch02: 0001-touchpad-fix-DWT-pairing-for-Macbook-Pro-2015.patch +Patch03: 0001-touchpad-disable-MT-for-elantech-semi-mt-touchpads.patch +Patch04: 0001-touchpad-disable-MT-for-all-semi-mt-devices.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -99,6 +101,10 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Jan 19 2016 Peter Hutterer 1.1.4-3 +- disable MT for semi-mt devices to solve the various two- and three-finger + issues (at the cost of pinch gestures) (#1295073) + * Mon Jan 11 2016 Peter Hutterer 1.1.4-2 - fix disable-while-typing on macbooks From 8410ef24e234edcdf90101dcf531df24a1ae78bb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 25 Jan 2016 14:55:47 +1000 Subject: [PATCH 062/317] libinput 1.1.5 --- .gitignore | 1 + ...d-disable-MT-for-all-semi-mt-devices.patch | 132 ---- ...le-MT-for-elantech-semi-mt-touchpads.patch | 38 -- ...fix-DWT-pairing-for-Macbook-Pro-2015.patch | 627 ------------------ libinput.spec | 11 +- sources | 2 +- 6 files changed, 7 insertions(+), 804 deletions(-) delete mode 100644 0001-touchpad-disable-MT-for-all-semi-mt-devices.patch delete mode 100644 0001-touchpad-disable-MT-for-elantech-semi-mt-touchpads.patch delete mode 100644 0001-touchpad-fix-DWT-pairing-for-Macbook-Pro-2015.patch diff --git a/.gitignore b/.gitignore index 642a5e6..4b2b4d7 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ /libinput-1.1.2.tar.xz /libinput-1.1.3.tar.xz /libinput-1.1.4.tar.xz +/libinput-1.1.5.tar.xz diff --git a/0001-touchpad-disable-MT-for-all-semi-mt-devices.patch b/0001-touchpad-disable-MT-for-all-semi-mt-devices.patch deleted file mode 100644 index f653958..0000000 --- a/0001-touchpad-disable-MT-for-all-semi-mt-devices.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 7c231b7a1223b099ed15c35d703c6b9d4af1ab44 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 19 Jan 2016 09:05:31 +1000 -Subject: [PATCH libinput] touchpad: disable MT for all semi-mt devices - -Synaptics, Elantech and Alps semi-mt devices all have issues with reporting -correct MT data, even the bounding box which semi-mt devices are supposed to -report is wrong. - -Synaptics devices have massive jumps with two fingers down. Elantech devices -may open slots without coordinate data. Alps devices may send 0/0 coordinates -as initial slot position. - -All these may be addressable with specific quirks, but the actual benefit is -largely restricted to better palm detection (though even with quirks this is -unlikely to work) and support for pinch gestures (again, lack of coordinates -makes supporting those hard anyway). - -Elantech: https://bugs.freedesktop.org/show_bug.cgi?id=93583 -Alps: https://bugzilla.redhat.com/show_bug.cgi?id=1295073 - -Signed-off-by: Peter Hutterer ---- - src/evdev-mt-touchpad-gestures.c | 6 ++---- - src/evdev-mt-touchpad.c | 21 +++++++++++++-------- - test/gestures.c | 2 +- - test/litest.h | 10 ---------- - test/touchpad-tap.c | 2 +- - 5 files changed, 17 insertions(+), 24 deletions(-) - -diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c -index 80aa89f..24f6a6d 100644 ---- a/src/evdev-mt-touchpad-gestures.c -+++ b/src/evdev-mt-touchpad-gestures.c -@@ -568,10 +568,8 @@ tp_gesture_handle_state(struct tp_dispatch *tp, uint64_t time) - int - tp_init_gesture(struct tp_dispatch *tp) - { -- if (tp->device->model_flags & EVDEV_MODEL_JUMPING_SEMI_MT) -- tp->gesture.enabled = false; -- else -- tp->gesture.enabled = true; -+ /* semi-mt devices are too unreliable to do pinch gestures */ -+ tp->gesture.enabled = !tp->semi_mt; - - tp->gesture.twofinger_state = GESTURE_2FG_STATE_NONE; - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 62087fb..7f5bbf5 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -1490,17 +1490,22 @@ tp_init_slots(struct tp_dispatch *tp, - - tp->semi_mt = libevdev_has_property(device->evdev, INPUT_PROP_SEMI_MT); - -- /* This device has a terrible resolution when two fingers are down, -+ /* Semi-mt devices are not reliable for true multitouch data, so we -+ * simply pretend they're single touch touchpads with BTN_TOOL bits. -+ * Synaptics: -+ * Terrible resolution when two fingers are down, - * causing scroll jumps. The single-touch emulation ABS_X/Y is - * accurate but the ABS_MT_POSITION touchpoints report the bounding -- * box and that causes jumps. So we simply pretend it's a single -- * touch touchpad with the BTN_TOOL bits. -- * See https://bugzilla.redhat.com/show_bug.cgi?id=1235175 for an -- * explanation. -+ * box and that causes jumps. See https://bugzilla.redhat.com/1235175 -+ * Elantech: -+ * On three-finger taps/clicks, one slot doesn't get a coordinate -+ * assigned. See https://bugs.freedesktop.org/show_bug.cgi?id=93583 -+ * Alps: -+ * If three fingers are set down in the same frame, one slot has the -+ * coordinates 0/0 and may not get updated for several frames. -+ * See https://bugzilla.redhat.com/show_bug.cgi?id=1295073 - */ -- if (tp->semi_mt && -- (device->model_flags & -- (EVDEV_MODEL_JUMPING_SEMI_MT|EVDEV_MODEL_ELANTECH_TOUCHPAD))) { -+ if (tp->semi_mt) { - tp->num_slots = 1; - tp->slot = 0; - tp->has_mt = false; -diff --git a/test/gestures.c b/test/gestures.c -index 9fc73b9..0fc3964 100644 ---- a/test/gestures.c -+++ b/test/gestures.c -@@ -34,7 +34,7 @@ START_TEST(gestures_cap) - struct litest_device *dev = litest_current_device(); - struct libinput_device *device = dev->libinput_device; - -- if (litest_is_synaptics_semi_mt(dev)) -+ if (libevdev_has_property(dev->evdev, INPUT_PROP_SEMI_MT)) - ck_assert(!libinput_device_has_capability(device, - LIBINPUT_DEVICE_CAP_GESTURE)); - else -diff --git a/test/litest.h b/test/litest.h -index e74e923..61b1b01 100644 ---- a/test/litest.h -+++ b/test/litest.h -@@ -552,16 +552,6 @@ litest_enable_buttonareas(struct litest_device *dev) - litest_assert_int_eq(status, expected); - } - --static inline int --litest_is_synaptics_semi_mt(struct litest_device *dev) --{ -- struct libevdev *evdev = dev->evdev; -- -- return libevdev_has_property(evdev, INPUT_PROP_SEMI_MT) && -- libevdev_get_id_vendor(evdev) == 0x2 && -- libevdev_get_id_product(evdev) == 0x7; --} -- - static inline void - litest_enable_drag_lock(struct libinput_device *device) - { -diff --git a/test/touchpad-tap.c b/test/touchpad-tap.c -index 4450ec3..7a7e64c 100644 ---- a/test/touchpad-tap.c -+++ b/test/touchpad-tap.c -@@ -241,7 +241,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_2fg) - int range = _i, - ntaps; - -- if (litest_is_synaptics_semi_mt(dev)) -+ if (libevdev_has_property(dev->evdev, INPUT_PROP_SEMI_MT)) - return; - - litest_enable_tap(dev->libinput_device); --- -2.5.0 - diff --git a/0001-touchpad-disable-MT-for-elantech-semi-mt-touchpads.patch b/0001-touchpad-disable-MT-for-elantech-semi-mt-touchpads.patch deleted file mode 100644 index 5b73031..0000000 --- a/0001-touchpad-disable-MT-for-elantech-semi-mt-touchpads.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 556aac04b5d56f015d5da8b96e24fd78ad231760 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 12 Jan 2016 12:24:18 +1000 -Subject: [PATCH libinput] touchpad: disable MT for elantech semi-mt touchpads - -When three fingers are set down on the touchpad, one finger tends to get a 0/0 -coordinate, triggering palm detection in the upper left corner. Handle this -like the jumping semi-mt touchpads and disable MT handling and instead -just rely on the x/y axis and the BTN_TOOL_* events. - -https://bugs.freedesktop.org/show_bug.cgi?id=93583 - -This kernel patch is required: -https://lkml.org/lkml/2016/1/11/171 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 2de2539..f91f839 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -1496,7 +1496,8 @@ tp_init_slots(struct tp_dispatch *tp, - * explanation. - */ - if (tp->semi_mt && -- (device->model_flags & EVDEV_MODEL_JUMPING_SEMI_MT)) { -+ (device->model_flags & -+ (EVDEV_MODEL_JUMPING_SEMI_MT|EVDEV_MODEL_ELANTECH_TOUCHPAD))) { - tp->num_slots = 1; - tp->slot = 0; - tp->has_mt = false; --- -2.5.0 - diff --git a/0001-touchpad-fix-DWT-pairing-for-Macbook-Pro-2015.patch b/0001-touchpad-fix-DWT-pairing-for-Macbook-Pro-2015.patch deleted file mode 100644 index 3dbe228..0000000 --- a/0001-touchpad-fix-DWT-pairing-for-Macbook-Pro-2015.patch +++ /dev/null @@ -1,627 +0,0 @@ -From b3f11180e337d6cd7fd997685b65e5ed48acc661 Mon Sep 17 00:00:00 2001 -From: Caibin Chen -Date: Sun, 13 Dec 2015 22:27:55 -0800 -Subject: [PATCH libinput] touchpad: fix DWT pairing for Macbook Pro 2015 - -Label internal keyboards through the udev hwdb and only pair the internal -(usb) Apple touchpads with those keyboards labelled as such. - -https://bugs.freedesktop.org/show_bug.cgi?id=93367 - -Co-authored-by: Peter Hutterer -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad.c | 9 + - src/evdev.c | 1 + - src/evdev.h | 1 + - src/libinput-util.h | 1 + - test/Makefile.am | 1 + - test/litest-device-apple-internal-keyboard.c | 239 +++++++++++++++++++++++++++ - test/litest.c | 2 + - test/litest.h | 1 + - test/touchpad.c | 87 ++++++++-- - udev/90-libinput-model-quirks.hwdb | 3 + - 10 files changed, 328 insertions(+), 17 deletions(-) - create mode 100644 test/litest-device-apple-internal-keyboard.c - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index d78a54b..aa123cd 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -1285,6 +1285,8 @@ tp_want_dwt(struct evdev_device *touchpad, - { - unsigned int bus_tp = libevdev_get_id_bustype(touchpad->evdev), - bus_kbd = libevdev_get_id_bustype(keyboard->evdev); -+ unsigned int vendor_tp = evdev_device_get_id_vendor(touchpad); -+ unsigned int vendor_kbd = evdev_device_get_id_vendor(keyboard); - - if (tp_dwt_device_is_blacklisted(touchpad) || - tp_dwt_device_is_blacklisted(keyboard)) -@@ -1295,6 +1297,13 @@ tp_want_dwt(struct evdev_device *touchpad, - if (bus_tp == BUS_I8042 && bus_kbd != bus_tp) - return false; - -+ /* For Apple touchpads, always use its internal keyboard */ -+ if (vendor_tp == VENDOR_ID_APPLE) { -+ return vendor_kbd == vendor_tp && -+ keyboard->model_flags & -+ EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD; -+ } -+ - /* everything else we don't really know, so we have to assume - they go together */ - -diff --git a/src/evdev.c b/src/evdev.c -index 3708072..a6d8a60 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1662,6 +1662,7 @@ evdev_read_model_flags(struct evdev_device *device) - { "LIBINPUT_MODEL_SYNAPTICS_SERIAL_TOUCHPAD", EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD }, - { "LIBINPUT_MODEL_JUMPING_SEMI_MT", EVDEV_MODEL_JUMPING_SEMI_MT }, - { "LIBINPUT_MODEL_ELANTECH_TOUCHPAD", EVDEV_MODEL_ELANTECH_TOUCHPAD }, -+ { "LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD", EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD }, - { NULL, EVDEV_MODEL_DEFAULT }, - }; - const struct model_map *m = model_map; -diff --git a/src/evdev.h b/src/evdev.h -index 36bf7b4..97177ec 100644 ---- a/src/evdev.h -+++ b/src/evdev.h -@@ -108,6 +108,7 @@ enum evdev_device_model { - EVDEV_MODEL_JUMPING_SEMI_MT = (1 << 10), - EVDEV_MODEL_ELANTECH_TOUCHPAD = (1 << 11), - EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), -+ EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13), - }; - - struct mt_slot { -diff --git a/src/libinput-util.h b/src/libinput-util.h -index a627e5d..25de8e5 100644 ---- a/src/libinput-util.h -+++ b/src/libinput-util.h -@@ -38,6 +38,7 @@ - #define VENDOR_ID_APPLE 0x5ac - #define VENDOR_ID_WACOM 0x56a - #define VENDOR_ID_SYNAPTICS_SERIAL 0x002 -+#define PRODUCT_ID_APPLE_KBD_TOUCHPAD 0x273 - #define PRODUCT_ID_SYNAPTICS_SERIAL 0x007 - - /* The HW DPI rate we normalize to before calculating pointer acceleration */ -diff --git a/test/Makefile.am b/test/Makefile.am -index e4ed8e5..3b18cf4 100644 ---- a/test/Makefile.am -+++ b/test/Makefile.am -@@ -15,6 +15,7 @@ liblitest_la_SOURCES = \ - litest-int.h \ - litest-device-alps-semi-mt.c \ - litest-device-alps-dualpoint.c \ -+ litest-device-apple-internal-keyboard.c \ - litest-device-asus-rog-gladius.c \ - litest-device-atmel-hover.c \ - litest-device-bcm5974.c \ -diff --git a/test/litest-device-apple-internal-keyboard.c b/test/litest-device-apple-internal-keyboard.c -new file mode 100644 -index 0000000..c24403d ---- /dev/null -+++ b/test/litest-device-apple-internal-keyboard.c -@@ -0,0 +1,239 @@ -+/* -+ * Copyright © 2015 Red Hat, Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the next -+ * paragraph) shall be included in all copies or substantial portions of the -+ * Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+ * DEALINGS IN THE SOFTWARE. -+ */ -+ -+#if HAVE_CONFIG_H -+#include "config.h" -+#endif -+ -+#include "litest.h" -+#include "litest-int.h" -+ -+static void litest_apple_keyboard_setup(void) -+{ -+ struct litest_device *d = litest_create_device(LITEST_APPLE_KEYBOARD); -+ litest_set_current_device(d); -+} -+ -+static struct input_id input_id = { -+ .bustype = 0x3, -+ .vendor = 0x5ac, -+ .product = 0x273, -+}; -+ -+static int events[] = { -+ EV_KEY, KEY_ESC, -+ EV_KEY, KEY_1, -+ EV_KEY, KEY_2, -+ EV_KEY, KEY_3, -+ EV_KEY, KEY_4, -+ EV_KEY, KEY_5, -+ EV_KEY, KEY_6, -+ EV_KEY, KEY_7, -+ EV_KEY, KEY_8, -+ EV_KEY, KEY_9, -+ EV_KEY, KEY_0, -+ EV_KEY, KEY_MINUS, -+ EV_KEY, KEY_EQUAL, -+ EV_KEY, KEY_BACKSPACE, -+ EV_KEY, KEY_TAB, -+ EV_KEY, KEY_Q, -+ EV_KEY, KEY_W, -+ EV_KEY, KEY_E, -+ EV_KEY, KEY_R, -+ EV_KEY, KEY_T, -+ EV_KEY, KEY_Y, -+ EV_KEY, KEY_U, -+ EV_KEY, KEY_I, -+ EV_KEY, KEY_O, -+ EV_KEY, KEY_P, -+ EV_KEY, KEY_LEFTBRACE, -+ EV_KEY, KEY_RIGHTBRACE, -+ EV_KEY, KEY_ENTER, -+ EV_KEY, KEY_LEFTCTRL, -+ EV_KEY, KEY_A, -+ EV_KEY, KEY_S, -+ EV_KEY, KEY_D, -+ EV_KEY, KEY_F, -+ EV_KEY, KEY_G, -+ EV_KEY, KEY_H, -+ EV_KEY, KEY_J, -+ EV_KEY, KEY_K, -+ EV_KEY, KEY_L, -+ EV_KEY, KEY_SEMICOLON, -+ EV_KEY, KEY_APOSTROPHE, -+ EV_KEY, KEY_GRAVE, -+ EV_KEY, KEY_LEFTSHIFT, -+ EV_KEY, KEY_BACKSLASH, -+ EV_KEY, KEY_Z, -+ EV_KEY, KEY_X, -+ EV_KEY, KEY_C, -+ EV_KEY, KEY_V, -+ EV_KEY, KEY_B, -+ EV_KEY, KEY_N, -+ EV_KEY, KEY_M, -+ EV_KEY, KEY_COMMA, -+ EV_KEY, KEY_DOT, -+ EV_KEY, KEY_SLASH, -+ EV_KEY, KEY_RIGHTSHIFT, -+ EV_KEY, KEY_KPASTERISK, -+ EV_KEY, KEY_LEFTALT, -+ EV_KEY, KEY_SPACE, -+ EV_KEY, KEY_CAPSLOCK, -+ EV_KEY, KEY_F1, -+ EV_KEY, KEY_F2, -+ EV_KEY, KEY_F3, -+ EV_KEY, KEY_F4, -+ EV_KEY, KEY_F5, -+ EV_KEY, KEY_F6, -+ EV_KEY, KEY_F7, -+ EV_KEY, KEY_F8, -+ EV_KEY, KEY_F9, -+ EV_KEY, KEY_F10, -+ EV_KEY, KEY_NUMLOCK, -+ EV_KEY, KEY_SCROLLLOCK, -+ EV_KEY, KEY_KP7, -+ EV_KEY, KEY_KP8, -+ EV_KEY, KEY_KP9, -+ EV_KEY, KEY_KPMINUS, -+ EV_KEY, KEY_KP4, -+ EV_KEY, KEY_KP5, -+ EV_KEY, KEY_KP6, -+ EV_KEY, KEY_KPPLUS, -+ EV_KEY, KEY_KP1, -+ EV_KEY, KEY_KP2, -+ EV_KEY, KEY_KP3, -+ EV_KEY, KEY_KP0, -+ EV_KEY, KEY_KPDOT, -+ EV_KEY, KEY_ZENKAKUHANKAKU, -+ EV_KEY, KEY_102ND, -+ EV_KEY, KEY_F11, -+ EV_KEY, KEY_F12, -+ EV_KEY, KEY_RO, -+ EV_KEY, KEY_KATAKANA, -+ EV_KEY, KEY_HIRAGANA, -+ EV_KEY, KEY_HENKAN, -+ EV_KEY, KEY_KATAKANAHIRAGANA, -+ EV_KEY, KEY_MUHENKAN, -+ EV_KEY, KEY_KPJPCOMMA, -+ EV_KEY, KEY_KPENTER, -+ EV_KEY, KEY_RIGHTCTRL, -+ EV_KEY, KEY_KPSLASH, -+ EV_KEY, KEY_SYSRQ, -+ EV_KEY, KEY_RIGHTALT, -+ EV_KEY, KEY_HOME, -+ EV_KEY, KEY_UP, -+ EV_KEY, KEY_PAGEUP, -+ EV_KEY, KEY_LEFT, -+ EV_KEY, KEY_RIGHT, -+ EV_KEY, KEY_END, -+ EV_KEY, KEY_DOWN, -+ EV_KEY, KEY_PAGEDOWN, -+ EV_KEY, KEY_INSERT, -+ EV_KEY, KEY_DELETE, -+ EV_KEY, KEY_MUTE, -+ EV_KEY, KEY_VOLUMEDOWN, -+ EV_KEY, KEY_VOLUMEUP, -+ EV_KEY, KEY_POWER, -+ EV_KEY, KEY_KPEQUAL, -+ EV_KEY, KEY_PAUSE, -+ EV_KEY, KEY_SCALE, -+ EV_KEY, KEY_KPCOMMA, -+ EV_KEY, KEY_HANGEUL, -+ EV_KEY, KEY_HANJA, -+ EV_KEY, KEY_YEN, -+ EV_KEY, KEY_LEFTMETA, -+ EV_KEY, KEY_RIGHTMETA, -+ EV_KEY, KEY_COMPOSE, -+ EV_KEY, KEY_STOP, -+ EV_KEY, KEY_AGAIN, -+ EV_KEY, KEY_PROPS, -+ EV_KEY, KEY_UNDO, -+ EV_KEY, KEY_FRONT, -+ EV_KEY, KEY_COPY, -+ EV_KEY, KEY_OPEN, -+ EV_KEY, KEY_PASTE, -+ EV_KEY, KEY_FIND, -+ EV_KEY, KEY_CUT, -+ EV_KEY, KEY_HELP, -+ EV_KEY, KEY_CALC, -+ EV_KEY, KEY_SLEEP, -+ EV_KEY, KEY_WWW, -+ EV_KEY, KEY_COFFEE, -+ EV_KEY, KEY_BACK, -+ EV_KEY, KEY_FORWARD, -+ EV_KEY, KEY_EJECTCD, -+ EV_KEY, KEY_NEXTSONG, -+ EV_KEY, KEY_PLAYPAUSE, -+ EV_KEY, KEY_PREVIOUSSONG, -+ EV_KEY, KEY_STOPCD, -+ EV_KEY, KEY_REWIND, -+ EV_KEY, KEY_REFRESH, -+ EV_KEY, KEY_EDIT, -+ EV_KEY, KEY_SCROLLUP, -+ EV_KEY, KEY_SCROLLDOWN, -+ EV_KEY, KEY_KPLEFTPAREN, -+ EV_KEY, KEY_KPRIGHTPAREN, -+ EV_KEY, KEY_F13, -+ EV_KEY, KEY_F14, -+ EV_KEY, KEY_F15, -+ EV_KEY, KEY_F16, -+ EV_KEY, KEY_F17, -+ EV_KEY, KEY_F18, -+ EV_KEY, KEY_F19, -+ EV_KEY, KEY_F20, -+ EV_KEY, KEY_F21, -+ EV_KEY, KEY_F22, -+ EV_KEY, KEY_F23, -+ EV_KEY, KEY_F24, -+ EV_KEY, KEY_DASHBOARD, -+ EV_KEY, KEY_FASTFORWARD, -+ EV_KEY, KEY_BRIGHTNESSDOWN, -+ EV_KEY, KEY_BRIGHTNESSUP, -+ EV_KEY, KEY_SWITCHVIDEOMODE, -+ EV_KEY, KEY_KBDILLUMTOGGLE, -+ EV_KEY, KEY_KBDILLUMDOWN, -+ EV_KEY, KEY_KBDILLUMUP, -+ EV_KEY, KEY_UNKNOWN, -+ EV_KEY, KEY_FN, -+ EV_MSC, MSC_SCAN, -+ -+ EV_LED, LED_NUML, -+ EV_LED, LED_CAPSL, -+ EV_LED, LED_SCROLLL, -+ EV_LED, LED_COMPOSE, -+ EV_LED, LED_KANA, -+ -1, -1 -+}; -+ -+struct litest_test_device litest_apple_keyboard_device = { -+ .type = LITEST_APPLE_KEYBOARD, -+ .features = LITEST_KEYS, -+ .shortname = "apple_keyboard", -+ .setup = litest_apple_keyboard_setup, -+ .interface = NULL, -+ -+ .name = "Apple Inc. Apple Internal Keyboard / Trackpad", -+ .id = &input_id, -+ .events = events, -+ .absinfo = NULL, -+}; -diff --git a/test/litest.c b/test/litest.c -index fc188b6..0e3a815 100644 ---- a/test/litest.c -+++ b/test/litest.c -@@ -367,6 +367,7 @@ extern struct litest_test_device litest_magicpad_device; - extern struct litest_test_device litest_elantech_touchpad_device; - extern struct litest_test_device litest_mouse_gladius_device; - extern struct litest_test_device litest_mouse_wheel_click_angle_device; -+extern struct litest_test_device litest_apple_keyboard_device; - - struct litest_test_device* devices[] = { - &litest_synaptics_clickpad_device, -@@ -400,6 +401,7 @@ struct litest_test_device* devices[] = { - &litest_elantech_touchpad_device, - &litest_mouse_gladius_device, - &litest_mouse_wheel_click_angle_device, -+ &litest_apple_keyboard_device, - NULL, - }; - -diff --git a/test/litest.h b/test/litest.h -index 1268e10..7cd550e 100644 ---- a/test/litest.h -+++ b/test/litest.h -@@ -144,6 +144,7 @@ enum litest_device_type { - LITEST_ELANTECH_TOUCHPAD = -30, - LITEST_MOUSE_GLADIUS = -31, - LITEST_MOUSE_WHEEL_CLICK_ANGLE = -32, -+ LITEST_APPLE_KEYBOARD = -33, - }; - - enum litest_device_feature { -diff --git a/test/touchpad.c b/test/touchpad.c -index dab2781..4eb9418 100644 ---- a/test/touchpad.c -+++ b/test/touchpad.c -@@ -2282,6 +2282,18 @@ has_disable_while_typing(struct litest_device *device) - return libinput_device_config_dwt_is_available(device->libinput_device); - } - -+static inline struct litest_device * -+dwt_init_paired_keyboard(struct libinput *li, -+ struct litest_device *touchpad) -+{ -+ enum litest_device_type which = LITEST_KEYBOARD; -+ -+ if (libevdev_get_id_vendor(touchpad->evdev) == VENDOR_ID_APPLE) -+ which = LITEST_APPLE_KEYBOARD; -+ -+ return litest_add_device(li, which); -+} -+ - START_TEST(touchpad_dwt) - { - struct litest_device *touchpad = litest_current_device(); -@@ -2291,7 +2303,7 @@ START_TEST(touchpad_dwt) - if (!has_disable_while_typing(touchpad)) - return; - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_disable_tap(touchpad->libinput_device); - litest_drain_events(li); - -@@ -2333,7 +2345,7 @@ START_TEST(touchpad_dwt_enable_touch) - if (!has_disable_while_typing(touchpad)) - return; - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_disable_tap(touchpad->libinput_device); - litest_drain_events(li); - -@@ -2371,7 +2383,7 @@ START_TEST(touchpad_dwt_touch_hold) - if (!has_disable_while_typing(touchpad)) - return; - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_disable_tap(touchpad->libinput_device); - litest_drain_events(li); - -@@ -2408,7 +2420,7 @@ START_TEST(touchpad_dwt_key_hold) - if (!has_disable_while_typing(touchpad)) - return; - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_disable_tap(touchpad->libinput_device); - litest_drain_events(li); - -@@ -2436,7 +2448,7 @@ START_TEST(touchpad_dwt_type) - if (!has_disable_while_typing(touchpad)) - return; - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_disable_tap(touchpad->libinput_device); - litest_drain_events(li); - -@@ -2474,7 +2486,7 @@ START_TEST(touchpad_dwt_type_short_timeout) - if (!has_disable_while_typing(touchpad)) - return; - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_disable_tap(touchpad->libinput_device); - litest_drain_events(li); - -@@ -2511,7 +2523,7 @@ START_TEST(touchpad_dwt_tap) - if (!has_disable_while_typing(touchpad)) - return; - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_enable_tap(touchpad->libinput_device); - litest_drain_events(li); - -@@ -2541,7 +2553,7 @@ START_TEST(touchpad_dwt_tap_drag) - if (!has_disable_while_typing(touchpad)) - return; - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_enable_tap(touchpad->libinput_device); - litest_drain_events(li); - -@@ -2575,7 +2587,7 @@ START_TEST(touchpad_dwt_click) - if (!has_disable_while_typing(touchpad)) - return; - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_disable_tap(touchpad->libinput_device); - litest_drain_events(li); - -@@ -2608,7 +2620,7 @@ START_TEST(touchpad_dwt_edge_scroll) - - litest_enable_edge_scroll(touchpad); - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_drain_events(li); - - litest_keyboard_key(keyboard, KEY_A, true); -@@ -2655,7 +2667,7 @@ START_TEST(touchpad_dwt_edge_scroll_interrupt) - - litest_enable_edge_scroll(touchpad); - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_drain_events(li); - - litest_touch_down(touchpad, 0, 99, 20); -@@ -2779,7 +2791,7 @@ START_TEST(touchpad_dwt_disabled) - - disable_dwt(touchpad); - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_disable_tap(touchpad->libinput_device); - litest_drain_events(li); - -@@ -2808,7 +2820,7 @@ START_TEST(touchpad_dwt_disable_during_touch) - - enable_dwt(touchpad); - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_disable_tap(touchpad->libinput_device); - litest_drain_events(li); - -@@ -2843,7 +2855,7 @@ START_TEST(touchpad_dwt_disable_before_touch) - - enable_dwt(touchpad); - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_disable_tap(touchpad->libinput_device); - litest_drain_events(li); - -@@ -2874,7 +2886,7 @@ START_TEST(touchpad_dwt_enable_during_touch) - - disable_dwt(touchpad); - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_disable_tap(touchpad->libinput_device); - litest_drain_events(li); - -@@ -2908,7 +2920,7 @@ START_TEST(touchpad_dwt_enable_before_touch) - - disable_dwt(touchpad); - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_disable_tap(touchpad->libinput_device); - litest_drain_events(li); - -@@ -2939,7 +2951,7 @@ START_TEST(touchpad_dwt_enable_during_tap) - litest_enable_tap(touchpad->libinput_device); - disable_dwt(touchpad); - -- keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ keyboard = dwt_init_paired_keyboard(li, touchpad); - litest_drain_events(li); - - litest_keyboard_key(keyboard, KEY_A, true); -@@ -2964,6 +2976,46 @@ START_TEST(touchpad_dwt_enable_during_tap) - litest_delete_device(keyboard); - } - END_TEST -+ -+START_TEST(touchpad_dwt_apple) -+{ -+ struct litest_device *touchpad = litest_current_device(); -+ struct litest_device *keyboard, *apple_keyboard; -+ struct libinput *li = touchpad->libinput; -+ -+ ck_assert(has_disable_while_typing(touchpad)); -+ -+ /* Only the apple keyboard can trigger DWT */ -+ keyboard = litest_add_device(li, LITEST_KEYBOARD); -+ litest_drain_events(li); -+ -+ litest_keyboard_key(keyboard, KEY_A, true); -+ litest_keyboard_key(keyboard, KEY_A, false); -+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); -+ -+ litest_touch_down(touchpad, 0, 50, 50); -+ litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); -+ litest_touch_up(touchpad, 0); -+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); -+ -+ apple_keyboard = litest_add_device(li, LITEST_APPLE_KEYBOARD); -+ litest_drain_events(li); -+ -+ litest_keyboard_key(apple_keyboard, KEY_A, true); -+ litest_keyboard_key(apple_keyboard, KEY_A, false); -+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); -+ -+ litest_touch_down(touchpad, 0, 50, 50); -+ litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); -+ litest_touch_up(touchpad, 0); -+ libinput_dispatch(li); -+ litest_assert_empty_queue(li); -+ -+ litest_delete_device(keyboard); -+ litest_delete_device(apple_keyboard); -+} -+END_TEST -+ - static int - has_thumb_detect(struct litest_device *dev) - { -@@ -3632,6 +3684,7 @@ litest_setup_tests(void) - litest_add("touchpad:dwt", touchpad_dwt_enable_during_touch, LITEST_TOUCHPAD, LITEST_ANY); - litest_add("touchpad:dwt", touchpad_dwt_enable_before_touch, LITEST_TOUCHPAD, LITEST_ANY); - litest_add("touchpad:dwt", touchpad_dwt_enable_during_tap, LITEST_TOUCHPAD, LITEST_ANY); -+ litest_add_for_device("touchpad:dwt", touchpad_dwt_apple, LITEST_BCM5974); - - litest_add("touchpad:thumb", touchpad_thumb_begin_no_motion, LITEST_CLICKPAD, LITEST_ANY); - litest_add("touchpad:thumb", touchpad_thumb_update_no_motion, LITEST_CLICKPAD, LITEST_ANY); -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index 814ec40..baebcb3 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -34,6 +34,9 @@ libinput:touchpad:input:b0005v05ACp* - LIBINPUT_MODEL_APPLE_TOUCHPAD=1 - LIBINPUT_ATTR_SIZE_HINT=104x75 - -+libinput:name:*Apple Inc. Apple Internal Keyboard*:dmi:* -+ LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD=1 -+ - ########################################## - # Elantech - ########################################## --- -2.5.0 - diff --git a/libinput.spec b/libinput.spec index 5b96bcf..c180d7a 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.1.4 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.1.5 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,10 +21,6 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 -Patch02: 0001-touchpad-fix-DWT-pairing-for-Macbook-Pro-2015.patch -Patch03: 0001-touchpad-disable-MT-for-elantech-semi-mt-touchpads.patch -Patch04: 0001-touchpad-disable-MT-for-all-semi-mt-devices.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -101,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Jan 25 2016 Peter Hutterer 1.1.5-1 +- libinput 1.1.5 + * Tue Jan 19 2016 Peter Hutterer 1.1.4-3 - disable MT for semi-mt devices to solve the various two- and three-finger issues (at the cost of pinch gestures) (#1295073) diff --git a/sources b/sources index 6f34de7..ef5b0b0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0945318141c1a9f52857bbf65d175f32 libinput-1.1.4.tar.xz +5d730cdb43aadee55145d0cf60430fa3 libinput-1.1.5.tar.xz From b28d349f94800739a2a7166a7fdf6db761e3835e Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 4 Feb 2016 03:20:57 +0000 Subject: [PATCH 063/317] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index c180d7a..126fbd2 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.1.5 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 1.1.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Mon Jan 25 2016 Peter Hutterer 1.1.5-1 - libinput 1.1.5 From 6fadeedb9edff9768e941c34dbb6cbadbb4dcd80 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 4 Feb 2016 14:20:18 +1000 Subject: [PATCH 064/317] Disable the mode button on the Cyborg RAT 5 - Drop touchpad motion hysteresis by default --- ...-the-mode-button-on-the-Cyborg-RAT-5.patch | 308 ++++++++++++++++++ ...ad-drop-motion-hysteresis-by-default.patch | 122 +++++++ libinput.spec | 9 +- 3 files changed, 438 insertions(+), 1 deletion(-) create mode 100644 0001-evdev-disable-the-mode-button-on-the-Cyborg-RAT-5.patch create mode 100644 0001-touchpad-drop-motion-hysteresis-by-default.patch diff --git a/0001-evdev-disable-the-mode-button-on-the-Cyborg-RAT-5.patch b/0001-evdev-disable-the-mode-button-on-the-Cyborg-RAT-5.patch new file mode 100644 index 0000000..89a4f31 --- /dev/null +++ b/0001-evdev-disable-the-mode-button-on-the-Cyborg-RAT-5.patch @@ -0,0 +1,308 @@ +From 456a18ce5e318cc440ef61001b322f9ad90d1810 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 29 Jan 2016 10:09:13 +1000 +Subject: [PATCH libinput] evdev: disable the mode button on the Cyborg RAT 5 + +This button sends a release N, press N+1 on each press, cycling through the +three event codes supported. This causes a stuck button since the current mode +is never released. + +Long-term this better served by a set of switches that toggle accordingly, for +now disable the button codes. + +https://bugs.freedesktop.org/show_bug.cgi?id=92127 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +(cherry picked from commit e19d5d228cbda3ccd0fe1f11948032e12e1ed3c3) +--- + src/evdev.c | 36 +++++++++++++++++ + src/evdev.h | 1 + + test/Makefile.am | 1 + + test/device.c | 33 ++++++++++++++++ + test/litest-device-cyborg-rat-5.c | 71 ++++++++++++++++++++++++++++++++++ + test/litest.c | 2 + + test/litest.h | 1 + + udev/90-libinput-model-quirks.hwdb | 7 ++++ + udev/90-libinput-model-quirks.rules.in | 4 ++ + 9 files changed, 156 insertions(+) + create mode 100644 test/litest-device-cyborg-rat-5.c + +diff --git a/src/evdev.c b/src/evdev.c +index 430d7de..7448103 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1663,6 +1663,7 @@ evdev_read_model_flags(struct evdev_device *device) + { "LIBINPUT_MODEL_JUMPING_SEMI_MT", EVDEV_MODEL_JUMPING_SEMI_MT }, + { "LIBINPUT_MODEL_ELANTECH_TOUCHPAD", EVDEV_MODEL_ELANTECH_TOUCHPAD }, + { "LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD", EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD }, ++ { "LIBINPUT_MODEL_CYBORG_RAT", EVDEV_MODEL_CYBORG_RAT }, + { NULL, EVDEV_MODEL_DEFAULT }, + }; + const struct model_map *m = model_map; +@@ -2215,6 +2216,39 @@ evdev_drain_fd(int fd) + } + } + ++static inline void ++evdev_pre_configure_model_quirks(struct evdev_device *device) ++{ ++ /* The Cyborg RAT has a mode button that cycles through event codes. ++ * On press, we get a release for the current mode and a press for the ++ * next mode: ++ * E: 0.000001 0004 0004 589833 # EV_MSC / MSC_SCAN 589833 ++ * E: 0.000001 0001 0118 0000 # EV_KEY / (null) 0 ++ * E: 0.000001 0004 0004 589834 # EV_MSC / MSC_SCAN 589834 ++ * E: 0.000001 0001 0119 0001 # EV_KEY / (null) 1 ++ * E: 0.000001 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +0ms ++ * E: 0.705000 0004 0004 589834 # EV_MSC / MSC_SCAN 589834 ++ * E: 0.705000 0001 0119 0000 # EV_KEY / (null) 0 ++ * E: 0.705000 0004 0004 589835 # EV_MSC / MSC_SCAN 589835 ++ * E: 0.705000 0001 011a 0001 # EV_KEY / (null) 1 ++ * E: 0.705000 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +705ms ++ * E: 1.496995 0004 0004 589833 # EV_MSC / MSC_SCAN 589833 ++ * E: 1.496995 0001 0118 0001 # EV_KEY / (null) 1 ++ * E: 1.496995 0004 0004 589835 # EV_MSC / MSC_SCAN 589835 ++ * E: 1.496995 0001 011a 0000 # EV_KEY / (null) 0 ++ * E: 1.496995 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +791ms ++ * ++ * https://bugs.freedesktop.org/show_bug.cgi?id=92127 ++ * ++ * Disable the event codes to avoid stuck buttons. ++ */ ++ if(device->model_flags & EVDEV_MODEL_CYBORG_RAT) { ++ libevdev_disable_event_code(device->evdev, EV_KEY, 0x118); ++ libevdev_disable_event_code(device->evdev, EV_KEY, 0x119); ++ libevdev_disable_event_code(device->evdev, EV_KEY, 0x11a); ++ } ++} ++ + struct evdev_device * + evdev_device_create(struct libinput_seat *seat, + struct udev_device *udev_device) +@@ -2284,6 +2318,8 @@ evdev_device_create(struct libinput_seat *seat, + matrix_init_identity(&device->abs.usermatrix); + matrix_init_identity(&device->abs.default_calibration); + ++ evdev_pre_configure_model_quirks(device); ++ + if (evdev_configure_device(device) == -1) + goto err; + +diff --git a/src/evdev.h b/src/evdev.h +index 97177ec..560559a 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -109,6 +109,7 @@ enum evdev_device_model { + EVDEV_MODEL_ELANTECH_TOUCHPAD = (1 << 11), + EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), + EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13), ++ EVDEV_MODEL_CYBORG_RAT = (1 << 14), + }; + + struct mt_slot { +diff --git a/test/Makefile.am b/test/Makefile.am +index 4c394bf..a298284 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -20,6 +20,7 @@ liblitest_la_SOURCES = \ + litest-device-asus-rog-gladius.c \ + litest-device-atmel-hover.c \ + litest-device-bcm5974.c \ ++ litest-device-cyborg-rat-5.c \ + litest-device-elantech-touchpad.c \ + litest-device-generic-singletouch.c \ + litest-device-keyboard.c \ +diff --git a/test/device.c b/test/device.c +index 03659ac..7bd7683 100644 +--- a/test/device.c ++++ b/test/device.c +@@ -1283,6 +1283,38 @@ START_TEST(device_quirks_no_abs_mt_y) + } + END_TEST + ++START_TEST(device_quirks_cyborg_rat_mode_button) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput_device *device = dev->libinput_device; ++ struct libinput *li = dev->libinput; ++ ++ ck_assert(!libinput_device_pointer_has_button(device, 0x118)); ++ ck_assert(!libinput_device_pointer_has_button(device, 0x119)); ++ ck_assert(!libinput_device_pointer_has_button(device, 0x11a)); ++ ++ litest_drain_events(li); ++ ++ litest_event(dev, EV_KEY, 0x118, 0); ++ litest_event(dev, EV_KEY, 0x119, 1); ++ litest_event(dev, EV_SYN, SYN_REPORT, 0); ++ ++ litest_assert_empty_queue(li); ++ ++ litest_event(dev, EV_KEY, 0x119, 0); ++ litest_event(dev, EV_KEY, 0x11a, 1); ++ litest_event(dev, EV_SYN, SYN_REPORT, 0); ++ ++ litest_assert_empty_queue(li); ++ ++ litest_event(dev, EV_KEY, 0x11a, 0); ++ litest_event(dev, EV_KEY, 0x118, 1); ++ litest_event(dev, EV_SYN, SYN_REPORT, 0); ++ ++ litest_assert_empty_queue(li); ++} ++END_TEST ++ + void + litest_setup_tests(void) + { +@@ -1339,4 +1371,5 @@ litest_setup_tests(void) + litest_add_no_device("device:invalid rel events", device_abs_rel); + + litest_add_for_device("device:quirks", device_quirks_no_abs_mt_y, LITEST_ANKER_MOUSE_KBD); ++ litest_add_for_device("device:quirks", device_quirks_cyborg_rat_mode_button, LITEST_CYBORG_RAT); + } +diff --git a/test/litest-device-cyborg-rat-5.c b/test/litest-device-cyborg-rat-5.c +new file mode 100644 +index 0000000..a1db77a +--- /dev/null ++++ b/test/litest-device-cyborg-rat-5.c +@@ -0,0 +1,71 @@ ++/* ++ * Copyright © 2013 Red Hat, Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the next ++ * paragraph) shall be included in all copies or substantial portions of the ++ * Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ++ * DEALINGS IN THE SOFTWARE. ++ */ ++ ++#if HAVE_CONFIG_H ++#include "config.h" ++#endif ++ ++#include "litest.h" ++#include "litest-int.h" ++ ++static void litest_cyborg_rat_setup(void) ++{ ++ struct litest_device *d = litest_create_device(LITEST_CYBORG_RAT); ++ litest_set_current_device(d); ++} ++ ++static struct input_id input_id = { ++ .bustype = 0x3, ++ .vendor = 0x6a3, ++ .product = 0xcd5, ++}; ++ ++static int events[] = { ++ EV_KEY, BTN_LEFT, ++ EV_KEY, BTN_RIGHT, ++ EV_KEY, BTN_MIDDLE, ++ EV_KEY, BTN_SIDE, ++ EV_KEY, BTN_EXTRA, ++ EV_KEY, BTN_FORWARD, ++ EV_KEY, BTN_TASK, ++ EV_KEY, 0x118, ++ EV_KEY, 0x119, ++ EV_KEY, 0x11a, ++ EV_REL, REL_X, ++ EV_REL, REL_Y, ++ EV_REL, REL_WHEEL, ++ -1 , -1, ++}; ++ ++struct litest_test_device litest_cyborg_rat_device = { ++ .type = LITEST_CYBORG_RAT, ++ .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, ++ .shortname = "cyborg_rat", ++ .setup = litest_cyborg_rat_setup, ++ .interface = NULL, ++ ++ .name = "Saitek Cyborg R.A.T.5 Mouse", ++ .id = &input_id, ++ .absinfo = NULL, ++ .events = events, ++}; +diff --git a/test/litest.c b/test/litest.c +index 1551dc7..2cc1a61 100644 +--- a/test/litest.c ++++ b/test/litest.c +@@ -369,6 +369,7 @@ extern struct litest_test_device litest_mouse_gladius_device; + extern struct litest_test_device litest_mouse_wheel_click_angle_device; + extern struct litest_test_device litest_apple_keyboard_device; + extern struct litest_test_device litest_anker_mouse_kbd_device; ++extern struct litest_test_device litest_cyborg_rat_device; + + struct litest_test_device* devices[] = { + &litest_synaptics_clickpad_device, +@@ -404,6 +405,7 @@ struct litest_test_device* devices[] = { + &litest_mouse_wheel_click_angle_device, + &litest_apple_keyboard_device, + &litest_anker_mouse_kbd_device, ++ &litest_cyborg_rat_device, + NULL, + }; + +diff --git a/test/litest.h b/test/litest.h +index 61b1b01..4235d2c 100644 +--- a/test/litest.h ++++ b/test/litest.h +@@ -146,6 +146,7 @@ enum litest_device_type { + LITEST_MOUSE_WHEEL_CLICK_ANGLE = -32, + LITEST_APPLE_KEYBOARD = -33, + LITEST_ANKER_MOUSE_KBD = -34, ++ LITEST_CYBORG_RAT = -41, + }; + + enum litest_device_feature { +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index baebcb3..fa668d6 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -38,6 +38,13 @@ libinput:name:*Apple Inc. Apple Internal Keyboard*:dmi:* + LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD=1 + + ########################################## ++# Cyborg ++########################################## ++# Saitek Cyborg R.A.T.5 Mouse ++libinput:mouse:input:b0003v06A3p0CD5* ++ LIBINPUT_MODEL_CYBORG_RAT=1 ++ ++########################################## + # Elantech + ########################################## + libinput:name:*ETPS/2 Elantech Touchpad*:dmi:* +diff --git a/udev/90-libinput-model-quirks.rules.in b/udev/90-libinput-model-quirks.rules.in +index 5b07726..8bff192 100644 +--- a/udev/90-libinput-model-quirks.rules.in ++++ b/udev/90-libinput-model-quirks.rules.in +@@ -29,6 +29,10 @@ KERNELS=="*input*", \ + ENV{ID_INPUT_TOUCHPAD}=="1", \ + IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=libinput:touchpad:" + ++# libinput:mouse: ++ENV{ID_INPUT_MOUSE}=="1", \ ++ IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=libinput:mouse:" ++ + # libinput:name::dmi: + KERNELS=="input*", \ + IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:$attr{[dmi/id]modalias}'" +-- +2.5.0 diff --git a/0001-touchpad-drop-motion-hysteresis-by-default.patch b/0001-touchpad-drop-motion-hysteresis-by-default.patch new file mode 100644 index 0000000..a2eaa8d --- /dev/null +++ b/0001-touchpad-drop-motion-hysteresis-by-default.patch @@ -0,0 +1,122 @@ +From 6e0553ab5553d63fa737c1739cfa86fbeee9f641 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 29 Jan 2016 16:25:31 +1000 +Subject: [PATCH libinput] touchpad: drop motion hysteresis by default + +Some older touchpad devices jitter a fair bit when a finger is resting on the +touchpad. That's why the hysteresis was introduced in the synaptics driver +back in 2011. However, the default value of the hysteresis in the synaptics +driver ended up being 0, even though the code looks like it's using a fraction +of the touchpad diagonal. When the hysteresis code was ported to libinput it +was eventually set to 0.5mm. + +Turns out this is still too high and tiny finger motions are either +nonreactive or quite jumpy, making it hard to select small targets. Drop the +default hysteresis by reducing its margin to 0, but leave it in place for +those devices where we need them (e.g. the cyapa touchpads). + +https://bugs.freedesktop.org/show_bug.cgi?id=93503 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad.c | 23 ++++++++++++++++++----- + src/evdev.c | 1 + + src/evdev.h | 1 + + udev/90-libinput-model-quirks.hwdb | 3 +++ + 4 files changed, 23 insertions(+), 5 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index f249116..0f72807 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1951,13 +1951,29 @@ tp_init_default_resolution(struct tp_dispatch *tp, + return 0; + } + ++static inline void ++tp_init_hysteresis(struct tp_dispatch *tp) ++{ ++ int res_x, res_y; ++ ++ res_x = tp->device->abs.absinfo_x->resolution; ++ res_y = tp->device->abs.absinfo_y->resolution; ++ ++ if (tp->device->model_flags & EVDEV_MODEL_CYAPA) { ++ tp->hysteresis_margin.x = res_x/2; ++ tp->hysteresis_margin.y = res_y/2; ++ } else { ++ tp->hysteresis_margin.x = 0; ++ tp->hysteresis_margin.y = 0; ++ } ++} ++ + static int + tp_init(struct tp_dispatch *tp, + struct evdev_device *device) + { + int width, height; + double diagonal; +- int res_x, res_y; + + tp->base.interface = &tp_interface; + tp->device = device; +@@ -1971,8 +1987,6 @@ tp_init(struct tp_dispatch *tp, + if (tp_init_slots(tp, device) != 0) + return -1; + +- res_x = tp->device->abs.absinfo_x->resolution; +- res_y = tp->device->abs.absinfo_y->resolution; + width = device->abs.dimensions.x; + height = device->abs.dimensions.y; + diagonal = sqrt(width*width + height*height); +@@ -1981,8 +1995,7 @@ tp_init(struct tp_dispatch *tp, + EV_ABS, + ABS_MT_DISTANCE); + +- tp->hysteresis_margin.x = res_x/2; +- tp->hysteresis_margin.y = res_y/2; ++ tp_init_hysteresis(tp); + + if (tp_init_accel(tp, diagonal) != 0) + return -1; +diff --git a/src/evdev.c b/src/evdev.c +index 66673a8..473ff63 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1678,6 +1678,7 @@ evdev_read_model_flags(struct evdev_device *device) + { "LIBINPUT_MODEL_ELANTECH_TOUCHPAD", EVDEV_MODEL_ELANTECH_TOUCHPAD }, + { "LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD", EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD }, + { "LIBINPUT_MODEL_CYBORG_RAT", EVDEV_MODEL_CYBORG_RAT }, ++ { "LIBINPUT_MODEL_CYAPA", EVDEV_MODEL_CYAPA }, + { NULL, EVDEV_MODEL_DEFAULT }, + }; + const struct model_map *m = model_map; +diff --git a/src/evdev.h b/src/evdev.h +index 8b567a8..b164af8 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -111,6 +111,7 @@ enum evdev_device_model { + EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), + EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13), + EVDEV_MODEL_CYBORG_RAT = (1 << 14), ++ EVDEV_MODEL_CYAPA = (1 << 15), + }; + + struct mt_slot { +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index fa668d6..f23a7f9 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -73,6 +73,9 @@ libinput:name:Cypress APA Trackpad (cyapa):dmi:*svn*SAMSUNG*:pn*Lumpy* + libinput:name:Atmel maXTouch Touchpad:dmi:*svn*GOOGLE*:pn*Samus* + LIBINPUT_MODEL_CHROMEBOOK=1 + ++libinput:name:Cypress APA Trackpad (cyapa):dmi:* ++ LIBINPUT_MODEL_CYAPA=1 ++ + ########################################## + # LENOVO + ########################################## +-- +2.5.0 diff --git a/libinput.spec b/libinput.spec index 126fbd2..5827ba3 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.1.5 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,6 +21,9 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 +Patch02: 0001-evdev-disable-the-mode-button-on-the-Cyborg-RAT-5.patch +Patch03: 0001-touchpad-drop-motion-hysteresis-by-default.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -97,6 +100,10 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Feb 04 2016 Peter Hutterer 1.1.5-3 +- Disable the mode button on the Cyborg RAT 5 +- Drop touchpad motion hysteresis by default + * Thu Feb 04 2016 Fedora Release Engineering - 1.1.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 601a3b6f507daf5016c5a1e956dc72d3ad7bd1ba Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 4 Feb 2016 14:54:39 +1000 Subject: [PATCH 065/317] Fix patches from -3, they got corrupted somehow --- ...-the-mode-button-on-the-Cyborg-RAT-5.patch | 87 ++++++++++--------- ...ad-drop-motion-hysteresis-by-default.patch | 84 +++++++++--------- libinput.spec | 5 +- 3 files changed, 91 insertions(+), 85 deletions(-) diff --git a/0001-evdev-disable-the-mode-button-on-the-Cyborg-RAT-5.patch b/0001-evdev-disable-the-mode-button-on-the-Cyborg-RAT-5.patch index 89a4f31..1d3c1f7 100644 --- a/0001-evdev-disable-the-mode-button-on-the-Cyborg-RAT-5.patch +++ b/0001-evdev-disable-the-mode-button-on-the-Cyborg-RAT-5.patch @@ -33,17 +33,17 @@ index 430d7de..7448103 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1663,6 +1663,7 @@ evdev_read_model_flags(struct evdev_device *device) - { "LIBINPUT_MODEL_JUMPING_SEMI_MT", EVDEV_MODEL_JUMPING_SEMI_MT }, - { "LIBINPUT_MODEL_ELANTECH_TOUCHPAD", EVDEV_MODEL_ELANTECH_TOUCHPAD }, - { "LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD", EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD }, + { "LIBINPUT_MODEL_JUMPING_SEMI_MT", EVDEV_MODEL_JUMPING_SEMI_MT }, + { "LIBINPUT_MODEL_ELANTECH_TOUCHPAD", EVDEV_MODEL_ELANTECH_TOUCHPAD }, + { "LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD", EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD }, + { "LIBINPUT_MODEL_CYBORG_RAT", EVDEV_MODEL_CYBORG_RAT }, - { NULL, EVDEV_MODEL_DEFAULT }, - }; - const struct model_map *m = model_map; + { NULL, EVDEV_MODEL_DEFAULT }, + }; + const struct model_map *m = model_map; @@ -2215,6 +2216,39 @@ evdev_drain_fd(int fd) - } + } } - + +static inline void +evdev_pre_configure_model_quirks(struct evdev_device *device) +{ @@ -79,40 +79,40 @@ index 430d7de..7448103 100644 + struct evdev_device * evdev_device_create(struct libinput_seat *seat, - struct udev_device *udev_device) + struct udev_device *udev_device) @@ -2284,6 +2318,8 @@ evdev_device_create(struct libinput_seat *seat, - matrix_init_identity(&device->abs.usermatrix); - matrix_init_identity(&device->abs.default_calibration); - + matrix_init_identity(&device->abs.usermatrix); + matrix_init_identity(&device->abs.default_calibration); + + evdev_pre_configure_model_quirks(device); + - if (evdev_configure_device(device) == -1) - goto err; - + if (evdev_configure_device(device) == -1) + goto err; + diff --git a/src/evdev.h b/src/evdev.h index 97177ec..560559a 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -109,6 +109,7 @@ enum evdev_device_model { - EVDEV_MODEL_ELANTECH_TOUCHPAD = (1 << 11), - EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), - EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13), + EVDEV_MODEL_ELANTECH_TOUCHPAD = (1 << 11), + EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), + EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13), + EVDEV_MODEL_CYBORG_RAT = (1 << 14), }; - + struct mt_slot { diff --git a/test/Makefile.am b/test/Makefile.am index 4c394bf..a298284 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -20,6 +20,7 @@ liblitest_la_SOURCES = \ - litest-device-asus-rog-gladius.c \ - litest-device-atmel-hover.c \ - litest-device-bcm5974.c \ + litest-device-asus-rog-gladius.c \ + litest-device-atmel-hover.c \ + litest-device-bcm5974.c \ + litest-device-cyborg-rat-5.c \ - litest-device-elantech-touchpad.c \ - litest-device-generic-singletouch.c \ - litest-device-keyboard.c \ + litest-device-elantech-touchpad.c \ + litest-device-generic-singletouch.c \ + litest-device-keyboard.c \ diff --git a/test/device.c b/test/device.c index 03659ac..7bd7683 100644 --- a/test/device.c @@ -120,7 +120,7 @@ index 03659ac..7bd7683 100644 @@ -1283,6 +1283,38 @@ START_TEST(device_quirks_no_abs_mt_y) } END_TEST - + +START_TEST(device_quirks_cyborg_rat_mode_button) +{ + struct litest_device *dev = litest_current_device(); @@ -157,9 +157,9 @@ index 03659ac..7bd7683 100644 litest_setup_tests(void) { @@ -1339,4 +1371,5 @@ litest_setup_tests(void) - litest_add_no_device("device:invalid rel events", device_abs_rel); - - litest_add_for_device("device:quirks", device_quirks_no_abs_mt_y, LITEST_ANKER_MOUSE_KBD); + litest_add_no_device("device:invalid rel events", device_abs_rel); + + litest_add_for_device("device:quirks", device_quirks_no_abs_mt_y, LITEST_ANKER_MOUSE_KBD); + litest_add_for_device("device:quirks", device_quirks_cyborg_rat_mode_button, LITEST_CYBORG_RAT); } diff --git a/test/litest-device-cyborg-rat-5.c b/test/litest-device-cyborg-rat-5.c @@ -248,28 +248,28 @@ index 1551dc7..2cc1a61 100644 extern struct litest_test_device litest_apple_keyboard_device; extern struct litest_test_device litest_anker_mouse_kbd_device; +extern struct litest_test_device litest_cyborg_rat_device; - + struct litest_test_device* devices[] = { - &litest_synaptics_clickpad_device, + &litest_synaptics_clickpad_device, @@ -404,6 +405,7 @@ struct litest_test_device* devices[] = { - &litest_mouse_wheel_click_angle_device, - &litest_apple_keyboard_device, - &litest_anker_mouse_kbd_device, + &litest_mouse_wheel_click_angle_device, + &litest_apple_keyboard_device, + &litest_anker_mouse_kbd_device, + &litest_cyborg_rat_device, - NULL, + NULL, }; - + diff --git a/test/litest.h b/test/litest.h index 61b1b01..4235d2c 100644 --- a/test/litest.h +++ b/test/litest.h @@ -146,6 +146,7 @@ enum litest_device_type { - LITEST_MOUSE_WHEEL_CLICK_ANGLE = -32, - LITEST_APPLE_KEYBOARD = -33, - LITEST_ANKER_MOUSE_KBD = -34, + LITEST_MOUSE_WHEEL_CLICK_ANGLE = -32, + LITEST_APPLE_KEYBOARD = -33, + LITEST_ANKER_MOUSE_KBD = -34, + LITEST_CYBORG_RAT = -41, }; - + enum litest_device_feature { diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index baebcb3..fa668d6 100644 @@ -277,7 +277,7 @@ index baebcb3..fa668d6 100644 +++ b/udev/90-libinput-model-quirks.hwdb @@ -38,6 +38,13 @@ libinput:name:*Apple Inc. Apple Internal Keyboard*:dmi:* LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD=1 - + ########################################## +# Cyborg +########################################## @@ -296,7 +296,7 @@ index 5b07726..8bff192 100644 @@ -29,6 +29,10 @@ KERNELS=="*input*", \ ENV{ID_INPUT_TOUCHPAD}=="1", \ IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=libinput:touchpad:" - + +# libinput:mouse: +ENV{ID_INPUT_MOUSE}=="1", \ + IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=libinput:mouse:" @@ -304,5 +304,6 @@ index 5b07726..8bff192 100644 # libinput:name::dmi: KERNELS=="input*", \ IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:$attr{[dmi/id]modalias}'" --- +-- 2.5.0 + diff --git a/0001-touchpad-drop-motion-hysteresis-by-default.patch b/0001-touchpad-drop-motion-hysteresis-by-default.patch index a2eaa8d..11c0e59 100644 --- a/0001-touchpad-drop-motion-hysteresis-by-default.patch +++ b/0001-touchpad-drop-motion-hysteresis-by-default.patch @@ -1,4 +1,4 @@ -From 6e0553ab5553d63fa737c1739cfa86fbeee9f641 Mon Sep 17 00:00:00 2001 +From c6381801cf4dcc29ac13b6f52938f9e4a5f0b219 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 29 Jan 2016 16:25:31 +1000 Subject: [PATCH libinput] touchpad: drop motion hysteresis by default @@ -19,6 +19,7 @@ https://bugs.freedesktop.org/show_bug.cgi?id=93503 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede +(cherry picked from commit 6e0553ab5553d63fa737c1739cfa86fbeee9f641) --- src/evdev-mt-touchpad.c | 23 ++++++++++++++++++----- src/evdev.c | 1 + @@ -27,13 +28,13 @@ Reviewed-by: Hans de Goede 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index f249116..0f72807 100644 +index db8aa1d..23b7419 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c -@@ -1951,13 +1951,29 @@ tp_init_default_resolution(struct tp_dispatch *tp, - return 0; +@@ -1940,13 +1940,29 @@ tp_init_default_resolution(struct tp_dispatch *tp, + return 0; } - + +static inline void +tp_init_hysteresis(struct tp_dispatch *tp) +{ @@ -53,56 +54,56 @@ index f249116..0f72807 100644 + static int tp_init(struct tp_dispatch *tp, - struct evdev_device *device) + struct evdev_device *device) { - int width, height; - double diagonal; + int width, height; + double diagonal; - int res_x, res_y; - - tp->base.interface = &tp_interface; - tp->device = device; -@@ -1971,8 +1987,6 @@ tp_init(struct tp_dispatch *tp, - if (tp_init_slots(tp, device) != 0) - return -1; - + + tp->base.interface = &tp_interface; + tp->device = device; +@@ -1960,8 +1976,6 @@ tp_init(struct tp_dispatch *tp, + if (tp_init_slots(tp, device) != 0) + return -1; + - res_x = tp->device->abs.absinfo_x->resolution; - res_y = tp->device->abs.absinfo_y->resolution; - width = device->abs.dimensions.x; - height = device->abs.dimensions.y; - diagonal = sqrt(width*width + height*height); -@@ -1981,8 +1995,7 @@ tp_init(struct tp_dispatch *tp, - EV_ABS, - ABS_MT_DISTANCE); - + width = device->abs.dimensions.x; + height = device->abs.dimensions.y; + diagonal = sqrt(width*width + height*height); +@@ -1970,8 +1984,7 @@ tp_init(struct tp_dispatch *tp, + EV_ABS, + ABS_MT_DISTANCE); + - tp->hysteresis_margin.x = res_x/2; - tp->hysteresis_margin.y = res_y/2; + tp_init_hysteresis(tp); - - if (tp_init_accel(tp, diagonal) != 0) - return -1; + + if (tp_init_accel(tp, diagonal) != 0) + return -1; diff --git a/src/evdev.c b/src/evdev.c -index 66673a8..473ff63 100644 +index 7448103..281a2a0 100644 --- a/src/evdev.c +++ b/src/evdev.c -@@ -1678,6 +1678,7 @@ evdev_read_model_flags(struct evdev_device *device) - { "LIBINPUT_MODEL_ELANTECH_TOUCHPAD", EVDEV_MODEL_ELANTECH_TOUCHPAD }, - { "LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD", EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD }, - { "LIBINPUT_MODEL_CYBORG_RAT", EVDEV_MODEL_CYBORG_RAT }, +@@ -1664,6 +1664,7 @@ evdev_read_model_flags(struct evdev_device *device) + { "LIBINPUT_MODEL_ELANTECH_TOUCHPAD", EVDEV_MODEL_ELANTECH_TOUCHPAD }, + { "LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD", EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD }, + { "LIBINPUT_MODEL_CYBORG_RAT", EVDEV_MODEL_CYBORG_RAT }, + { "LIBINPUT_MODEL_CYAPA", EVDEV_MODEL_CYAPA }, - { NULL, EVDEV_MODEL_DEFAULT }, - }; - const struct model_map *m = model_map; + { NULL, EVDEV_MODEL_DEFAULT }, + }; + const struct model_map *m = model_map; diff --git a/src/evdev.h b/src/evdev.h -index 8b567a8..b164af8 100644 +index 560559a..96bf621 100644 --- a/src/evdev.h +++ b/src/evdev.h -@@ -111,6 +111,7 @@ enum evdev_device_model { - EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), - EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13), - EVDEV_MODEL_CYBORG_RAT = (1 << 14), +@@ -110,6 +110,7 @@ enum evdev_device_model { + EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), + EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13), + EVDEV_MODEL_CYBORG_RAT = (1 << 14), + EVDEV_MODEL_CYAPA = (1 << 15), }; - + struct mt_slot { diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index fa668d6..f23a7f9 100644 @@ -111,12 +112,13 @@ index fa668d6..f23a7f9 100644 @@ -73,6 +73,9 @@ libinput:name:Cypress APA Trackpad (cyapa):dmi:*svn*SAMSUNG*:pn*Lumpy* libinput:name:Atmel maXTouch Touchpad:dmi:*svn*GOOGLE*:pn*Samus* LIBINPUT_MODEL_CHROMEBOOK=1 - + +libinput:name:Cypress APA Trackpad (cyapa):dmi:* + LIBINPUT_MODEL_CYAPA=1 + ########################################## # LENOVO ########################################## --- +-- 2.5.0 + diff --git a/libinput.spec b/libinput.spec index 5827ba3..c9d5e05 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.1.5 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -100,6 +100,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Feb 04 2016 Peter Hutterer 1.1.5-4 +- Fix patches from -3, they got corrupted somehow + * Thu Feb 04 2016 Peter Hutterer 1.1.5-3 - Disable the mode button on the Cyborg RAT 5 - Drop touchpad motion hysteresis by default From 86b46e74c5fe27911c0fa8ece578d248845c9384 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 5 Feb 2016 16:27:50 +1000 Subject: [PATCH 066/317] libinput 1.1.6 --- .gitignore | 1 + ...-the-mode-button-on-the-Cyborg-RAT-5.patch | 309 ------------------ ...ad-drop-motion-hysteresis-by-default.patch | 124 ------- libinput.spec | 10 +- sources | 2 +- 5 files changed, 7 insertions(+), 439 deletions(-) delete mode 100644 0001-evdev-disable-the-mode-button-on-the-Cyborg-RAT-5.patch delete mode 100644 0001-touchpad-drop-motion-hysteresis-by-default.patch diff --git a/.gitignore b/.gitignore index 4b2b4d7..9a76206 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ /libinput-1.1.3.tar.xz /libinput-1.1.4.tar.xz /libinput-1.1.5.tar.xz +/libinput-1.1.6.tar.xz diff --git a/0001-evdev-disable-the-mode-button-on-the-Cyborg-RAT-5.patch b/0001-evdev-disable-the-mode-button-on-the-Cyborg-RAT-5.patch deleted file mode 100644 index 1d3c1f7..0000000 --- a/0001-evdev-disable-the-mode-button-on-the-Cyborg-RAT-5.patch +++ /dev/null @@ -1,309 +0,0 @@ -From 456a18ce5e318cc440ef61001b322f9ad90d1810 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 29 Jan 2016 10:09:13 +1000 -Subject: [PATCH libinput] evdev: disable the mode button on the Cyborg RAT 5 - -This button sends a release N, press N+1 on each press, cycling through the -three event codes supported. This causes a stuck button since the current mode -is never released. - -Long-term this better served by a set of switches that toggle accordingly, for -now disable the button codes. - -https://bugs.freedesktop.org/show_bug.cgi?id=92127 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -(cherry picked from commit e19d5d228cbda3ccd0fe1f11948032e12e1ed3c3) ---- - src/evdev.c | 36 +++++++++++++++++ - src/evdev.h | 1 + - test/Makefile.am | 1 + - test/device.c | 33 ++++++++++++++++ - test/litest-device-cyborg-rat-5.c | 71 ++++++++++++++++++++++++++++++++++ - test/litest.c | 2 + - test/litest.h | 1 + - udev/90-libinput-model-quirks.hwdb | 7 ++++ - udev/90-libinput-model-quirks.rules.in | 4 ++ - 9 files changed, 156 insertions(+) - create mode 100644 test/litest-device-cyborg-rat-5.c - -diff --git a/src/evdev.c b/src/evdev.c -index 430d7de..7448103 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1663,6 +1663,7 @@ evdev_read_model_flags(struct evdev_device *device) - { "LIBINPUT_MODEL_JUMPING_SEMI_MT", EVDEV_MODEL_JUMPING_SEMI_MT }, - { "LIBINPUT_MODEL_ELANTECH_TOUCHPAD", EVDEV_MODEL_ELANTECH_TOUCHPAD }, - { "LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD", EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD }, -+ { "LIBINPUT_MODEL_CYBORG_RAT", EVDEV_MODEL_CYBORG_RAT }, - { NULL, EVDEV_MODEL_DEFAULT }, - }; - const struct model_map *m = model_map; -@@ -2215,6 +2216,39 @@ evdev_drain_fd(int fd) - } - } - -+static inline void -+evdev_pre_configure_model_quirks(struct evdev_device *device) -+{ -+ /* The Cyborg RAT has a mode button that cycles through event codes. -+ * On press, we get a release for the current mode and a press for the -+ * next mode: -+ * E: 0.000001 0004 0004 589833 # EV_MSC / MSC_SCAN 589833 -+ * E: 0.000001 0001 0118 0000 # EV_KEY / (null) 0 -+ * E: 0.000001 0004 0004 589834 # EV_MSC / MSC_SCAN 589834 -+ * E: 0.000001 0001 0119 0001 # EV_KEY / (null) 1 -+ * E: 0.000001 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +0ms -+ * E: 0.705000 0004 0004 589834 # EV_MSC / MSC_SCAN 589834 -+ * E: 0.705000 0001 0119 0000 # EV_KEY / (null) 0 -+ * E: 0.705000 0004 0004 589835 # EV_MSC / MSC_SCAN 589835 -+ * E: 0.705000 0001 011a 0001 # EV_KEY / (null) 1 -+ * E: 0.705000 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +705ms -+ * E: 1.496995 0004 0004 589833 # EV_MSC / MSC_SCAN 589833 -+ * E: 1.496995 0001 0118 0001 # EV_KEY / (null) 1 -+ * E: 1.496995 0004 0004 589835 # EV_MSC / MSC_SCAN 589835 -+ * E: 1.496995 0001 011a 0000 # EV_KEY / (null) 0 -+ * E: 1.496995 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +791ms -+ * -+ * https://bugs.freedesktop.org/show_bug.cgi?id=92127 -+ * -+ * Disable the event codes to avoid stuck buttons. -+ */ -+ if(device->model_flags & EVDEV_MODEL_CYBORG_RAT) { -+ libevdev_disable_event_code(device->evdev, EV_KEY, 0x118); -+ libevdev_disable_event_code(device->evdev, EV_KEY, 0x119); -+ libevdev_disable_event_code(device->evdev, EV_KEY, 0x11a); -+ } -+} -+ - struct evdev_device * - evdev_device_create(struct libinput_seat *seat, - struct udev_device *udev_device) -@@ -2284,6 +2318,8 @@ evdev_device_create(struct libinput_seat *seat, - matrix_init_identity(&device->abs.usermatrix); - matrix_init_identity(&device->abs.default_calibration); - -+ evdev_pre_configure_model_quirks(device); -+ - if (evdev_configure_device(device) == -1) - goto err; - -diff --git a/src/evdev.h b/src/evdev.h -index 97177ec..560559a 100644 ---- a/src/evdev.h -+++ b/src/evdev.h -@@ -109,6 +109,7 @@ enum evdev_device_model { - EVDEV_MODEL_ELANTECH_TOUCHPAD = (1 << 11), - EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), - EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13), -+ EVDEV_MODEL_CYBORG_RAT = (1 << 14), - }; - - struct mt_slot { -diff --git a/test/Makefile.am b/test/Makefile.am -index 4c394bf..a298284 100644 ---- a/test/Makefile.am -+++ b/test/Makefile.am -@@ -20,6 +20,7 @@ liblitest_la_SOURCES = \ - litest-device-asus-rog-gladius.c \ - litest-device-atmel-hover.c \ - litest-device-bcm5974.c \ -+ litest-device-cyborg-rat-5.c \ - litest-device-elantech-touchpad.c \ - litest-device-generic-singletouch.c \ - litest-device-keyboard.c \ -diff --git a/test/device.c b/test/device.c -index 03659ac..7bd7683 100644 ---- a/test/device.c -+++ b/test/device.c -@@ -1283,6 +1283,38 @@ START_TEST(device_quirks_no_abs_mt_y) - } - END_TEST - -+START_TEST(device_quirks_cyborg_rat_mode_button) -+{ -+ struct litest_device *dev = litest_current_device(); -+ struct libinput_device *device = dev->libinput_device; -+ struct libinput *li = dev->libinput; -+ -+ ck_assert(!libinput_device_pointer_has_button(device, 0x118)); -+ ck_assert(!libinput_device_pointer_has_button(device, 0x119)); -+ ck_assert(!libinput_device_pointer_has_button(device, 0x11a)); -+ -+ litest_drain_events(li); -+ -+ litest_event(dev, EV_KEY, 0x118, 0); -+ litest_event(dev, EV_KEY, 0x119, 1); -+ litest_event(dev, EV_SYN, SYN_REPORT, 0); -+ -+ litest_assert_empty_queue(li); -+ -+ litest_event(dev, EV_KEY, 0x119, 0); -+ litest_event(dev, EV_KEY, 0x11a, 1); -+ litest_event(dev, EV_SYN, SYN_REPORT, 0); -+ -+ litest_assert_empty_queue(li); -+ -+ litest_event(dev, EV_KEY, 0x11a, 0); -+ litest_event(dev, EV_KEY, 0x118, 1); -+ litest_event(dev, EV_SYN, SYN_REPORT, 0); -+ -+ litest_assert_empty_queue(li); -+} -+END_TEST -+ - void - litest_setup_tests(void) - { -@@ -1339,4 +1371,5 @@ litest_setup_tests(void) - litest_add_no_device("device:invalid rel events", device_abs_rel); - - litest_add_for_device("device:quirks", device_quirks_no_abs_mt_y, LITEST_ANKER_MOUSE_KBD); -+ litest_add_for_device("device:quirks", device_quirks_cyborg_rat_mode_button, LITEST_CYBORG_RAT); - } -diff --git a/test/litest-device-cyborg-rat-5.c b/test/litest-device-cyborg-rat-5.c -new file mode 100644 -index 0000000..a1db77a ---- /dev/null -+++ b/test/litest-device-cyborg-rat-5.c -@@ -0,0 +1,71 @@ -+/* -+ * Copyright © 2013 Red Hat, Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the next -+ * paragraph) shall be included in all copies or substantial portions of the -+ * Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+ * DEALINGS IN THE SOFTWARE. -+ */ -+ -+#if HAVE_CONFIG_H -+#include "config.h" -+#endif -+ -+#include "litest.h" -+#include "litest-int.h" -+ -+static void litest_cyborg_rat_setup(void) -+{ -+ struct litest_device *d = litest_create_device(LITEST_CYBORG_RAT); -+ litest_set_current_device(d); -+} -+ -+static struct input_id input_id = { -+ .bustype = 0x3, -+ .vendor = 0x6a3, -+ .product = 0xcd5, -+}; -+ -+static int events[] = { -+ EV_KEY, BTN_LEFT, -+ EV_KEY, BTN_RIGHT, -+ EV_KEY, BTN_MIDDLE, -+ EV_KEY, BTN_SIDE, -+ EV_KEY, BTN_EXTRA, -+ EV_KEY, BTN_FORWARD, -+ EV_KEY, BTN_TASK, -+ EV_KEY, 0x118, -+ EV_KEY, 0x119, -+ EV_KEY, 0x11a, -+ EV_REL, REL_X, -+ EV_REL, REL_Y, -+ EV_REL, REL_WHEEL, -+ -1 , -1, -+}; -+ -+struct litest_test_device litest_cyborg_rat_device = { -+ .type = LITEST_CYBORG_RAT, -+ .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, -+ .shortname = "cyborg_rat", -+ .setup = litest_cyborg_rat_setup, -+ .interface = NULL, -+ -+ .name = "Saitek Cyborg R.A.T.5 Mouse", -+ .id = &input_id, -+ .absinfo = NULL, -+ .events = events, -+}; -diff --git a/test/litest.c b/test/litest.c -index 1551dc7..2cc1a61 100644 ---- a/test/litest.c -+++ b/test/litest.c -@@ -369,6 +369,7 @@ extern struct litest_test_device litest_mouse_gladius_device; - extern struct litest_test_device litest_mouse_wheel_click_angle_device; - extern struct litest_test_device litest_apple_keyboard_device; - extern struct litest_test_device litest_anker_mouse_kbd_device; -+extern struct litest_test_device litest_cyborg_rat_device; - - struct litest_test_device* devices[] = { - &litest_synaptics_clickpad_device, -@@ -404,6 +405,7 @@ struct litest_test_device* devices[] = { - &litest_mouse_wheel_click_angle_device, - &litest_apple_keyboard_device, - &litest_anker_mouse_kbd_device, -+ &litest_cyborg_rat_device, - NULL, - }; - -diff --git a/test/litest.h b/test/litest.h -index 61b1b01..4235d2c 100644 ---- a/test/litest.h -+++ b/test/litest.h -@@ -146,6 +146,7 @@ enum litest_device_type { - LITEST_MOUSE_WHEEL_CLICK_ANGLE = -32, - LITEST_APPLE_KEYBOARD = -33, - LITEST_ANKER_MOUSE_KBD = -34, -+ LITEST_CYBORG_RAT = -41, - }; - - enum litest_device_feature { -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index baebcb3..fa668d6 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -38,6 +38,13 @@ libinput:name:*Apple Inc. Apple Internal Keyboard*:dmi:* - LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD=1 - - ########################################## -+# Cyborg -+########################################## -+# Saitek Cyborg R.A.T.5 Mouse -+libinput:mouse:input:b0003v06A3p0CD5* -+ LIBINPUT_MODEL_CYBORG_RAT=1 -+ -+########################################## - # Elantech - ########################################## - libinput:name:*ETPS/2 Elantech Touchpad*:dmi:* -diff --git a/udev/90-libinput-model-quirks.rules.in b/udev/90-libinput-model-quirks.rules.in -index 5b07726..8bff192 100644 ---- a/udev/90-libinput-model-quirks.rules.in -+++ b/udev/90-libinput-model-quirks.rules.in -@@ -29,6 +29,10 @@ KERNELS=="*input*", \ - ENV{ID_INPUT_TOUCHPAD}=="1", \ - IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=libinput:touchpad:" - -+# libinput:mouse: -+ENV{ID_INPUT_MOUSE}=="1", \ -+ IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=libinput:mouse:" -+ - # libinput:name::dmi: - KERNELS=="input*", \ - IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:$attr{[dmi/id]modalias}'" --- -2.5.0 - diff --git a/0001-touchpad-drop-motion-hysteresis-by-default.patch b/0001-touchpad-drop-motion-hysteresis-by-default.patch deleted file mode 100644 index 11c0e59..0000000 --- a/0001-touchpad-drop-motion-hysteresis-by-default.patch +++ /dev/null @@ -1,124 +0,0 @@ -From c6381801cf4dcc29ac13b6f52938f9e4a5f0b219 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 29 Jan 2016 16:25:31 +1000 -Subject: [PATCH libinput] touchpad: drop motion hysteresis by default - -Some older touchpad devices jitter a fair bit when a finger is resting on the -touchpad. That's why the hysteresis was introduced in the synaptics driver -back in 2011. However, the default value of the hysteresis in the synaptics -driver ended up being 0, even though the code looks like it's using a fraction -of the touchpad diagonal. When the hysteresis code was ported to libinput it -was eventually set to 0.5mm. - -Turns out this is still too high and tiny finger motions are either -nonreactive or quite jumpy, making it hard to select small targets. Drop the -default hysteresis by reducing its margin to 0, but leave it in place for -those devices where we need them (e.g. the cyapa touchpads). - -https://bugs.freedesktop.org/show_bug.cgi?id=93503 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -(cherry picked from commit 6e0553ab5553d63fa737c1739cfa86fbeee9f641) ---- - src/evdev-mt-touchpad.c | 23 ++++++++++++++++++----- - src/evdev.c | 1 + - src/evdev.h | 1 + - udev/90-libinput-model-quirks.hwdb | 3 +++ - 4 files changed, 23 insertions(+), 5 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index db8aa1d..23b7419 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -1940,13 +1940,29 @@ tp_init_default_resolution(struct tp_dispatch *tp, - return 0; - } - -+static inline void -+tp_init_hysteresis(struct tp_dispatch *tp) -+{ -+ int res_x, res_y; -+ -+ res_x = tp->device->abs.absinfo_x->resolution; -+ res_y = tp->device->abs.absinfo_y->resolution; -+ -+ if (tp->device->model_flags & EVDEV_MODEL_CYAPA) { -+ tp->hysteresis_margin.x = res_x/2; -+ tp->hysteresis_margin.y = res_y/2; -+ } else { -+ tp->hysteresis_margin.x = 0; -+ tp->hysteresis_margin.y = 0; -+ } -+} -+ - static int - tp_init(struct tp_dispatch *tp, - struct evdev_device *device) - { - int width, height; - double diagonal; -- int res_x, res_y; - - tp->base.interface = &tp_interface; - tp->device = device; -@@ -1960,8 +1976,6 @@ tp_init(struct tp_dispatch *tp, - if (tp_init_slots(tp, device) != 0) - return -1; - -- res_x = tp->device->abs.absinfo_x->resolution; -- res_y = tp->device->abs.absinfo_y->resolution; - width = device->abs.dimensions.x; - height = device->abs.dimensions.y; - diagonal = sqrt(width*width + height*height); -@@ -1970,8 +1984,7 @@ tp_init(struct tp_dispatch *tp, - EV_ABS, - ABS_MT_DISTANCE); - -- tp->hysteresis_margin.x = res_x/2; -- tp->hysteresis_margin.y = res_y/2; -+ tp_init_hysteresis(tp); - - if (tp_init_accel(tp, diagonal) != 0) - return -1; -diff --git a/src/evdev.c b/src/evdev.c -index 7448103..281a2a0 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1664,6 +1664,7 @@ evdev_read_model_flags(struct evdev_device *device) - { "LIBINPUT_MODEL_ELANTECH_TOUCHPAD", EVDEV_MODEL_ELANTECH_TOUCHPAD }, - { "LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD", EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD }, - { "LIBINPUT_MODEL_CYBORG_RAT", EVDEV_MODEL_CYBORG_RAT }, -+ { "LIBINPUT_MODEL_CYAPA", EVDEV_MODEL_CYAPA }, - { NULL, EVDEV_MODEL_DEFAULT }, - }; - const struct model_map *m = model_map; -diff --git a/src/evdev.h b/src/evdev.h -index 560559a..96bf621 100644 ---- a/src/evdev.h -+++ b/src/evdev.h -@@ -110,6 +110,7 @@ enum evdev_device_model { - EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), - EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13), - EVDEV_MODEL_CYBORG_RAT = (1 << 14), -+ EVDEV_MODEL_CYAPA = (1 << 15), - }; - - struct mt_slot { -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index fa668d6..f23a7f9 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -73,6 +73,9 @@ libinput:name:Cypress APA Trackpad (cyapa):dmi:*svn*SAMSUNG*:pn*Lumpy* - libinput:name:Atmel maXTouch Touchpad:dmi:*svn*GOOGLE*:pn*Samus* - LIBINPUT_MODEL_CHROMEBOOK=1 - -+libinput:name:Cypress APA Trackpad (cyapa):dmi:* -+ LIBINPUT_MODEL_CYAPA=1 -+ - ########################################## - # LENOVO - ########################################## --- -2.5.0 - diff --git a/libinput.spec b/libinput.spec index c9d5e05..42dc823 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.1.5 -Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.1.6 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,9 +21,6 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 -Patch02: 0001-evdev-disable-the-mode-button-on-the-Cyborg-RAT-5.patch -Patch03: 0001-touchpad-drop-motion-hysteresis-by-default.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -100,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Feb 05 2016 Peter Hutterer 1.1.6-1 +- libinput 1.1.6 + * Thu Feb 04 2016 Peter Hutterer 1.1.5-4 - Fix patches from -3, they got corrupted somehow diff --git a/sources b/sources index ef5b0b0..f73ee05 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5d730cdb43aadee55145d0cf60430fa3 libinput-1.1.5.tar.xz +7ae03d6c4176537cb588b8d2a23cb297 libinput-1.1.6.tar.xz From 6c52c64c45fe7ce3531401be027b2623afb50f0c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 10 Feb 2016 11:14:07 +1000 Subject: [PATCH 067/317] libinput 1.1.7 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9a76206..d3a5b6f 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ /libinput-1.1.4.tar.xz /libinput-1.1.5.tar.xz /libinput-1.1.6.tar.xz +/libinput-1.1.7.tar.xz diff --git a/libinput.spec b/libinput.spec index 42dc823..8f15c3a 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.1.6 +Version: 1.1.7 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Feb 10 2016 Peter Hutterer 1.1.7-1 +- libinput 1.1.7 + * Fri Feb 05 2016 Peter Hutterer 1.1.6-1 - libinput 1.1.6 diff --git a/sources b/sources index f73ee05..360d317 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7ae03d6c4176537cb588b8d2a23cb297 libinput-1.1.6.tar.xz +a501715a6135ac1f772bb5f3e3183481 libinput-1.1.7.tar.xz From 9f6fadb47416bf0779795155ec11da7dbfb5fd57 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 15 Feb 2016 17:49:43 +1000 Subject: [PATCH 068/317] libinput 1.2rc2 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d3a5b6f..7f910ee 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ /libinput-1.1.5.tar.xz /libinput-1.1.6.tar.xz /libinput-1.1.7.tar.xz +/libinput-1.1.902.tar.xz diff --git a/libinput.spec b/libinput.spec index 8f15c3a..1cab0d8 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.1.7 +Version: 1.1.902 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Feb 15 2016 Peter Hutterer 1.1.902-1 +- libinput 1.2rc2 + * Wed Feb 10 2016 Peter Hutterer 1.1.7-1 - libinput 1.1.7 diff --git a/sources b/sources index 360d317..dfb93e9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a501715a6135ac1f772bb5f3e3183481 libinput-1.1.7.tar.xz +555c800e0bcadfb85f1ec7ea8d182133 libinput-1.1.902.tar.xz From 75fce7f19699ce79d5a380fd8ee7925aea6fa050 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 15 Feb 2016 19:03:23 +1000 Subject: [PATCH 069/317] Add libwacom-devel to BuildRequires --- libinput.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 1cab0d8..48374c2 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.1.902 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -25,7 +25,7 @@ BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel BuildRequires: libudev-devel -BuildRequires: mtdev-devel +BuildRequires: mtdev-devel libwacom-devel BuildRequires: pkgconfig(udev) %description @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Feb 15 2016 Peter Hutterer 1.1.902-2 +- Add libwacom-devel to BuildRequires + * Mon Feb 15 2016 Peter Hutterer 1.1.902-1 - libinput 1.2rc2 From 6233238d868a1ce3e5456c0fb7c2e61e32708efb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 23 Feb 2016 17:07:59 +1000 Subject: [PATCH 070/317] libinput 1.2.0 --- .gitignore | 1 + libinput.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7f910ee..4106faa 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ /libinput-1.1.6.tar.xz /libinput-1.1.7.tar.xz /libinput-1.1.902.tar.xz +/libinput-1.2.0.tar.xz diff --git a/libinput.spec b/libinput.spec index 48374c2..fdd9233 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.1.902 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.2.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Feb 23 2016 Peter Hutterer 1.2.0-1 +- libinput 1.2.0 + * Mon Feb 15 2016 Peter Hutterer 1.1.902-2 - Add libwacom-devel to BuildRequires diff --git a/sources b/sources index dfb93e9..dcfac41 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -555c800e0bcadfb85f1ec7ea8d182133 libinput-1.1.902.tar.xz +2f6376a44be87fe691b2bf11e51d247a libinput-1.2.0.tar.xz From 6b7c613630ba26bc8f15f3629d6345e22e4c43a6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 29 Feb 2016 08:48:57 +1000 Subject: [PATCH 071/317] libinput 1.2.1 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4106faa..54c8a84 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ /libinput-1.1.7.tar.xz /libinput-1.1.902.tar.xz /libinput-1.2.0.tar.xz +/libinput-1.2.1.tar.xz diff --git a/libinput.spec b/libinput.spec index fdd9233..966d157 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.2.0 +Version: 1.2.1 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Feb 29 2016 Peter Hutterer 1.2.1-1 +- libinput 1.2.1 + * Tue Feb 23 2016 Peter Hutterer 1.2.0-1 - libinput 1.2.0 diff --git a/sources b/sources index dcfac41..5e3e22f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2f6376a44be87fe691b2bf11e51d247a libinput-1.2.0.tar.xz +2b36d32362111c3e99f19c83bc535332 libinput-1.2.1.tar.xz From 574d94817ffeeca6f81052d0a582013ba895a7db Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 2 Mar 2016 08:00:22 +1000 Subject: [PATCH 072/317] Bump to maintain upgrade path with F23 --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 966d157..a233be5 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.2.1 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Mar 02 2016 Peter Hutterer 1.2.1-2 +- Bump to maintain upgrade path with F23 + * Mon Feb 29 2016 Peter Hutterer 1.2.1-1 - libinput 1.2.1 From 8aef13c5a5b12c46b681a46a98fb146316b72ba7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 7 Mar 2016 10:19:22 +1000 Subject: [PATCH 073/317] Fix segfault on mislabeled tablets (#1314955) --- ...et-reject-mislabelled-tablet-devices.patch | 66 +++++++++++++++++++ libinput.spec | 8 ++- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 0001-tablet-reject-mislabelled-tablet-devices.patch diff --git a/0001-tablet-reject-mislabelled-tablet-devices.patch b/0001-tablet-reject-mislabelled-tablet-devices.patch new file mode 100644 index 0000000..f8e7071 --- /dev/null +++ b/0001-tablet-reject-mislabelled-tablet-devices.patch @@ -0,0 +1,66 @@ +From 821ac1f9d5ea1267ea125c67e7652c8cc14e9cb3 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 7 Mar 2016 10:12:13 +1000 +Subject: [PATCH libinput] tablet: reject mislabelled tablet devices + +The HUION 580 has a "consumer control" event node that has an ABS_VOLUME, keys +and a REL_HWHEEL. It has the same VID/PID as the pen tablet and libwacom +labels it as ID_INPUT_TABLET. This causes a crash later when we try to init +pointer acceleration for a device that doesn't have axes. + +https://bugzilla.redhat.com/show_bug.cgi?id=1314955 + +Signed-off-by: Peter Hutterer +--- + src/evdev-tablet.c | 28 ++++++++++++++++++++++++++++ + 1 file changed, 28 insertions(+) + +diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c +index 0f6fa2c..9fc38aa 100644 +--- a/src/evdev-tablet.c ++++ b/src/evdev-tablet.c +@@ -1613,6 +1613,31 @@ tablet_init_left_handed(struct evdev_device *device) + } + + static int ++tablet_reject_device(struct evdev_device *device) ++{ ++ struct libevdev *evdev = device->evdev; ++ int rc = -1; ++ ++ if (!libevdev_has_event_code(evdev, EV_ABS, ABS_X) || ++ !libevdev_has_event_code(evdev, EV_ABS, ABS_Y)) ++ goto out; ++ ++ if (!libevdev_has_event_code(evdev, EV_KEY, BTN_TOOL_PEN)) ++ goto out; ++ ++ rc = 0; ++ ++out: ++ if (rc) { ++ log_bug_libinput(device->base.seat->libinput, ++ "Device '%s' does not meet tablet criteria. " ++ "Ignoring this device.\n", ++ device->devname, device->devname); ++ } ++ return rc; ++} ++ ++static int + tablet_init(struct tablet_dispatch *tablet, + struct evdev_device *device) + { +@@ -1625,6 +1650,9 @@ tablet_init(struct tablet_dispatch *tablet, + tablet->current_tool_type = LIBINPUT_TOOL_NONE; + list_init(&tablet->tool_list); + ++ if (tablet_reject_device(device)) ++ return -1; ++ + tablet_init_calibration(tablet, device); + tablet_init_proximity_threshold(tablet, device); + rc = tablet_init_accel(tablet, device); +-- +2.5.0 + diff --git a/libinput.spec b/libinput.spec index a233be5..684995d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.2.1 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,6 +21,9 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 +# https://bugzilla.redhat.com/show_bug.cgi?id=1314955 +Patch02: 0001-tablet-reject-mislabelled-tablet-devices.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -97,6 +100,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Mar 07 2016 Peter Hutterer 1.2.1-3 +- Fix segfault on mislabeled tablets (#1314955) + * Wed Mar 02 2016 Peter Hutterer 1.2.1-2 - Bump to maintain upgrade path with F23 From 8050fa770a233688cc26c015bf8c3266061ee3dd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 11 Mar 2016 10:34:01 +1000 Subject: [PATCH 074/317] Fix jerky pointer motion on the Lenovo T450/T460/X1 3rd hardware --- ...rk-for-the-T450-and-T460-generation-.patch | 170 ++++++++++++++++++ libinput.spec | 8 +- 2 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-add-quirk-for-the-T450-and-T460-generation-.patch diff --git a/0001-touchpad-add-quirk-for-the-T450-and-T460-generation-.patch b/0001-touchpad-add-quirk-for-the-T450-and-T460-generation-.patch new file mode 100644 index 0000000..2bbb711 --- /dev/null +++ b/0001-touchpad-add-quirk-for-the-T450-and-T460-generation-.patch @@ -0,0 +1,170 @@ +From a608d9dc2c70c7915fc94466ed27c1684f65409e Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 7 Mar 2016 16:05:25 +1000 +Subject: [PATCH libinput] touchpad: add quirk for the T450 and T460 generation + hardware + +The touchpad's sensors are too far apart (or the firmware interferes), causing +in a jerky movement visible especially on slow motion. We get a bunch of +normal motion events, then only ABS_MT_PRESSURE updates without x/y updates. +After about one mm of movement x/y updates resume, with the first event +covering the distance between the last motion event. That event is usually +accelerated and thus causes a large jump. Subsequent events are sufficiently +fine-grained again. + +This patch counts the number of non-motion events. Once we hit 10 in a row, we +mark the first motion update as non-dirty, effectively discarding the motion +and thus stopping the pointer jumps. + +https://bugs.freedesktop.org/show_bug.cgi?id=94379 + +Signed-off-by: Peter Hutterer +Tested-by: Benjamin Tissoires +--- + src/evdev-mt-touchpad.c | 32 ++++++++++++++++++++++++++++---- + src/evdev-mt-touchpad.h | 12 ++++++++++++ + src/evdev.c | 1 + + src/evdev.h | 1 + + udev/90-libinput-model-quirks.hwdb | 7 +++++++ + 5 files changed, 49 insertions(+), 4 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 00d6539..d0a8e27 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -337,7 +337,7 @@ tp_process_absolute(struct tp_dispatch *tp, + case ABS_MT_PRESSURE: + t->pressure = e->value; + t->dirty = true; +- tp->queued |= TOUCHPAD_EVENT_MOTION; ++ tp->queued |= TOUCHPAD_EVENT_OTHERAXIS; + break; + } + } +@@ -880,8 +880,10 @@ tp_position_fake_touches(struct tp_dispatch *tp) + } + + static inline bool +-tp_need_motion_history_reset(struct tp_dispatch *tp) ++tp_need_motion_history_reset(struct tp_dispatch *tp, uint64_t time) + { ++ bool rc = false; ++ + /* semi-mt finger postions may "jump" when nfingers changes */ + if (tp->semi_mt && tp->nfingers_down != tp->old_nfingers_down) + return true; +@@ -894,7 +896,29 @@ tp_need_motion_history_reset(struct tp_dispatch *tp) + tp->old_nfingers_down > tp->num_slots)) + return true; + +- return false; ++ /* Quirk: if we had multiple events without x/y axis ++ information, the next x/y event is going to be a jump. So we ++ reset that touch to non-dirty effectively swallowing that event ++ and restarting with the next event again. ++ */ ++ if (tp->device->model_flags & EVDEV_MODEL_LENOVO_T450_TOUCHPAD) { ++ if (tp->queued & TOUCHPAD_EVENT_MOTION) { ++ if (tp->quirks.nonmotion_event_count > 10) { ++ struct tp_touch *t; ++ ++ tp_for_each_touch(tp, t) ++ t->dirty = false; ++ rc = true; ++ } ++ tp->quirks.nonmotion_event_count = 0; ++ } ++ ++ if ((tp->queued & (TOUCHPAD_EVENT_OTHERAXIS|TOUCHPAD_EVENT_MOTION)) == ++ TOUCHPAD_EVENT_OTHERAXIS) ++ tp->quirks.nonmotion_event_count++; ++ } ++ ++ return rc; + } + + static void +@@ -909,7 +933,7 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time) + tp_unhover_touches(tp, time); + tp_position_fake_touches(tp); + +- want_motion_reset = tp_need_motion_history_reset(tp); ++ want_motion_reset = tp_need_motion_history_reset(tp, time); + + for (i = 0; i < tp->ntouches; i++) { + t = tp_get_touch(tp, i); +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index eae327b..1f05a03 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -41,6 +41,7 @@ enum touchpad_event { + TOUCHPAD_EVENT_MOTION = (1 << 0), + TOUCHPAD_EVENT_BUTTON_PRESS = (1 << 1), + TOUCHPAD_EVENT_BUTTON_RELEASE = (1 << 2), ++ TOUCHPAD_EVENT_OTHERAXIS = (1 << 3), + }; + + enum touchpad_model { +@@ -353,6 +354,17 @@ struct tp_dispatch { + int upper_thumb_line; + int lower_thumb_line; + } thumb; ++ ++ struct { ++ /* A quirk used on the T450 series Synaptics hardware. ++ * Slowly moving the finger causes multiple events with only ++ * ABS_MT_PRESSURE but no x/y information. When the x/y ++ * event comes, it will be a jump of ~20 units. We use the ++ * below to count non-motion events to discard that first ++ * event with the jump. ++ */ ++ unsigned int nonmotion_event_count; ++ } quirks; + }; + + #define tp_for_each_touch(_tp, _t) \ +diff --git a/src/evdev.c b/src/evdev.c +index 51768fe..a5c965d 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1680,6 +1680,7 @@ evdev_read_model_flags(struct evdev_device *device) + { "LIBINPUT_MODEL_CYBORG_RAT", EVDEV_MODEL_CYBORG_RAT }, + { "LIBINPUT_MODEL_CYAPA", EVDEV_MODEL_CYAPA }, + { "LIBINPUT_MODEL_ALPS_RUSHMORE", EVDEV_MODEL_ALPS_RUSHMORE }, ++ { "LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD", EVDEV_MODEL_LENOVO_T450_TOUCHPAD }, + { NULL, EVDEV_MODEL_DEFAULT }, + }; + const struct model_map *m = model_map; +diff --git a/src/evdev.h b/src/evdev.h +index 482712b..4a5d807 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -113,6 +113,7 @@ enum evdev_device_model { + EVDEV_MODEL_CYBORG_RAT = (1 << 14), + EVDEV_MODEL_CYAPA = (1 << 15), + EVDEV_MODEL_ALPS_RUSHMORE = (1 << 16), ++ EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17), + }; + + struct mt_slot { +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index eb2859e..d5978f7 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -100,6 +100,13 @@ libinput:name:Cypress APA Trackpad (cyapa):dmi:* + libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX230* + LIBINPUT_MODEL_LENOVO_X230=1 + ++# Lenovo T450/T460 and all other Lenovos of the *50 and *60 generation, ++# including the X1 Carbon 3rd gen ++libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??50*: ++libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??60*: ++libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd:* ++ LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1 ++ + ########################################## + # Synaptics + ########################################## +-- +2.5.0 + diff --git a/libinput.spec b/libinput.spec index 684995d..9fecc09 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.2.1 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -24,6 +24,9 @@ Patch01: 0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1314955 Patch02: 0001-tablet-reject-mislabelled-tablet-devices.patch +# https://bugs.freedesktop.org/show_bug.cgi?id=94379 +Patch03: 0001-touchpad-add-quirk-for-the-T450-and-T460-generation-.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -100,6 +103,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Mar 11 2016 Peter Hutterer 1.2.1-4 +- Fix jerky pointer motion on the Lenovo T450/T460/X1 3rd hardware + * Mon Mar 07 2016 Peter Hutterer 1.2.1-3 - Fix segfault on mislabeled tablets (#1314955) From cc9c39ee9ea37dfb164fedca51d09722a2892a53 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 15 Mar 2016 10:35:58 +1000 Subject: [PATCH 075/317] libinput 1.2.2 --- .gitignore | 1 + ...et-reject-mislabelled-tablet-devices.patch | 66 ------- ...rk-for-the-T450-and-T460-generation-.patch | 170 ------------------ libinput.spec | 13 +- sources | 2 +- 5 files changed, 7 insertions(+), 245 deletions(-) delete mode 100644 0001-tablet-reject-mislabelled-tablet-devices.patch delete mode 100644 0001-touchpad-add-quirk-for-the-T450-and-T460-generation-.patch diff --git a/.gitignore b/.gitignore index 54c8a84..8e41b1e 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ /libinput-1.1.902.tar.xz /libinput-1.2.0.tar.xz /libinput-1.2.1.tar.xz +/libinput-1.2.2.tar.xz diff --git a/0001-tablet-reject-mislabelled-tablet-devices.patch b/0001-tablet-reject-mislabelled-tablet-devices.patch deleted file mode 100644 index f8e7071..0000000 --- a/0001-tablet-reject-mislabelled-tablet-devices.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 821ac1f9d5ea1267ea125c67e7652c8cc14e9cb3 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 7 Mar 2016 10:12:13 +1000 -Subject: [PATCH libinput] tablet: reject mislabelled tablet devices - -The HUION 580 has a "consumer control" event node that has an ABS_VOLUME, keys -and a REL_HWHEEL. It has the same VID/PID as the pen tablet and libwacom -labels it as ID_INPUT_TABLET. This causes a crash later when we try to init -pointer acceleration for a device that doesn't have axes. - -https://bugzilla.redhat.com/show_bug.cgi?id=1314955 - -Signed-off-by: Peter Hutterer ---- - src/evdev-tablet.c | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - -diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c -index 0f6fa2c..9fc38aa 100644 ---- a/src/evdev-tablet.c -+++ b/src/evdev-tablet.c -@@ -1613,6 +1613,31 @@ tablet_init_left_handed(struct evdev_device *device) - } - - static int -+tablet_reject_device(struct evdev_device *device) -+{ -+ struct libevdev *evdev = device->evdev; -+ int rc = -1; -+ -+ if (!libevdev_has_event_code(evdev, EV_ABS, ABS_X) || -+ !libevdev_has_event_code(evdev, EV_ABS, ABS_Y)) -+ goto out; -+ -+ if (!libevdev_has_event_code(evdev, EV_KEY, BTN_TOOL_PEN)) -+ goto out; -+ -+ rc = 0; -+ -+out: -+ if (rc) { -+ log_bug_libinput(device->base.seat->libinput, -+ "Device '%s' does not meet tablet criteria. " -+ "Ignoring this device.\n", -+ device->devname, device->devname); -+ } -+ return rc; -+} -+ -+static int - tablet_init(struct tablet_dispatch *tablet, - struct evdev_device *device) - { -@@ -1625,6 +1650,9 @@ tablet_init(struct tablet_dispatch *tablet, - tablet->current_tool_type = LIBINPUT_TOOL_NONE; - list_init(&tablet->tool_list); - -+ if (tablet_reject_device(device)) -+ return -1; -+ - tablet_init_calibration(tablet, device); - tablet_init_proximity_threshold(tablet, device); - rc = tablet_init_accel(tablet, device); --- -2.5.0 - diff --git a/0001-touchpad-add-quirk-for-the-T450-and-T460-generation-.patch b/0001-touchpad-add-quirk-for-the-T450-and-T460-generation-.patch deleted file mode 100644 index 2bbb711..0000000 --- a/0001-touchpad-add-quirk-for-the-T450-and-T460-generation-.patch +++ /dev/null @@ -1,170 +0,0 @@ -From a608d9dc2c70c7915fc94466ed27c1684f65409e Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 7 Mar 2016 16:05:25 +1000 -Subject: [PATCH libinput] touchpad: add quirk for the T450 and T460 generation - hardware - -The touchpad's sensors are too far apart (or the firmware interferes), causing -in a jerky movement visible especially on slow motion. We get a bunch of -normal motion events, then only ABS_MT_PRESSURE updates without x/y updates. -After about one mm of movement x/y updates resume, with the first event -covering the distance between the last motion event. That event is usually -accelerated and thus causes a large jump. Subsequent events are sufficiently -fine-grained again. - -This patch counts the number of non-motion events. Once we hit 10 in a row, we -mark the first motion update as non-dirty, effectively discarding the motion -and thus stopping the pointer jumps. - -https://bugs.freedesktop.org/show_bug.cgi?id=94379 - -Signed-off-by: Peter Hutterer -Tested-by: Benjamin Tissoires ---- - src/evdev-mt-touchpad.c | 32 ++++++++++++++++++++++++++++---- - src/evdev-mt-touchpad.h | 12 ++++++++++++ - src/evdev.c | 1 + - src/evdev.h | 1 + - udev/90-libinput-model-quirks.hwdb | 7 +++++++ - 5 files changed, 49 insertions(+), 4 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 00d6539..d0a8e27 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -337,7 +337,7 @@ tp_process_absolute(struct tp_dispatch *tp, - case ABS_MT_PRESSURE: - t->pressure = e->value; - t->dirty = true; -- tp->queued |= TOUCHPAD_EVENT_MOTION; -+ tp->queued |= TOUCHPAD_EVENT_OTHERAXIS; - break; - } - } -@@ -880,8 +880,10 @@ tp_position_fake_touches(struct tp_dispatch *tp) - } - - static inline bool --tp_need_motion_history_reset(struct tp_dispatch *tp) -+tp_need_motion_history_reset(struct tp_dispatch *tp, uint64_t time) - { -+ bool rc = false; -+ - /* semi-mt finger postions may "jump" when nfingers changes */ - if (tp->semi_mt && tp->nfingers_down != tp->old_nfingers_down) - return true; -@@ -894,7 +896,29 @@ tp_need_motion_history_reset(struct tp_dispatch *tp) - tp->old_nfingers_down > tp->num_slots)) - return true; - -- return false; -+ /* Quirk: if we had multiple events without x/y axis -+ information, the next x/y event is going to be a jump. So we -+ reset that touch to non-dirty effectively swallowing that event -+ and restarting with the next event again. -+ */ -+ if (tp->device->model_flags & EVDEV_MODEL_LENOVO_T450_TOUCHPAD) { -+ if (tp->queued & TOUCHPAD_EVENT_MOTION) { -+ if (tp->quirks.nonmotion_event_count > 10) { -+ struct tp_touch *t; -+ -+ tp_for_each_touch(tp, t) -+ t->dirty = false; -+ rc = true; -+ } -+ tp->quirks.nonmotion_event_count = 0; -+ } -+ -+ if ((tp->queued & (TOUCHPAD_EVENT_OTHERAXIS|TOUCHPAD_EVENT_MOTION)) == -+ TOUCHPAD_EVENT_OTHERAXIS) -+ tp->quirks.nonmotion_event_count++; -+ } -+ -+ return rc; - } - - static void -@@ -909,7 +933,7 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time) - tp_unhover_touches(tp, time); - tp_position_fake_touches(tp); - -- want_motion_reset = tp_need_motion_history_reset(tp); -+ want_motion_reset = tp_need_motion_history_reset(tp, time); - - for (i = 0; i < tp->ntouches; i++) { - t = tp_get_touch(tp, i); -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index eae327b..1f05a03 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -41,6 +41,7 @@ enum touchpad_event { - TOUCHPAD_EVENT_MOTION = (1 << 0), - TOUCHPAD_EVENT_BUTTON_PRESS = (1 << 1), - TOUCHPAD_EVENT_BUTTON_RELEASE = (1 << 2), -+ TOUCHPAD_EVENT_OTHERAXIS = (1 << 3), - }; - - enum touchpad_model { -@@ -353,6 +354,17 @@ struct tp_dispatch { - int upper_thumb_line; - int lower_thumb_line; - } thumb; -+ -+ struct { -+ /* A quirk used on the T450 series Synaptics hardware. -+ * Slowly moving the finger causes multiple events with only -+ * ABS_MT_PRESSURE but no x/y information. When the x/y -+ * event comes, it will be a jump of ~20 units. We use the -+ * below to count non-motion events to discard that first -+ * event with the jump. -+ */ -+ unsigned int nonmotion_event_count; -+ } quirks; - }; - - #define tp_for_each_touch(_tp, _t) \ -diff --git a/src/evdev.c b/src/evdev.c -index 51768fe..a5c965d 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1680,6 +1680,7 @@ evdev_read_model_flags(struct evdev_device *device) - { "LIBINPUT_MODEL_CYBORG_RAT", EVDEV_MODEL_CYBORG_RAT }, - { "LIBINPUT_MODEL_CYAPA", EVDEV_MODEL_CYAPA }, - { "LIBINPUT_MODEL_ALPS_RUSHMORE", EVDEV_MODEL_ALPS_RUSHMORE }, -+ { "LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD", EVDEV_MODEL_LENOVO_T450_TOUCHPAD }, - { NULL, EVDEV_MODEL_DEFAULT }, - }; - const struct model_map *m = model_map; -diff --git a/src/evdev.h b/src/evdev.h -index 482712b..4a5d807 100644 ---- a/src/evdev.h -+++ b/src/evdev.h -@@ -113,6 +113,7 @@ enum evdev_device_model { - EVDEV_MODEL_CYBORG_RAT = (1 << 14), - EVDEV_MODEL_CYAPA = (1 << 15), - EVDEV_MODEL_ALPS_RUSHMORE = (1 << 16), -+ EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17), - }; - - struct mt_slot { -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index eb2859e..d5978f7 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -100,6 +100,13 @@ libinput:name:Cypress APA Trackpad (cyapa):dmi:* - libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX230* - LIBINPUT_MODEL_LENOVO_X230=1 - -+# Lenovo T450/T460 and all other Lenovos of the *50 and *60 generation, -+# including the X1 Carbon 3rd gen -+libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??50*: -+libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??60*: -+libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd:* -+ LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1 -+ - ########################################## - # Synaptics - ########################################## --- -2.5.0 - diff --git a/libinput.spec b/libinput.spec index 9fecc09..3349292 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.2.1 -Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.2.2 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,12 +21,6 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 -# https://bugzilla.redhat.com/show_bug.cgi?id=1314955 -Patch02: 0001-tablet-reject-mislabelled-tablet-devices.patch - -# https://bugs.freedesktop.org/show_bug.cgi?id=94379 -Patch03: 0001-touchpad-add-quirk-for-the-T450-and-T460-generation-.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -103,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Mar 15 2016 Peter Hutterer 1.2.2-1 +- libinput 1.2.2 + * Fri Mar 11 2016 Peter Hutterer 1.2.1-4 - Fix jerky pointer motion on the Lenovo T450/T460/X1 3rd hardware diff --git a/sources b/sources index 5e3e22f..c27791a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2b36d32362111c3e99f19c83bc535332 libinput-1.2.1.tar.xz +4e8d1cc7aa941c91c61b1824e35160c4 libinput-1.2.2.tar.xz From 2dacda31f2ca8ee24e2e521aefd5b8a1eba31f95 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 12 Apr 2016 08:06:23 +1000 Subject: [PATCH 076/317] libinput 1.2.3 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8e41b1e..449dd6f 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ /libinput-1.2.0.tar.xz /libinput-1.2.1.tar.xz /libinput-1.2.2.tar.xz +/libinput-1.2.3.tar.xz diff --git a/libinput.spec b/libinput.spec index 3349292..c7c67f9 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.2.2 +Version: 1.2.3 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Apr 12 2016 Peter Hutterer 1.2.3-1 +- libinput 1.2.3 + * Tue Mar 15 2016 Peter Hutterer 1.2.2-1 - libinput 1.2.2 diff --git a/sources b/sources index c27791a..9d3e8bc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4e8d1cc7aa941c91c61b1824e35160c4 libinput-1.2.2.tar.xz +9f3d603942fefac8860e0fc828a3df99 libinput-1.2.3.tar.xz From 89b9f5f74d1b29bb7771b0e4005d0065b07ba201 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 19 Apr 2016 10:24:00 +1000 Subject: [PATCH 077/317] libinput 1.2.4 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 449dd6f..cee8460 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ /libinput-1.2.1.tar.xz /libinput-1.2.2.tar.xz /libinput-1.2.3.tar.xz +/libinput-1.2.4.tar.xz diff --git a/libinput.spec b/libinput.spec index c7c67f9..1be553d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.2.3 +Version: 1.2.4 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Apr 19 2016 Peter Hutterer 1.2.4-1 +- libinput 1.2.4 + * Tue Apr 12 2016 Peter Hutterer 1.2.3-1 - libinput 1.2.3 diff --git a/sources b/sources index 9d3e8bc..379965a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9f3d603942fefac8860e0fc828a3df99 libinput-1.2.3.tar.xz +1cbaa34f04a336f2703906d564e0a37a libinput-1.2.4.tar.xz From 4496bd728ef52cfd401713103ca66cb395d2021b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 21 Apr 2016 16:01:45 +1000 Subject: [PATCH 078/317] libinput 1.3rc2 --- .gitignore | 2 ++ libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index cee8460..3dee6a6 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,5 @@ /libinput-1.2.2.tar.xz /libinput-1.2.3.tar.xz /libinput-1.2.4.tar.xz +/libinput-1.2.901.tar.xz +/libinput-1.2.902.tar.xz diff --git a/libinput.spec b/libinput.spec index 1be553d..393b360 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.2.4 +Version: 1.2.902 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Apr 21 2016 Peter Hutterer 1.2.902-1 +- libinput 1.3rc2 + * Tue Apr 19 2016 Peter Hutterer 1.2.4-1 - libinput 1.2.4 diff --git a/sources b/sources index 379965a..31f7aa5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1cbaa34f04a336f2703906d564e0a37a libinput-1.2.4.tar.xz +cfa6330d59b939ebc4de6cb9967ddfd7 libinput-1.2.902.tar.xz From 9fdbf5b426c1ce5ab574492db8386c25ce5d9af2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 4 May 2016 20:12:37 +1000 Subject: [PATCH 079/317] libinput 1.3rc3 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3dee6a6..63282c2 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ /libinput-1.2.4.tar.xz /libinput-1.2.901.tar.xz /libinput-1.2.902.tar.xz +/libinput-1.2.903.tar.xz diff --git a/libinput.spec b/libinput.spec index 393b360..d8d63b8 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.2.902 +Version: 1.2.903 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed May 04 2016 Peter Hutterer 1.2.903-1 +- libinput 1.3rc3 + * Thu Apr 21 2016 Peter Hutterer 1.2.902-1 - libinput 1.3rc2 diff --git a/sources b/sources index 31f7aa5..adbb01e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cfa6330d59b939ebc4de6cb9967ddfd7 libinput-1.2.902.tar.xz +a2a7174611237513bbc3d1eb75b22e1f libinput-1.2.903.tar.xz From edf33a01f9407c4d21d7291c5516a204361bff41 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 10 May 2016 14:14:12 +1000 Subject: [PATCH 080/317] libinput 1.3.0 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 63282c2..08179f5 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ /libinput-1.2.901.tar.xz /libinput-1.2.902.tar.xz /libinput-1.2.903.tar.xz +/libinput-1.3.0.tar.xz diff --git a/libinput.spec b/libinput.spec index d8d63b8..23202cd 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.2.903 +Version: 1.3.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue May 10 2016 Peter Hutterer 1.3.0-1 +- libinput 1.3.0 + * Wed May 04 2016 Peter Hutterer 1.2.903-1 - libinput 1.3rc3 diff --git a/sources b/sources index adbb01e..b92cf87 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a2a7174611237513bbc3d1eb75b22e1f libinput-1.2.903.tar.xz +5f8bc2c746bfbc9454143f78e5b477a9 libinput-1.3.0.tar.xz From 40762142f01301f2aa773c5a65458a3260fe3ebf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 19 May 2016 16:07:12 +1000 Subject: [PATCH 081/317] Disable negative pressure transition on non-synaptics pads to avoid jerky movement (#1335249) --- ...e-negative-pressure-change-check-on-.patch | 46 +++++++++++++++++++ libinput.spec | 9 +++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-only-use-negative-pressure-change-check-on-.patch diff --git a/0001-touchpad-only-use-negative-pressure-change-check-on-.patch b/0001-touchpad-only-use-negative-pressure-change-check-on-.patch new file mode 100644 index 0000000..f7315e3 --- /dev/null +++ b/0001-touchpad-only-use-negative-pressure-change-check-on-.patch @@ -0,0 +1,46 @@ +From 2f5231cc88fccf389a78270d827f6c9201b86794 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 18 May 2016 07:35:36 +1000 +Subject: [PATCH libinput] touchpad: only use negative pressure change check on + Lenovo *50 and *60 series + +This was introduced for bug 94379 - an X1 Carbon 3rd. Other touchpads have +different pressure change ranges, causing this condition to trigger +randomly and resulting in a jerky pointer motion. + +For now, reduce the check to the *50 and *60 series touchpads until we have +data for more touchpads that we can add one-by-one. + +https://bugs.freedesktop.org/show_bug.cgi?id=95393 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 4c8c3a3..c854043 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -928,6 +928,7 @@ tp_detect_jumps(const struct tp_dispatch *tp, struct tp_touch *t) + static void + tp_process_state(struct tp_dispatch *tp, uint64_t time) + { ++ struct evdev_device *device = tp->device; + struct tp_touch *t; + unsigned int i; + bool restart_filter = false; +@@ -953,7 +954,8 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time) + if (!t->dirty) + continue; + +- if (t->pressure_delta < -7) ++ if ((device->model_flags & EVDEV_MODEL_LENOVO_T450_TOUCHPAD) && ++ t->pressure_delta < -7) + tp_motion_history_reset(t); + + if (tp_detect_jumps(tp, t)) { +-- +2.7.4 + diff --git a/libinput.spec b/libinput.spec index 23202cd..948ac25 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.3.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,6 +21,9 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 +# https://bugzilla.redhat.com/show_bug.cgi?id=1335249 +Patch02: 0001-touchpad-only-use-negative-pressure-change-check-on-.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -97,6 +100,10 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu May 19 2016 Peter Hutterer 1.3.0-2 +- Disable negative pressure transition on non-synaptics pads to avoid + jerky movement (#1335249) + * Tue May 10 2016 Peter Hutterer 1.3.0-1 - libinput 1.3.0 From 9fe571ae99f33e1ad616e77411717132cd0c6487 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 20 May 2016 13:13:25 +1000 Subject: [PATCH 082/317] Stop pointer jitter on the Dell E5420, E530 and Lenovo Yoga 2 --- ...l-Lattitude-E5420-to-the-wobbly-touc.patch | 30 +++++++++++++++++++ ...d-the-Yoga-2-to-the-wobbly-touchpads.patch | 28 +++++++++++++++++ ...he-lenovo-E530-has-a-wobbly-touchpad.patch | 28 +++++++++++++++++ libinput.spec | 9 +++++- 4 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 0001-udev-add-the-Dell-Lattitude-E5420-to-the-wobbly-touc.patch create mode 100644 0001-udev-add-the-Yoga-2-to-the-wobbly-touchpads.patch create mode 100644 0001-udev-the-lenovo-E530-has-a-wobbly-touchpad.patch diff --git a/0001-udev-add-the-Dell-Lattitude-E5420-to-the-wobbly-touc.patch b/0001-udev-add-the-Dell-Lattitude-E5420-to-the-wobbly-touc.patch new file mode 100644 index 0000000..95483d7 --- /dev/null +++ b/0001-udev-add-the-Dell-Lattitude-E5420-to-the-wobbly-touc.patch @@ -0,0 +1,30 @@ +From deeee075c2746b24bdda1e2211a5f87837090120 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 19 May 2016 14:40:33 +1000 +Subject: [PATCH libinput] udev: add the Dell Lattitude E5420 to the wobbly + touchpads + +https://bugzilla.redhat.com/show_bug.cgi?id=1336084 + +Signed-off-by: Peter Hutterer +--- + udev/90-libinput-model-quirks.hwdb | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index 147fec2..22179bb 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -30,6 +30,9 @@ libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:310 + libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:310 + LIBINPUT_MODEL_ALPS_RUSHMORE=1 + ++libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:dmi:*svnDellInc.:pnLatitudeE5420* ++ LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1 ++ + ########################################## + # Apple + ########################################## +-- +2.7.4 + diff --git a/0001-udev-add-the-Yoga-2-to-the-wobbly-touchpads.patch b/0001-udev-add-the-Yoga-2-to-the-wobbly-touchpads.patch new file mode 100644 index 0000000..27cae1d --- /dev/null +++ b/0001-udev-add-the-Yoga-2-to-the-wobbly-touchpads.patch @@ -0,0 +1,28 @@ +From 20c194de524408b2c2cc9662388e324540bbd3b1 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 19 May 2016 15:04:24 +1000 +Subject: [PATCH libinput] udev: add the Yoga 2 to the wobbly touchpads + +https://bugs.freedesktop.org/show_bug.cgi?id=95290 + +Signed-off-by: Peter Hutterer +--- + udev/90-libinput-model-quirks.hwdb | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index f1ab211..a066df0 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -117,6 +117,8 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd + + # Lenovo E530 + libinput:name:*SynPS/2 Synaptics TouchPad*:dmi:*svnLENOVO*pvrThinkPadEdgeE530:* ++# Lenovo Yoga 2013 ++libinput:name:*SynPS/2 Synaptics TouchPad*:dmi:*svnLENOVO*pvrLenovoYoga213:* + LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1 + + ########################################## +-- +2.7.4 + diff --git a/0001-udev-the-lenovo-E530-has-a-wobbly-touchpad.patch b/0001-udev-the-lenovo-E530-has-a-wobbly-touchpad.patch new file mode 100644 index 0000000..23c66b5 --- /dev/null +++ b/0001-udev-the-lenovo-E530-has-a-wobbly-touchpad.patch @@ -0,0 +1,28 @@ +From 07cca736d9104610978723f9050ba7ce603c62db Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 16 May 2016 10:26:01 +1000 +Subject: [PATCH libinput] udev: the lenovo E530 has a wobbly touchpad + +Signed-off-by: Peter Hutterer +--- + udev/90-libinput-model-quirks.hwdb | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index 147fec2..f1ab211 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -115,6 +115,10 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??60*: + libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd:* + LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1 + ++# Lenovo E530 ++libinput:name:*SynPS/2 Synaptics TouchPad*:dmi:*svnLENOVO*pvrThinkPadEdgeE530:* ++ LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1 ++ + ########################################## + # Synaptics + ########################################## +-- +2.7.4 + diff --git a/libinput.spec b/libinput.spec index 948ac25..380a2b7 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.3.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -24,6 +24,10 @@ Patch01: 0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1335249 Patch02: 0001-touchpad-only-use-negative-pressure-change-check-on-.patch +Patch03: 0001-udev-the-lenovo-E530-has-a-wobbly-touchpad.patch +Patch04: 0001-udev-add-the-Yoga-2-to-the-wobbly-touchpads.patch +Patch05: 0001-udev-add-the-Dell-Lattitude-E5420-to-the-wobbly-touc.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -100,6 +104,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri May 20 2016 Peter Hutterer 1.3.0-3 +- Stop pointer jitter on the Dell E5420, E530 and Lenovo Yoga 2 + * Thu May 19 2016 Peter Hutterer 1.3.0-2 - Disable negative pressure transition on non-synaptics pads to avoid jerky movement (#1335249) From 020e2574cabd8698b2d3e38c668d7f98426ea29c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 30 May 2016 09:58:20 +1000 Subject: [PATCH 083/317] libinput 1.3.1 --- .gitignore | 1 + ...e-negative-pressure-change-check-on-.patch | 46 ------------------- ...l-Lattitude-E5420-to-the-wobbly-touc.patch | 30 ------------ ...d-the-Yoga-2-to-the-wobbly-touchpads.patch | 28 ----------- ...he-lenovo-E530-has-a-wobbly-touchpad.patch | 21 ++++----- libinput.spec | 12 ++--- sources | 2 +- 7 files changed, 17 insertions(+), 123 deletions(-) delete mode 100644 0001-touchpad-only-use-negative-pressure-change-check-on-.patch delete mode 100644 0001-udev-add-the-Dell-Lattitude-E5420-to-the-wobbly-touc.patch delete mode 100644 0001-udev-add-the-Yoga-2-to-the-wobbly-touchpads.patch diff --git a/.gitignore b/.gitignore index 08179f5..6af7100 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ /libinput-1.2.902.tar.xz /libinput-1.2.903.tar.xz /libinput-1.3.0.tar.xz +/libinput-1.3.1.tar.xz diff --git a/0001-touchpad-only-use-negative-pressure-change-check-on-.patch b/0001-touchpad-only-use-negative-pressure-change-check-on-.patch deleted file mode 100644 index f7315e3..0000000 --- a/0001-touchpad-only-use-negative-pressure-change-check-on-.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 2f5231cc88fccf389a78270d827f6c9201b86794 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 18 May 2016 07:35:36 +1000 -Subject: [PATCH libinput] touchpad: only use negative pressure change check on - Lenovo *50 and *60 series - -This was introduced for bug 94379 - an X1 Carbon 3rd. Other touchpads have -different pressure change ranges, causing this condition to trigger -randomly and resulting in a jerky pointer motion. - -For now, reduce the check to the *50 and *60 series touchpads until we have -data for more touchpads that we can add one-by-one. - -https://bugs.freedesktop.org/show_bug.cgi?id=95393 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 4c8c3a3..c854043 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -928,6 +928,7 @@ tp_detect_jumps(const struct tp_dispatch *tp, struct tp_touch *t) - static void - tp_process_state(struct tp_dispatch *tp, uint64_t time) - { -+ struct evdev_device *device = tp->device; - struct tp_touch *t; - unsigned int i; - bool restart_filter = false; -@@ -953,7 +954,8 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time) - if (!t->dirty) - continue; - -- if (t->pressure_delta < -7) -+ if ((device->model_flags & EVDEV_MODEL_LENOVO_T450_TOUCHPAD) && -+ t->pressure_delta < -7) - tp_motion_history_reset(t); - - if (tp_detect_jumps(tp, t)) { --- -2.7.4 - diff --git a/0001-udev-add-the-Dell-Lattitude-E5420-to-the-wobbly-touc.patch b/0001-udev-add-the-Dell-Lattitude-E5420-to-the-wobbly-touc.patch deleted file mode 100644 index 95483d7..0000000 --- a/0001-udev-add-the-Dell-Lattitude-E5420-to-the-wobbly-touc.patch +++ /dev/null @@ -1,30 +0,0 @@ -From deeee075c2746b24bdda1e2211a5f87837090120 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 19 May 2016 14:40:33 +1000 -Subject: [PATCH libinput] udev: add the Dell Lattitude E5420 to the wobbly - touchpads - -https://bugzilla.redhat.com/show_bug.cgi?id=1336084 - -Signed-off-by: Peter Hutterer ---- - udev/90-libinput-model-quirks.hwdb | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index 147fec2..22179bb 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -30,6 +30,9 @@ libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:310 - libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:310 - LIBINPUT_MODEL_ALPS_RUSHMORE=1 - -+libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:dmi:*svnDellInc.:pnLatitudeE5420* -+ LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1 -+ - ########################################## - # Apple - ########################################## --- -2.7.4 - diff --git a/0001-udev-add-the-Yoga-2-to-the-wobbly-touchpads.patch b/0001-udev-add-the-Yoga-2-to-the-wobbly-touchpads.patch deleted file mode 100644 index 27cae1d..0000000 --- a/0001-udev-add-the-Yoga-2-to-the-wobbly-touchpads.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 20c194de524408b2c2cc9662388e324540bbd3b1 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 19 May 2016 15:04:24 +1000 -Subject: [PATCH libinput] udev: add the Yoga 2 to the wobbly touchpads - -https://bugs.freedesktop.org/show_bug.cgi?id=95290 - -Signed-off-by: Peter Hutterer ---- - udev/90-libinput-model-quirks.hwdb | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index f1ab211..a066df0 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -117,6 +117,8 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd - - # Lenovo E530 - libinput:name:*SynPS/2 Synaptics TouchPad*:dmi:*svnLENOVO*pvrThinkPadEdgeE530:* -+# Lenovo Yoga 2013 -+libinput:name:*SynPS/2 Synaptics TouchPad*:dmi:*svnLENOVO*pvrLenovoYoga213:* - LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1 - - ########################################## --- -2.7.4 - diff --git a/0001-udev-the-lenovo-E530-has-a-wobbly-touchpad.patch b/0001-udev-the-lenovo-E530-has-a-wobbly-touchpad.patch index 23c66b5..8e87453 100644 --- a/0001-udev-the-lenovo-E530-has-a-wobbly-touchpad.patch +++ b/0001-udev-the-lenovo-E530-has-a-wobbly-touchpad.patch @@ -1,27 +1,26 @@ -From 07cca736d9104610978723f9050ba7ce603c62db Mon Sep 17 00:00:00 2001 +From 2a79f81f6f59a3687fdf9d196a7e881a182418f2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 16 May 2016 10:26:01 +1000 Subject: [PATCH libinput] udev: the lenovo E530 has a wobbly touchpad Signed-off-by: Peter Hutterer +(cherry picked from commit 07cca736d9104610978723f9050ba7ce603c62db) --- - udev/90-libinput-model-quirks.hwdb | 4 ++++ - 1 file changed, 4 insertions(+) + udev/90-libinput-model-quirks.hwdb | 2 ++ + 1 file changed, 2 insertions(+) diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index 147fec2..f1ab211 100644 +index 88f3243..c56f23e 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb -@@ -115,6 +115,10 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??60*: - libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd:* - LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1 +@@ -121,6 +121,8 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd + # Lenovo Yoga 2013 + libinput:name:*SynPS/2 Synaptics TouchPad*:dmi:*svnLENOVO*pvrLenovoYoga213:* +# Lenovo E530 +libinput:name:*SynPS/2 Synaptics TouchPad*:dmi:*svnLENOVO*pvrThinkPadEdgeE530:* -+ LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1 -+ - ########################################## - # Synaptics + LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1 + ########################################## -- 2.7.4 diff --git a/libinput.spec b/libinput.spec index 380a2b7..e7f438a 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.3.0 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.3.1 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,12 +21,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 -# https://bugzilla.redhat.com/show_bug.cgi?id=1335249 -Patch02: 0001-touchpad-only-use-negative-pressure-change-check-on-.patch - Patch03: 0001-udev-the-lenovo-E530-has-a-wobbly-touchpad.patch -Patch04: 0001-udev-add-the-Yoga-2-to-the-wobbly-touchpads.patch -Patch05: 0001-udev-add-the-Dell-Lattitude-E5420-to-the-wobbly-touc.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -104,6 +99,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon May 30 2016 Peter Hutterer 1.3.1-1 +- libinput 1.3.1 + * Fri May 20 2016 Peter Hutterer 1.3.0-3 - Stop pointer jitter on the Dell E5420, E530 and Lenovo Yoga 2 diff --git a/sources b/sources index b92cf87..b302525 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5f8bc2c746bfbc9454143f78e5b477a9 libinput-1.3.0.tar.xz +458fc483f7227d3c4c330f4abd6dfa77 libinput-1.3.1.tar.xz From 7e5cfd3fef6f0ccae38baafc0c6db144c0438fff Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 16 Jun 2016 15:46:08 +1000 Subject: [PATCH 084/317] libinput 1.3.2 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6af7100..d78f5a7 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,4 @@ /libinput-1.2.903.tar.xz /libinput-1.3.0.tar.xz /libinput-1.3.1.tar.xz +/libinput-1.3.2.tar.xz diff --git a/libinput.spec b/libinput.spec index e7f438a..34e687a 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.3.1 +Version: 1.3.2 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -99,6 +99,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Jun 16 2016 Peter Hutterer 1.3.2-1 +- libinput 1.3.2 + * Mon May 30 2016 Peter Hutterer 1.3.1-1 - libinput 1.3.1 diff --git a/sources b/sources index b302525..e9a1f2e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -458fc483f7227d3c4c330f4abd6dfa77 libinput-1.3.1.tar.xz +d5c9d16825666078930d2df6103acde8 libinput-1.3.2.tar.xz From c954d59a7607e9b3a7cc72c3413acf93e69b8b0a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 24 Jun 2016 15:14:04 +1000 Subject: [PATCH 085/317] libinput 1.3.3 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d78f5a7..52b4ebe 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ /libinput-1.3.0.tar.xz /libinput-1.3.1.tar.xz /libinput-1.3.2.tar.xz +/libinput-1.3.3.tar.xz diff --git a/libinput.spec b/libinput.spec index 34e687a..501afc8 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.3.2 +Version: 1.3.3 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -99,6 +99,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Jun 24 2016 Peter Hutterer 1.3.3-1 +- libinput 1.3.3 + * Thu Jun 16 2016 Peter Hutterer 1.3.2-1 - libinput 1.3.2 diff --git a/sources b/sources index e9a1f2e..ee9019a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d5c9d16825666078930d2df6103acde8 libinput-1.3.2.tar.xz +51bfd53ab545cd72eb9a3e81d8e6b300 libinput-1.3.3.tar.xz From 7115ec142607f564204d1a51827c82ddd440e50e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 24 Jun 2016 15:20:37 +1000 Subject: [PATCH 086/317] Drop the now unnecessary patch --- ...he-lenovo-E530-has-a-wobbly-touchpad.patch | 27 ------------------- libinput.spec | 7 ++--- 2 files changed, 4 insertions(+), 30 deletions(-) delete mode 100644 0001-udev-the-lenovo-E530-has-a-wobbly-touchpad.patch diff --git a/0001-udev-the-lenovo-E530-has-a-wobbly-touchpad.patch b/0001-udev-the-lenovo-E530-has-a-wobbly-touchpad.patch deleted file mode 100644 index 8e87453..0000000 --- a/0001-udev-the-lenovo-E530-has-a-wobbly-touchpad.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 2a79f81f6f59a3687fdf9d196a7e881a182418f2 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 16 May 2016 10:26:01 +1000 -Subject: [PATCH libinput] udev: the lenovo E530 has a wobbly touchpad - -Signed-off-by: Peter Hutterer -(cherry picked from commit 07cca736d9104610978723f9050ba7ce603c62db) ---- - udev/90-libinput-model-quirks.hwdb | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index 88f3243..c56f23e 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -121,6 +121,8 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd - - # Lenovo Yoga 2013 - libinput:name:*SynPS/2 Synaptics TouchPad*:dmi:*svnLENOVO*pvrLenovoYoga213:* -+# Lenovo E530 -+libinput:name:*SynPS/2 Synaptics TouchPad*:dmi:*svnLENOVO*pvrThinkPadEdgeE530:* - LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1 - - ########################################## --- -2.7.4 - diff --git a/libinput.spec b/libinput.spec index 501afc8..a713c43 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.3.3 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,8 +21,6 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 -Patch03: 0001-udev-the-lenovo-E530-has-a-wobbly-touchpad.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -99,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Jun 24 2016 Peter Hutterer 1.3.3-2 +- Drop the now unnecessary patch + * Fri Jun 24 2016 Peter Hutterer 1.3.3-1 - libinput 1.3.3 From 26495c0c36894095a8306c28b8c6953ba5088ebb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 12 Jul 2016 12:15:19 +1000 Subject: [PATCH 087/317] libinput 1.4rc1 --- .gitignore | 1 + libinput.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 52b4ebe..66fa7ae 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ /libinput-1.3.1.tar.xz /libinput-1.3.2.tar.xz /libinput-1.3.3.tar.xz +/libinput-1.3.901.tar.xz diff --git a/libinput.spec b/libinput.spec index a713c43..900131f 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.3.3 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.3.901 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Jul 12 2016 Peter Hutterer 1.3.901-1 +- libinput 1.4rc1 + * Fri Jun 24 2016 Peter Hutterer 1.3.3-2 - Drop the now unnecessary patch diff --git a/sources b/sources index ee9019a..362e15a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -51bfd53ab545cd72eb9a3e81d8e6b300 libinput-1.3.3.tar.xz +3c809ff90af153efe39963d7a6b9668f libinput-1.3.901.tar.xz From 3959d485f5538f2b77ef2566f5e3e5d6a695e370 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 Jul 2016 14:23:41 +1000 Subject: [PATCH 088/317] libinput 1.4 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 66fa7ae..a39d2e1 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ /libinput-1.3.2.tar.xz /libinput-1.3.3.tar.xz /libinput-1.3.901.tar.xz +/libinput-1.4.0.tar.xz diff --git a/libinput.spec b/libinput.spec index 900131f..652f236 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.3.901 +Version: 1.4.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Jul 18 2016 Peter Hutterer 1.4.0-1 +- libinput 1.4 + * Tue Jul 12 2016 Peter Hutterer 1.3.901-1 - libinput 1.4rc1 diff --git a/sources b/sources index 362e15a..2dd7468 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3c809ff90af153efe39963d7a6b9668f libinput-1.3.901.tar.xz +643d21c63d5dcc2d73de3d573e9f7538 libinput-1.4.0.tar.xz From a044152ca2f2bd493c7e53b9c9768f66a4b59dc1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 5 Aug 2016 13:14:11 +1000 Subject: [PATCH 089/317] libinput 1.4.1 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a39d2e1..ae46d65 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ /libinput-1.3.3.tar.xz /libinput-1.3.901.tar.xz /libinput-1.4.0.tar.xz +/libinput-1.4.1.tar.xz diff --git a/libinput.spec b/libinput.spec index 652f236..74e6674 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.4.0 +Version: 1.4.1 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Aug 05 2016 Peter Hutterer 1.4.1-1 +- libinput 1.4.1 + * Mon Jul 18 2016 Peter Hutterer 1.4.0-1 - libinput 1.4 diff --git a/sources b/sources index 2dd7468..c7d224b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -643d21c63d5dcc2d73de3d573e9f7538 libinput-1.4.0.tar.xz +2e7ba577ed74d8d1baeb07dbd4fb912a libinput-1.4.1.tar.xz From 6df9494799df90364966196af2e3af2836e9e179 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 30 Aug 2016 16:56:06 +1000 Subject: [PATCH 090/317] libinput 1.4.2 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ae46d65..77180f9 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,4 @@ /libinput-1.3.901.tar.xz /libinput-1.4.0.tar.xz /libinput-1.4.1.tar.xz +/libinput-1.4.2.tar.xz diff --git a/libinput.spec b/libinput.spec index 74e6674..622fd15 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.4.1 +Version: 1.4.2 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -97,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Aug 30 2016 Peter Hutterer 1.4.2-1 +- libinput 1.4.2 + * Fri Aug 05 2016 Peter Hutterer 1.4.1-1 - libinput 1.4.1 diff --git a/sources b/sources index c7d224b..2506d69 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2e7ba577ed74d8d1baeb07dbd4fb912a libinput-1.4.1.tar.xz +56b72e47362938f12ab3267cae764dd3 libinput-1.4.2.tar.xz From 8a3bde9f61004cb109a8140a042fa339fce5e47f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 31 Aug 2016 10:28:38 +1000 Subject: [PATCH 091/317] Add quirk for the HP 8510w touchpad (#1351285) --- ...v-add-quirk-for-the-HP85810-touchpad.patch | 78 +++++++++++++++++++ libinput.spec | 7 +- 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 0001-evdev-add-quirk-for-the-HP85810-touchpad.patch diff --git a/0001-evdev-add-quirk-for-the-HP85810-touchpad.patch b/0001-evdev-add-quirk-for-the-HP85810-touchpad.patch new file mode 100644 index 0000000..5e544bd --- /dev/null +++ b/0001-evdev-add-quirk-for-the-HP85810-touchpad.patch @@ -0,0 +1,78 @@ +From a862c7d40f02423106fa23285eda93845cb57b91 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 30 Aug 2016 17:51:30 +1000 +Subject: [PATCH libinput] evdev: add quirk for the HP85810 touchpad + +The touchpad's says it can do two- and three-finger detection but it never +sends events for it. Disable them so we treat it as pure single-finger +touchpad. + +https://bugzilla.redhat.com/show_bug.cgi?id=1351285 + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 9 +++++++++ + src/evdev.h | 1 + + udev/90-libinput-model-quirks.hwdb | 7 +++++++ + 3 files changed, 17 insertions(+) + +diff --git a/src/evdev.c b/src/evdev.c +index c3ca64c..60aa34a 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1807,6 +1807,7 @@ evdev_read_model_flags(struct evdev_device *device) + MODEL(DELL_TOUCHPAD), + MODEL(TRACKBALL), + MODEL(APPLE_MAGICMOUSE), ++ MODEL(HP8510_TOUCHPAD), + { NULL, EVDEV_MODEL_DEFAULT }, + #undef MODEL + }; +@@ -2430,6 +2431,14 @@ evdev_pre_configure_model_quirks(struct evdev_device *device) + */ + if (device->model_flags & EVDEV_MODEL_APPLE_MAGICMOUSE) + libevdev_disable_event_type(device->evdev, EV_ABS); ++ ++ /* Claims to have double/tripletap but doesn't actually send it ++ * https://bugzilla.redhat.com/show_bug.cgi?id=1351285 ++ */ ++ if (device->model_flags & EVDEV_MODEL_HP8510_TOUCHPAD) { ++ libevdev_disable_event_code(device->evdev, EV_KEY, BTN_TOOL_DOUBLETAP); ++ libevdev_disable_event_code(device->evdev, EV_KEY, BTN_TOOL_TRIPLETAP); ++ } + } + + struct evdev_device * +diff --git a/src/evdev.h b/src/evdev.h +index f9c0dd1..20369a7 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -118,6 +118,7 @@ enum evdev_device_model { + EVDEV_MODEL_DELL_TOUCHPAD = (1 << 18), + EVDEV_MODEL_TRACKBALL = (1 << 19), + EVDEV_MODEL_APPLE_MAGICMOUSE = (1 << 20), ++ EVDEV_MODEL_HP8510_TOUCHPAD = (1 << 21), + }; + + struct mt_slot { +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index ebce8d2..2bccc71 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -87,6 +87,13 @@ libinput:name:Cypress APA Trackpad ?cyapa?:dmi:* + LIBINPUT_MODEL_CYAPA=1 + + ########################################## ++# HP ++########################################## ++# ++libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPCompaq8510w* ++ LIBINPUT_MODEL_HP8510_TOUCHPAD=1 ++ ++########################################## + # LENOVO + ########################################## + +-- +2.7.4 + diff --git a/libinput.spec b/libinput.spec index 622fd15..5d075c2 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.4.2 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,6 +21,8 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 +Patch02: 0001-evdev-add-quirk-for-the-HP85810-touchpad.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -97,6 +99,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Aug 31 2016 Peter Hutterer 1.4.2-2 +- Add quirk for the HP 8510w touchpad (#1351285) + * Tue Aug 30 2016 Peter Hutterer 1.4.2-1 - libinput 1.4.2 From 2c7e66daa95ee3b24b758c0f5b80bfe24d43ed16 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 7 Sep 2016 14:00:56 +1000 Subject: [PATCH 092/317] libinput 1.5rc1 --- .gitignore | 1 + ...v-add-quirk-for-the-HP85810-touchpad.patch | 78 ------------------- libinput.spec | 9 ++- sources | 2 +- 4 files changed, 7 insertions(+), 83 deletions(-) delete mode 100644 0001-evdev-add-quirk-for-the-HP85810-touchpad.patch diff --git a/.gitignore b/.gitignore index 77180f9..e9319d4 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,4 @@ /libinput-1.4.0.tar.xz /libinput-1.4.1.tar.xz /libinput-1.4.2.tar.xz +/libinput-1.4.901.tar.xz diff --git a/0001-evdev-add-quirk-for-the-HP85810-touchpad.patch b/0001-evdev-add-quirk-for-the-HP85810-touchpad.patch deleted file mode 100644 index 5e544bd..0000000 --- a/0001-evdev-add-quirk-for-the-HP85810-touchpad.patch +++ /dev/null @@ -1,78 +0,0 @@ -From a862c7d40f02423106fa23285eda93845cb57b91 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 30 Aug 2016 17:51:30 +1000 -Subject: [PATCH libinput] evdev: add quirk for the HP85810 touchpad - -The touchpad's says it can do two- and three-finger detection but it never -sends events for it. Disable them so we treat it as pure single-finger -touchpad. - -https://bugzilla.redhat.com/show_bug.cgi?id=1351285 - -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 9 +++++++++ - src/evdev.h | 1 + - udev/90-libinput-model-quirks.hwdb | 7 +++++++ - 3 files changed, 17 insertions(+) - -diff --git a/src/evdev.c b/src/evdev.c -index c3ca64c..60aa34a 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1807,6 +1807,7 @@ evdev_read_model_flags(struct evdev_device *device) - MODEL(DELL_TOUCHPAD), - MODEL(TRACKBALL), - MODEL(APPLE_MAGICMOUSE), -+ MODEL(HP8510_TOUCHPAD), - { NULL, EVDEV_MODEL_DEFAULT }, - #undef MODEL - }; -@@ -2430,6 +2431,14 @@ evdev_pre_configure_model_quirks(struct evdev_device *device) - */ - if (device->model_flags & EVDEV_MODEL_APPLE_MAGICMOUSE) - libevdev_disable_event_type(device->evdev, EV_ABS); -+ -+ /* Claims to have double/tripletap but doesn't actually send it -+ * https://bugzilla.redhat.com/show_bug.cgi?id=1351285 -+ */ -+ if (device->model_flags & EVDEV_MODEL_HP8510_TOUCHPAD) { -+ libevdev_disable_event_code(device->evdev, EV_KEY, BTN_TOOL_DOUBLETAP); -+ libevdev_disable_event_code(device->evdev, EV_KEY, BTN_TOOL_TRIPLETAP); -+ } - } - - struct evdev_device * -diff --git a/src/evdev.h b/src/evdev.h -index f9c0dd1..20369a7 100644 ---- a/src/evdev.h -+++ b/src/evdev.h -@@ -118,6 +118,7 @@ enum evdev_device_model { - EVDEV_MODEL_DELL_TOUCHPAD = (1 << 18), - EVDEV_MODEL_TRACKBALL = (1 << 19), - EVDEV_MODEL_APPLE_MAGICMOUSE = (1 << 20), -+ EVDEV_MODEL_HP8510_TOUCHPAD = (1 << 21), - }; - - struct mt_slot { -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index ebce8d2..2bccc71 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -87,6 +87,13 @@ libinput:name:Cypress APA Trackpad ?cyapa?:dmi:* - LIBINPUT_MODEL_CYAPA=1 - - ########################################## -+# HP -+########################################## -+# -+libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPCompaq8510w* -+ LIBINPUT_MODEL_HP8510_TOUCHPAD=1 -+ -+########################################## - # LENOVO - ########################################## - --- -2.7.4 - diff --git a/libinput.spec b/libinput.spec index 5d075c2..8649362 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.4.2 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.4.901 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,8 +21,6 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 -Patch02: 0001-evdev-add-quirk-for-the-HP85810-touchpad.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -99,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Sep 07 2016 Peter Hutterer 1.4.901-1 +- libinput 1.5rc1 + * Wed Aug 31 2016 Peter Hutterer 1.4.2-2 - Add quirk for the HP 8510w touchpad (#1351285) diff --git a/sources b/sources index 2506d69..85086f1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -56b72e47362938f12ab3267cae764dd3 libinput-1.4.2.tar.xz +c8c868a3151016c45505c1a9e4fb13dc libinput-1.4.901.tar.xz From 9ddff3b1ac385593b8bafabc7e7871ef4d3b6e6f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 Sep 2016 10:29:00 +1000 Subject: [PATCH 093/317] Avoid spurious trackpoint events halting the touchpad (related #1364850) --- ...-at-least-3-events-before-enabling-t.patch | 113 ++++++++++++++++++ libinput.spec | 6 +- 2 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-require-at-least-3-events-before-enabling-t.patch diff --git a/0001-touchpad-require-at-least-3-events-before-enabling-t.patch b/0001-touchpad-require-at-least-3-events-before-enabling-t.patch new file mode 100644 index 0000000..00247ed --- /dev/null +++ b/0001-touchpad-require-at-least-3-events-before-enabling-t.patch @@ -0,0 +1,113 @@ +From d725d39ddd56166d1f6c24094b493777831a36c1 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 7 Sep 2016 08:18:33 +1000 +Subject: [PATCH libinput] touchpad: require at least 3 events before enabling + trackpoint palm detection + +Some trackpoints, notably the one on the Lenovo T460s have a tendency to send +the odd event even when they're not actually used. Trackpoint events trigger +palm detection (see 0210f1fee193) and thus effectively disable the touchpad, +causing the touchpad to appear nonresponsive. + +Fix this by requiring at least 3 events from a trackpoint before palm +detection is enabled. For normal use it's hard enough to trigger a single +event anyway so this should not affect the normal use-case. + +Signed-off-by: Peter Hutterer +--- + src/evdev-mt-touchpad.c | 9 ++++++++- + src/evdev-mt-touchpad.h | 1 + + test/trackpoint.c | 26 ++++++++++++++++++++++++++ + 3 files changed, 35 insertions(+), 1 deletion(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 2354061..38b638b 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1305,6 +1305,7 @@ tp_trackpoint_timeout(uint64_t now, void *data) + + tp_tap_resume(tp, now); + tp->palm.trackpoint_active = false; ++ tp->palm.trackpoint_event_count = 0; + } + + static void +@@ -1317,6 +1318,13 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data) + if (event->type == LIBINPUT_EVENT_POINTER_BUTTON) + return; + ++ tp->palm.trackpoint_last_event_time = time; ++ tp->palm.trackpoint_event_count++; ++ ++ /* Require at least three events before enabling palm detection */ ++ if (tp->palm.trackpoint_event_count < 3) ++ return; ++ + if (!tp->palm.trackpoint_active) { + tp_edge_scroll_stop_events(tp, time); + tp_gesture_cancel(tp, time); +@@ -1324,7 +1332,6 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data) + tp->palm.trackpoint_active = true; + } + +- tp->palm.trackpoint_last_event_time = time; + libinput_timer_set(&tp->palm.trackpoint_timer, + time + DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT); + } +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index de9bdb5..f4ad090 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -341,6 +341,7 @@ struct tp_dispatch { + struct libinput_event_listener trackpoint_listener; + struct libinput_timer trackpoint_timer; + uint64_t trackpoint_last_event_time; ++ uint32_t trackpoint_event_count; + bool monitor_trackpoint; + } palm; + +diff --git a/test/trackpoint.c b/test/trackpoint.c +index b92b994..e9ba027 100644 +--- a/test/trackpoint.c ++++ b/test/trackpoint.c +@@ -349,6 +349,31 @@ START_TEST(trackpoint_palmdetect_resume_touch) + } + END_TEST + ++START_TEST(trackpoint_palmdetect_require_min_events) ++{ ++ struct litest_device *trackpoint = litest_current_device(); ++ struct litest_device *touchpad; ++ struct libinput *li = trackpoint->libinput; ++ ++ touchpad = litest_add_device(li, LITEST_SYNAPTICS_I2C); ++ litest_drain_events(li); ++ ++ /* A single event does not trigger palm detection */ ++ litest_event(trackpoint, EV_REL, REL_X, 1); ++ litest_event(trackpoint, EV_REL, REL_Y, 1); ++ litest_event(trackpoint, EV_SYN, SYN_REPORT, 0); ++ libinput_dispatch(li); ++ litest_drain_events(li); ++ ++ litest_touch_down(touchpad, 0, 30, 30); ++ litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10, 1); ++ litest_touch_up(touchpad, 0); ++ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); ++ ++ litest_delete_device(touchpad); ++} ++END_TEST ++ + void + litest_setup_tests_trackpoint(void) + { +@@ -362,4 +387,5 @@ litest_setup_tests_trackpoint(void) + + litest_add("trackpoint:palmdetect", trackpoint_palmdetect, LITEST_POINTINGSTICK, LITEST_ANY); + litest_add("trackpoint:palmdetect", trackpoint_palmdetect_resume_touch, LITEST_POINTINGSTICK, LITEST_ANY); ++ litest_add("trackpoint:palmdetect", trackpoint_palmdetect_require_min_events, LITEST_POINTINGSTICK, LITEST_ANY); + } +-- +2.7.4 + diff --git a/libinput.spec b/libinput.spec index 8649362..7c31c73 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.4.901 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -20,6 +20,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 +Patch02: 0001-touchpad-require-at-least-3-events-before-enabling-t.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -97,6 +98,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Sep 08 2016 Peter Hutterer 1.4.901-2 +- Avoid spurious trackpoint events halting the touchpad (related #1364850) + * Wed Sep 07 2016 Peter Hutterer 1.4.901-1 - libinput 1.5rc1 From fe775bd2e0797cbdf4fadd6f4afeeee10c0dfe77 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 Sep 2016 16:09:47 +1000 Subject: [PATCH 094/317] libinput 1.5.0 --- .gitignore | 1 + ...-at-least-3-events-before-enabling-t.patch | 113 ------------------ libinput.spec | 8 +- sources | 2 +- 4 files changed, 7 insertions(+), 117 deletions(-) delete mode 100644 0001-touchpad-require-at-least-3-events-before-enabling-t.patch diff --git a/.gitignore b/.gitignore index e9319d4..99b7154 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ /libinput-1.4.1.tar.xz /libinput-1.4.2.tar.xz /libinput-1.4.901.tar.xz +/libinput-1.5.0.tar.xz diff --git a/0001-touchpad-require-at-least-3-events-before-enabling-t.patch b/0001-touchpad-require-at-least-3-events-before-enabling-t.patch deleted file mode 100644 index 00247ed..0000000 --- a/0001-touchpad-require-at-least-3-events-before-enabling-t.patch +++ /dev/null @@ -1,113 +0,0 @@ -From d725d39ddd56166d1f6c24094b493777831a36c1 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 7 Sep 2016 08:18:33 +1000 -Subject: [PATCH libinput] touchpad: require at least 3 events before enabling - trackpoint palm detection - -Some trackpoints, notably the one on the Lenovo T460s have a tendency to send -the odd event even when they're not actually used. Trackpoint events trigger -palm detection (see 0210f1fee193) and thus effectively disable the touchpad, -causing the touchpad to appear nonresponsive. - -Fix this by requiring at least 3 events from a trackpoint before palm -detection is enabled. For normal use it's hard enough to trigger a single -event anyway so this should not affect the normal use-case. - -Signed-off-by: Peter Hutterer ---- - src/evdev-mt-touchpad.c | 9 ++++++++- - src/evdev-mt-touchpad.h | 1 + - test/trackpoint.c | 26 ++++++++++++++++++++++++++ - 3 files changed, 35 insertions(+), 1 deletion(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 2354061..38b638b 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -1305,6 +1305,7 @@ tp_trackpoint_timeout(uint64_t now, void *data) - - tp_tap_resume(tp, now); - tp->palm.trackpoint_active = false; -+ tp->palm.trackpoint_event_count = 0; - } - - static void -@@ -1317,6 +1318,13 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data) - if (event->type == LIBINPUT_EVENT_POINTER_BUTTON) - return; - -+ tp->palm.trackpoint_last_event_time = time; -+ tp->palm.trackpoint_event_count++; -+ -+ /* Require at least three events before enabling palm detection */ -+ if (tp->palm.trackpoint_event_count < 3) -+ return; -+ - if (!tp->palm.trackpoint_active) { - tp_edge_scroll_stop_events(tp, time); - tp_gesture_cancel(tp, time); -@@ -1324,7 +1332,6 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data) - tp->palm.trackpoint_active = true; - } - -- tp->palm.trackpoint_last_event_time = time; - libinput_timer_set(&tp->palm.trackpoint_timer, - time + DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT); - } -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index de9bdb5..f4ad090 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -341,6 +341,7 @@ struct tp_dispatch { - struct libinput_event_listener trackpoint_listener; - struct libinput_timer trackpoint_timer; - uint64_t trackpoint_last_event_time; -+ uint32_t trackpoint_event_count; - bool monitor_trackpoint; - } palm; - -diff --git a/test/trackpoint.c b/test/trackpoint.c -index b92b994..e9ba027 100644 ---- a/test/trackpoint.c -+++ b/test/trackpoint.c -@@ -349,6 +349,31 @@ START_TEST(trackpoint_palmdetect_resume_touch) - } - END_TEST - -+START_TEST(trackpoint_palmdetect_require_min_events) -+{ -+ struct litest_device *trackpoint = litest_current_device(); -+ struct litest_device *touchpad; -+ struct libinput *li = trackpoint->libinput; -+ -+ touchpad = litest_add_device(li, LITEST_SYNAPTICS_I2C); -+ litest_drain_events(li); -+ -+ /* A single event does not trigger palm detection */ -+ litest_event(trackpoint, EV_REL, REL_X, 1); -+ litest_event(trackpoint, EV_REL, REL_Y, 1); -+ litest_event(trackpoint, EV_SYN, SYN_REPORT, 0); -+ libinput_dispatch(li); -+ litest_drain_events(li); -+ -+ litest_touch_down(touchpad, 0, 30, 30); -+ litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10, 1); -+ litest_touch_up(touchpad, 0); -+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); -+ -+ litest_delete_device(touchpad); -+} -+END_TEST -+ - void - litest_setup_tests_trackpoint(void) - { -@@ -362,4 +387,5 @@ litest_setup_tests_trackpoint(void) - - litest_add("trackpoint:palmdetect", trackpoint_palmdetect, LITEST_POINTINGSTICK, LITEST_ANY); - litest_add("trackpoint:palmdetect", trackpoint_palmdetect_resume_touch, LITEST_POINTINGSTICK, LITEST_ANY); -+ litest_add("trackpoint:palmdetect", trackpoint_palmdetect_require_min_events, LITEST_POINTINGSTICK, LITEST_ANY); - } --- -2.7.4 - diff --git a/libinput.spec b/libinput.spec index 7c31c73..1a5efb4 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.4.901 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.5.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -20,7 +20,6 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # 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 -Patch02: 0001-touchpad-require-at-least-3-events-before-enabling-t.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -98,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Sep 14 2016 Peter Hutterer 1.5.0-1 +- libinput 1.5.0 + * Thu Sep 08 2016 Peter Hutterer 1.4.901-2 - Avoid spurious trackpoint events halting the touchpad (related #1364850) diff --git a/sources b/sources index 85086f1..c927a0a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c8c868a3151016c45505c1a9e4fb13dc libinput-1.4.901.tar.xz +26030dae25f1ac584b0e428c90473339 libinput-1.5.0.tar.xz From 5c3e81eb3a9542506c8aaabaf951dd9e6baba45f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 Sep 2016 16:51:06 +1000 Subject: [PATCH 095/317] Drop the synaptics 3-slot workaround --- ...synaptics-need-to-fake-new-touches-o.patch | 60 ------------------- libinput.spec | 8 +-- 2 files changed, 4 insertions(+), 64 deletions(-) delete mode 100644 0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch diff --git a/0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch b/0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch deleted file mode 100644 index 1b3dba8..0000000 --- a/0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 253f8e4152b6c36b87756bb23b16512c3abf7cb8 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -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 -Signed-off-by: Peter Hutterer -Tested-by: Jan Alexander Steffens -Reviewed-by: Hans de Goede ---- - 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 - diff --git a/libinput.spec b/libinput.spec index 1a5efb4..9033d9a 100644 --- a/libinput.spec +++ b/libinput.spec @@ -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 1.5.0-2 +- Drop the synaptics 3-slot workaround + * Wed Sep 14 2016 Peter Hutterer 1.5.0-1 - libinput 1.5.0 From 8644d0574af14cde1f24740da83d2bd2bdd9914f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 11 Nov 2016 14:15:01 +1000 Subject: [PATCH 096/317] libinput 1.5.1 --- .gitignore | 1 + libinput.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 99b7154..a8852de 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,4 @@ /libinput-1.4.2.tar.xz /libinput-1.4.901.tar.xz /libinput-1.5.0.tar.xz +/libinput-1.5.1.tar.xz diff --git a/libinput.spec b/libinput.spec index 9033d9a..a5ff339 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.5.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.5.1 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -94,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Nov 11 2016 Peter Hutterer 1.5.1-1 +- libinput 1.5.1 + * Wed Sep 14 2016 Peter Hutterer 1.5.0-2 - Drop the synaptics 3-slot workaround diff --git a/sources b/sources index c927a0a..d0f0a25 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -26030dae25f1ac584b0e428c90473339 libinput-1.5.0.tar.xz +23a7bc2dad6ff701d2b82d2e5b218051 libinput-1.5.1.tar.xz From 41496b9261bed1fd99a6981e2ea0bb1b474f718d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 22 Nov 2016 10:31:04 +1000 Subject: [PATCH 097/317] Improve responsiveness of touchpads by reducing the motion history. --- ...e-the-last-two-coordinates-for-delta.patch | 62 +++++++++++++++++++ libinput.spec | 7 ++- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-only-use-the-last-two-coordinates-for-delta.patch diff --git a/0001-touchpad-only-use-the-last-two-coordinates-for-delta.patch b/0001-touchpad-only-use-the-last-two-coordinates-for-delta.patch new file mode 100644 index 0000000..5116234 --- /dev/null +++ b/0001-touchpad-only-use-the-last-two-coordinates-for-delta.patch @@ -0,0 +1,62 @@ +From e288c3045d0c582ee19e85cbe11529dc374d4bbf Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 21 Nov 2016 08:39:47 +1000 +Subject: [PATCH libinput] touchpad: only use the last two coordinates for + delta calculation + +Taking the last 4 points means factoring in a coordinate that may be more than +40ms in the past - or even more when the finger moves slowly and we don't get +events for a while. This makes the pointer more sluggish and slower to catch up +with what the finger is actually doing. + +We already have the motion hysteresis as a separate item to prevent jumps (and +thus adds some delay to the movement), the calculation over time doesn't +provide enough benefit to justify the sluggish pointer. + +Signed-off-by: Peter Hutterer +--- + src/evdev-mt-touchpad.c | 20 +++++--------------- + 1 file changed, 5 insertions(+), 15 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index d72cb19..7b8514c 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -262,29 +262,19 @@ tp_end_sequence(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + tp_end_touch(tp, t, time); + } + +-static double +-tp_estimate_delta(int x0, int x1, int x2, int x3) +-{ +- return (x0 + x1 - x2 - x3) / 4.0; +-} +- + struct normalized_coords + tp_get_delta(struct tp_touch *t) + { + struct device_float_coords delta; + const struct normalized_coords zero = { 0.0, 0.0 }; + +- if (t->history.count < TOUCHPAD_MIN_SAMPLES) ++ if (t->history.count <= 1) + return zero; + +- delta.x = tp_estimate_delta(tp_motion_history_offset(t, 0)->x, +- tp_motion_history_offset(t, 1)->x, +- tp_motion_history_offset(t, 2)->x, +- tp_motion_history_offset(t, 3)->x); +- delta.y = tp_estimate_delta(tp_motion_history_offset(t, 0)->y, +- tp_motion_history_offset(t, 1)->y, +- tp_motion_history_offset(t, 2)->y, +- tp_motion_history_offset(t, 3)->y); ++ delta.x = tp_motion_history_offset(t, 0)->x - ++ tp_motion_history_offset(t, 1)->x; ++ delta.y = tp_motion_history_offset(t, 0)->y - ++ tp_motion_history_offset(t, 1)->y; + + return tp_normalize_delta(t->tp, delta); + } +-- +2.9.3 + diff --git a/libinput.spec b/libinput.spec index a5ff339..8a6516d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.5.1 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-touchpad-only-use-the-last-two-coordinates-for-delta.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -94,6 +96,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Nov 22 2016 Peter Hutterer 1.5.1-2 +- Improve responsiveness of touchpads by reducing the motion history. + * Fri Nov 11 2016 Peter Hutterer 1.5.1-1 - libinput 1.5.1 From aaa5726f363cf672304ecb52bb193b9c5b49a4d1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Nov 2016 11:23:43 +1000 Subject: [PATCH 098/317] libinput 1.5.2 --- .gitignore | 1 + libinput.spec | 9 +++++---- sources | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index a8852de..658f810 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ /libinput-1.4.901.tar.xz /libinput-1.5.0.tar.xz /libinput-1.5.1.tar.xz +/libinput-1.5.2.tar.xz diff --git a/libinput.spec b/libinput.spec index 8a6516d..bb1b582 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.5.1 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.5.2 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,8 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-touchpad-only-use-the-last-two-coordinates-for-delta.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -96,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Nov 25 2016 Peter Hutterer 1.5.2-1 +- libinput 1.5.2 + * Tue Nov 22 2016 Peter Hutterer 1.5.1-2 - Improve responsiveness of touchpads by reducing the motion history. diff --git a/sources b/sources index d0f0a25..6387000 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -23a7bc2dad6ff701d2b82d2e5b218051 libinput-1.5.1.tar.xz +78f6de46eb44564ccbb76cb56f043fe6 libinput-1.5.2.tar.xz From 90301a03067f87da2c7ad7e0807fbcb7c4ad0587 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Nov 2016 11:41:23 +1000 Subject: [PATCH 099/317] Swap to the correct tarball so we match the checksums from upstream (had a local mixup of tarballs) --- libinput.spec | 6 +++++- sources | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index bb1b582..c7389ff 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.5.2 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -94,6 +94,10 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Nov 25 2016 Peter Hutterer 1.5.2-2 +- Swap to the correct tarball so we match the checksums from upstream (had a + local mixup of tarballs) + * Fri Nov 25 2016 Peter Hutterer 1.5.2-1 - libinput 1.5.2 diff --git a/sources b/sources index 6387000..5abb21f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -78f6de46eb44564ccbb76cb56f043fe6 libinput-1.5.2.tar.xz +387d47191eb9c34bf27aecfd7a0a2f34 libinput-1.5.2.tar.xz From 17bf07bf6b20843f4c987b578d49872486679515 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 7 Dec 2016 16:43:23 +1000 Subject: [PATCH 100/317] libinput 1.5.3 --- .gitignore | 1 + libinput.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 658f810..8c3a6b8 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ /libinput-1.5.0.tar.xz /libinput-1.5.1.tar.xz /libinput-1.5.2.tar.xz +/libinput-1.5.3.tar.xz diff --git a/libinput.spec b/libinput.spec index c7389ff..9431505 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.5.2 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.5.3 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -94,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Dec 07 2016 Peter Hutterer 1.5.3-1 +- libinput 1.5.3 + * Fri Nov 25 2016 Peter Hutterer 1.5.2-2 - Swap to the correct tarball so we match the checksums from upstream (had a local mixup of tarballs) diff --git a/sources b/sources index 5abb21f..472ef1f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -387d47191eb9c34bf27aecfd7a0a2f34 libinput-1.5.2.tar.xz +5df5e7f1a693bf74bbab0c804d1b710b libinput-1.5.3.tar.xz From b8f82e97379bd440960d5ba832cc2a011e8acbc1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 10 Jan 2017 14:21:17 +1000 Subject: [PATCH 101/317] libinput 1.6rc1 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8c3a6b8..cbf1cfe 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ /libinput-1.5.1.tar.xz /libinput-1.5.2.tar.xz /libinput-1.5.3.tar.xz +/libinput-1.5.901.tar.xz diff --git a/libinput.spec b/libinput.spec index 9431505..59aa1cf 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.5.3 +Version: 1.5.901 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -94,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Jan 10 2017 Peter Hutterer 1.5.901-1 +- libinput 1.6rc1 + * Wed Dec 07 2016 Peter Hutterer 1.5.3-1 - libinput 1.5.3 diff --git a/sources b/sources index 472ef1f..1382e95 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5df5e7f1a693bf74bbab0c804d1b710b libinput-1.5.3.tar.xz +SHA512 (libinput-1.5.901.tar.xz) = 54cf8c78cec95a09192332497be12e80a044ebb8ad2d8865af86fc01f7ae9c8bb992e794fe1fadaf113e06d43c413b11dd36569016206200cd5ab01f97102b3b From 37b99c2ae3dc66f72e64824acc6b3e9d4de278b8 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 12 Jan 2017 15:01:20 +1000 Subject: [PATCH 102/317] Drop now obsolete patch --- ...e-the-last-two-coordinates-for-delta.patch | 62 ------------------- 1 file changed, 62 deletions(-) delete mode 100644 0001-touchpad-only-use-the-last-two-coordinates-for-delta.patch diff --git a/0001-touchpad-only-use-the-last-two-coordinates-for-delta.patch b/0001-touchpad-only-use-the-last-two-coordinates-for-delta.patch deleted file mode 100644 index 5116234..0000000 --- a/0001-touchpad-only-use-the-last-two-coordinates-for-delta.patch +++ /dev/null @@ -1,62 +0,0 @@ -From e288c3045d0c582ee19e85cbe11529dc374d4bbf Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 21 Nov 2016 08:39:47 +1000 -Subject: [PATCH libinput] touchpad: only use the last two coordinates for - delta calculation - -Taking the last 4 points means factoring in a coordinate that may be more than -40ms in the past - or even more when the finger moves slowly and we don't get -events for a while. This makes the pointer more sluggish and slower to catch up -with what the finger is actually doing. - -We already have the motion hysteresis as a separate item to prevent jumps (and -thus adds some delay to the movement), the calculation over time doesn't -provide enough benefit to justify the sluggish pointer. - -Signed-off-by: Peter Hutterer ---- - src/evdev-mt-touchpad.c | 20 +++++--------------- - 1 file changed, 5 insertions(+), 15 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index d72cb19..7b8514c 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -262,29 +262,19 @@ tp_end_sequence(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - tp_end_touch(tp, t, time); - } - --static double --tp_estimate_delta(int x0, int x1, int x2, int x3) --{ -- return (x0 + x1 - x2 - x3) / 4.0; --} -- - struct normalized_coords - tp_get_delta(struct tp_touch *t) - { - struct device_float_coords delta; - const struct normalized_coords zero = { 0.0, 0.0 }; - -- if (t->history.count < TOUCHPAD_MIN_SAMPLES) -+ if (t->history.count <= 1) - return zero; - -- delta.x = tp_estimate_delta(tp_motion_history_offset(t, 0)->x, -- tp_motion_history_offset(t, 1)->x, -- tp_motion_history_offset(t, 2)->x, -- tp_motion_history_offset(t, 3)->x); -- delta.y = tp_estimate_delta(tp_motion_history_offset(t, 0)->y, -- tp_motion_history_offset(t, 1)->y, -- tp_motion_history_offset(t, 2)->y, -- tp_motion_history_offset(t, 3)->y); -+ delta.x = tp_motion_history_offset(t, 0)->x - -+ tp_motion_history_offset(t, 1)->x; -+ delta.y = tp_motion_history_offset(t, 0)->y - -+ tp_motion_history_offset(t, 1)->y; - - return tp_normalize_delta(t->tp, delta); - } --- -2.9.3 - From 4ce26533576492e1b1fb9bf5ed92e1e6337845de Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 12 Jan 2017 15:02:26 +1000 Subject: [PATCH 103/317] Tidy up gitignore file --- .gitignore | 56 ------------------------------------------------------ 1 file changed, 56 deletions(-) diff --git a/.gitignore b/.gitignore index cbf1cfe..76dcce5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,57 +1 @@ -/libinput-0.1.0.tar.xz -/libinput-0.2.0.tar.xz -/libinput-0.4.0.tar.xz -/libinput-0.5.0.tar.xz -/libinput-0.6.0.tar.xz -/libinput-20141124.tar.xz -/libinput-0.7.0.tar.xz -/libinput-20141211.tar.xz -/libinput-0.8.0.tar.xz -/libinput-0.9.0.tar.xz -/libinput-0.10.0.tar.xz -/libinput-0.11.0.tar.xz -/libinput-0.12.0.tar.xz -/libinput-0.13.0.tar.xz -/libinput-0.14.1.tar.xz -/libinput-0.15.0.tar.xz -/libinput-0.16.0.tar.xz -/libinput-0.17.0.tar.xz -/libinput-0.18.0.tar.xz -/libinput-0.19.0.tar.xz -/libinput-0.20.0.tar.xz -/libinput-0.21.0.tar.xz -/libinput-0.99.1.tar.xz -/libinput-1.0.0.tar.xz -/libinput-1.0.1.tar.xz -/libinput-1.0.2.tar.xz -/libinput-1.1.0.tar.xz -/libinput-1.1.1.tar.xz -/libinput-1.1.2.tar.xz -/libinput-1.1.3.tar.xz -/libinput-1.1.4.tar.xz -/libinput-1.1.5.tar.xz -/libinput-1.1.6.tar.xz -/libinput-1.1.7.tar.xz -/libinput-1.1.902.tar.xz -/libinput-1.2.0.tar.xz -/libinput-1.2.1.tar.xz -/libinput-1.2.2.tar.xz -/libinput-1.2.3.tar.xz -/libinput-1.2.4.tar.xz -/libinput-1.2.901.tar.xz -/libinput-1.2.902.tar.xz -/libinput-1.2.903.tar.xz -/libinput-1.3.0.tar.xz -/libinput-1.3.1.tar.xz -/libinput-1.3.2.tar.xz -/libinput-1.3.3.tar.xz -/libinput-1.3.901.tar.xz -/libinput-1.4.0.tar.xz -/libinput-1.4.1.tar.xz -/libinput-1.4.2.tar.xz -/libinput-1.4.901.tar.xz -/libinput-1.5.0.tar.xz -/libinput-1.5.1.tar.xz -/libinput-1.5.2.tar.xz -/libinput-1.5.3.tar.xz /libinput-1.5.901.tar.xz From 9ab2c3940cd36eeb5dcb6cba91f73c7cdfdde581 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 16 Jan 2017 13:28:38 +1000 Subject: [PATCH 104/317] libinput 1.6rc2 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 76dcce5..c1518fd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /libinput-1.5.901.tar.xz +/libinput-1.5.902.tar.xz diff --git a/libinput.spec b/libinput.spec index 59aa1cf..f0744ce 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.5.901 +Version: 1.5.902 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -94,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Jan 16 2017 Peter Hutterer 1.5.902-1 +- libinput 1.6rc2 + * Tue Jan 10 2017 Peter Hutterer 1.5.901-1 - libinput 1.6rc1 diff --git a/sources b/sources index 1382e95..25a4c4c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.5.901.tar.xz) = 54cf8c78cec95a09192332497be12e80a044ebb8ad2d8865af86fc01f7ae9c8bb992e794fe1fadaf113e06d43c413b11dd36569016206200cd5ab01f97102b3b +SHA512 (libinput-1.5.902.tar.xz) = df44c0d98ce774629c871c96459cf8883727b930c4fcfd7dcc36f28e6915795159ec83730fc6e6be8304c8125cb0bebe0a2b7615b3283eb387dcb3ced7bbe8f9 From 544ac75aafe120d4f6d88b4e628695c90ed4f47c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 20 Jan 2017 09:43:19 +1000 Subject: [PATCH 105/317] libinput 1.6 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c1518fd..5affb83 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /libinput-1.5.901.tar.xz /libinput-1.5.902.tar.xz +/libinput-1.6.0.tar.xz diff --git a/libinput.spec b/libinput.spec index f0744ce..1ce3f5e 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.5.902 +Version: 1.6.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -94,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Jan 20 2017 Peter Hutterer 1.6.0-1 +- libinput 1.6 + * Mon Jan 16 2017 Peter Hutterer 1.5.902-1 - libinput 1.6rc2 diff --git a/sources b/sources index 25a4c4c..4f5db74 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.5.902.tar.xz) = df44c0d98ce774629c871c96459cf8883727b930c4fcfd7dcc36f28e6915795159ec83730fc6e6be8304c8125cb0bebe0a2b7615b3283eb387dcb3ced7bbe8f9 +SHA512 (libinput-1.6.0.tar.xz) = 0e52f70fc5b1aa1e9c0621770ba2530f1652611aff1a557ac8083559e22293942d7c468f9bafe9e97e4f71e71df6f3828f9949d8897bea26982045340e3edc92 From f923c845cee47b0f035b83e7d6bcf45897466720 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 1 Feb 2017 15:02:04 +1000 Subject: [PATCH 106/317] revert the tap timeout reduction (#1414935) --- ...reduce-the-initial-timeout-for-tappi.patch | 49 +++++++++++++++++++ libinput.spec | 7 ++- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 0001-Revert-touchpad-reduce-the-initial-timeout-for-tappi.patch diff --git a/0001-Revert-touchpad-reduce-the-initial-timeout-for-tappi.patch b/0001-Revert-touchpad-reduce-the-initial-timeout-for-tappi.patch new file mode 100644 index 0000000..6a15c0c --- /dev/null +++ b/0001-Revert-touchpad-reduce-the-initial-timeout-for-tappi.patch @@ -0,0 +1,49 @@ +From 06190393dd5991149a117d4630c95e23d390865e Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 1 Feb 2017 15:01:15 +1000 +Subject: [PATCH libinput] Revert "touchpad: reduce the initial timeout for + tapping after touch" + +This reverts commit d0ba1e2b383acaac8a31a1ded7d3039bcd161db3. +--- + src/evdev-mt-touchpad-tap.c | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) + +diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c +index ffd9d0b..03d4c70 100644 +--- a/src/evdev-mt-touchpad-tap.c ++++ b/src/evdev-mt-touchpad-tap.c +@@ -33,7 +33,6 @@ + + #include "evdev-mt-touchpad.h" + +-#define DEFAULT_TAP_INITIAL_TIMEOUT_PERIOD ms2us(100) + #define DEFAULT_TAP_TIMEOUT_PERIOD ms2us(180) + #define DEFAULT_DRAG_TIMEOUT_PERIOD ms2us(300) + #define DEFAULT_TAP_MOVE_THRESHOLD TP_MM_TO_DPI_NORMALIZED(1.3) +@@ -128,13 +127,6 @@ tp_tap_notify(struct tp_dispatch *tp, + } + + static void +-tp_tap_set_initial_timer(struct tp_dispatch *tp, uint64_t time) +-{ +- libinput_timer_set(&tp->tap.timer, +- time + DEFAULT_TAP_INITIAL_TIMEOUT_PERIOD); +-} +- +-static void + tp_tap_set_timer(struct tp_dispatch *tp, uint64_t time) + { + libinput_timer_set(&tp->tap.timer, time + DEFAULT_TAP_TIMEOUT_PERIOD); +@@ -163,7 +155,7 @@ tp_tap_idle_handle_event(struct tp_dispatch *tp, + case TAP_EVENT_TOUCH: + tp->tap.state = TAP_STATE_TOUCH; + tp->tap.first_press_time = time; +- tp_tap_set_initial_timer(tp, time); ++ tp_tap_set_timer(tp, time); + break; + case TAP_EVENT_RELEASE: + break; +-- +2.9.3 + diff --git a/libinput.spec b/libinput.spec index 1ce3f5e..e268ee9 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.6.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-Revert-touchpad-reduce-the-initial-timeout-for-tappi.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -94,6 +96,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Feb 01 2017 Peter Hutterer 1.6.0-2 +- revert the tap timeout reduction (#1414935) + * Fri Jan 20 2017 Peter Hutterer 1.6.0-1 - libinput 1.6 From 677508bd23e0f524d0a90a750f0cb7c603a8e653 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 2 Feb 2017 17:34:10 +1000 Subject: [PATCH 107/317] libinput 1.6.1 --- .gitignore | 4 +- ...reduce-the-initial-timeout-for-tappi.patch | 49 ------------------- libinput.spec | 9 ++-- sources | 2 +- 4 files changed, 7 insertions(+), 57 deletions(-) delete mode 100644 0001-Revert-touchpad-reduce-the-initial-timeout-for-tappi.patch diff --git a/.gitignore b/.gitignore index 5affb83..e4770a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ -/libinput-1.5.901.tar.xz -/libinput-1.5.902.tar.xz -/libinput-1.6.0.tar.xz +/libinput-1.6.1.tar.xz diff --git a/0001-Revert-touchpad-reduce-the-initial-timeout-for-tappi.patch b/0001-Revert-touchpad-reduce-the-initial-timeout-for-tappi.patch deleted file mode 100644 index 6a15c0c..0000000 --- a/0001-Revert-touchpad-reduce-the-initial-timeout-for-tappi.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 06190393dd5991149a117d4630c95e23d390865e Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 1 Feb 2017 15:01:15 +1000 -Subject: [PATCH libinput] Revert "touchpad: reduce the initial timeout for - tapping after touch" - -This reverts commit d0ba1e2b383acaac8a31a1ded7d3039bcd161db3. ---- - src/evdev-mt-touchpad-tap.c | 10 +--------- - 1 file changed, 1 insertion(+), 9 deletions(-) - -diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c -index ffd9d0b..03d4c70 100644 ---- a/src/evdev-mt-touchpad-tap.c -+++ b/src/evdev-mt-touchpad-tap.c -@@ -33,7 +33,6 @@ - - #include "evdev-mt-touchpad.h" - --#define DEFAULT_TAP_INITIAL_TIMEOUT_PERIOD ms2us(100) - #define DEFAULT_TAP_TIMEOUT_PERIOD ms2us(180) - #define DEFAULT_DRAG_TIMEOUT_PERIOD ms2us(300) - #define DEFAULT_TAP_MOVE_THRESHOLD TP_MM_TO_DPI_NORMALIZED(1.3) -@@ -128,13 +127,6 @@ tp_tap_notify(struct tp_dispatch *tp, - } - - static void --tp_tap_set_initial_timer(struct tp_dispatch *tp, uint64_t time) --{ -- libinput_timer_set(&tp->tap.timer, -- time + DEFAULT_TAP_INITIAL_TIMEOUT_PERIOD); --} -- --static void - tp_tap_set_timer(struct tp_dispatch *tp, uint64_t time) - { - libinput_timer_set(&tp->tap.timer, time + DEFAULT_TAP_TIMEOUT_PERIOD); -@@ -163,7 +155,7 @@ tp_tap_idle_handle_event(struct tp_dispatch *tp, - case TAP_EVENT_TOUCH: - tp->tap.state = TAP_STATE_TOUCH; - tp->tap.first_press_time = time; -- tp_tap_set_initial_timer(tp, time); -+ tp_tap_set_timer(tp, time); - break; - case TAP_EVENT_RELEASE: - break; --- -2.9.3 - diff --git a/libinput.spec b/libinput.spec index e268ee9..fd7b45d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.6.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.6.1 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,8 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-Revert-touchpad-reduce-the-initial-timeout-for-tappi.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -96,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Feb 02 2017 Peter Hutterer 1.6.1-1 +- libinput 1.6.1 + * Wed Feb 01 2017 Peter Hutterer 1.6.0-2 - revert the tap timeout reduction (#1414935) diff --git a/sources b/sources index 4f5db74..fd46d77 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.6.0.tar.xz) = 0e52f70fc5b1aa1e9c0621770ba2530f1652611aff1a557ac8083559e22293942d7c468f9bafe9e97e4f71e71df6f3828f9949d8897bea26982045340e3edc92 +SHA512 (libinput-1.6.1.tar.xz) = b18fdbfa58c14d6a5d183da3c1097d31f7dd9cce41ea69ddfa0bbd1bf8572aaa8e1ecaacdc30e3cc5e21cd320ea106ec86800a24e8f571bce61a02ddc7d43511 From 461d3fee6cfcc9e5041cfc14fe7d4f440f9237e4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 18:51:27 +0000 Subject: [PATCH 108/317] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index fd7b45d..3600d16 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.6.1 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -94,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 1.6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Thu Feb 02 2017 Peter Hutterer 1.6.1-1 - libinput 1.6.1 From 06a61d17a3de9f392960c06420763a106b4d7138 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 21 Feb 2017 12:28:32 +1000 Subject: [PATCH 109/317] libinput 1.6.2 --- .gitignore | 2 +- libinput.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e4770a3..9597fbc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/libinput-1.6.1.tar.xz +/libinput-1.6.2.tar.xz diff --git a/libinput.spec b/libinput.spec index 3600d16..8fe45df 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.6.1 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.6.2 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -94,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Feb 21 2017 Peter Hutterer 1.6.2-1 +- libinput 1.6.2 + * Fri Feb 10 2017 Fedora Release Engineering - 1.6.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index fd46d77..a066ca3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.6.1.tar.xz) = b18fdbfa58c14d6a5d183da3c1097d31f7dd9cce41ea69ddfa0bbd1bf8572aaa8e1ecaacdc30e3cc5e21cd320ea106ec86800a24e8f571bce61a02ddc7d43511 +SHA512 (libinput-1.6.2.tar.xz) = f1e1436ec4259ebddf93a50fe4d39a52713efd246a39a072b44bf296a413bdadbb789d6a4f0107ed3eb37afe34a37a43c9e75dcf814462385011eff2d3f42db7 From 1c0f18fa3444614601c6392259bdc02fa9f27638 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 22 Feb 2017 08:29:13 +1000 Subject: [PATCH 110/317] Fix middle button emulation for Logitech Marble Mouse (#1421439) --- ...-add-quirk-for-Logitech-Marble-Mouse.patch | 70 +++++++++ ...on-scrolling-on-the-L-R-button-with-.patch | 135 ++++++++++++++++++ libinput.spec | 8 +- 3 files changed, 212 insertions(+), 1 deletion(-) create mode 100644 0001-evdev-add-quirk-for-Logitech-Marble-Mouse.patch create mode 100644 0001-evdev-allow-button-scrolling-on-the-L-R-button-with-.patch diff --git a/0001-evdev-add-quirk-for-Logitech-Marble-Mouse.patch b/0001-evdev-add-quirk-for-Logitech-Marble-Mouse.patch new file mode 100644 index 0000000..5db250c --- /dev/null +++ b/0001-evdev-add-quirk-for-Logitech-Marble-Mouse.patch @@ -0,0 +1,70 @@ +From 153269d2f5c28f5af51b5e4019f621162508299a Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 17 Feb 2017 08:39:51 +1000 +Subject: [PATCH libinput] evdev: add quirk for Logitech Marble Mouse + +Device needs BTN_MIDDLE disabled, this way middle button emulation is present +by default. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +(cherry picked from commit f7f849e576a5481751a8c3d086fc1b1b752fecc4) +--- + src/evdev.c | 5 +++++ + src/evdev.h | 1 + + udev/90-libinput-model-quirks.hwdb | 4 ++++ + 3 files changed, 10 insertions(+) + +diff --git a/src/evdev.c b/src/evdev.c +index 17b28ec..73df74f 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -2225,6 +2225,7 @@ evdev_read_model_flags(struct evdev_device *device) + MODEL(HP_ZBOOK_STUDIO_G3), + MODEL(HP_PAVILION_DM4_TOUCHPAD), + MODEL(APPLE_TOUCHPAD_ONEBUTTON), ++ MODEL(LOGITECH_MARBLE_MOUSE), + #undef MODEL + { "ID_INPUT_TRACKBALL", EVDEV_MODEL_TRACKBALL }, + { NULL, EVDEV_MODEL_DEFAULT }, +@@ -2810,6 +2811,10 @@ evdev_pre_configure_model_quirks(struct evdev_device *device) + * https://bugs.freedesktop.org/show_bug.cgi?id=98100 */ + if (device->model_flags & EVDEV_MODEL_HP_ZBOOK_STUDIO_G3) + libevdev_set_abs_maximum(device->evdev, ABS_MT_SLOT, 1); ++ ++ /* Logitech Marble Mouse claims to have a middle button */ ++ if (device->model_flags & EVDEV_MODEL_LOGITECH_MARBLE_MOUSE) ++ libevdev_disable_event_code(device->evdev, EV_KEY, BTN_MIDDLE); + } + + struct evdev_device * +diff --git a/src/evdev.h b/src/evdev.h +index 5ae250f..1c25dc5 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -124,6 +124,7 @@ enum evdev_device_model { + EVDEV_MODEL_HP_ZBOOK_STUDIO_G3 = (1 << 23), + EVDEV_MODEL_HP_PAVILION_DM4_TOUCHPAD = (1 << 24), + EVDEV_MODEL_APPLE_TOUCHPAD_ONEBUTTON = (1 << 25), ++ EVDEV_MODEL_LOGITECH_MARBLE_MOUSE = (1 << 26), + }; + + struct mt_slot { +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index 10cb8ce..fafacb5 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -153,6 +153,10 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd + libinput:name:*Logitech M570*:dmi:* + LIBINPUT_MODEL_TRACKBALL=1 + ++# Logitech Marble Mouse trackball ++libinput:mouse:input:b0003v046DpC408* ++ LIBINPUT_MODEL_LOGITECH_MARBLE_MOUSE=1 ++ + ########################################## + # Synaptics + ########################################## +-- +2.9.3 + diff --git a/0001-evdev-allow-button-scrolling-on-the-L-R-button-with-.patch b/0001-evdev-allow-button-scrolling-on-the-L-R-button-with-.patch new file mode 100644 index 0000000..cf2a5f2 --- /dev/null +++ b/0001-evdev-allow-button-scrolling-on-the-L-R-button-with-.patch @@ -0,0 +1,135 @@ +From e238154dd36255d33b56fd6aebc1f591e40d84dd Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 20 Feb 2017 09:14:42 +1000 +Subject: [PATCH libinput] evdev: allow button scrolling on the L/R button with + middle emulation active + +This worked before, but triggered a negative timer bug. When one of the +physical L/R buttons is pressed with middle button emulation enabled, the +flow is: +1) phys left button down +2) middle button state machine discards events, sets timer +3) timer expires or button is released +4) middle button state machine sends button press with time from 1) +5) emulation code sees button press, sets timer for scroll emulation +6) timer logs bug because (original-button-time + timeout) is less than now() + +That log_bug_libinput() warning fails the tests but works otherwise. + +Allow this situation explicitly, on some devices we only have left and right +buttons and no scroll wheel, so having middle button emulation *and* +button-scroll working is useful. + +https://bugs.freedesktop.org/show_bug.cgi?id=99845 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +(cherry picked from commit e43f9da9ecea6d17100c0012a89f5d162b2d7d7b) +--- + src/evdev.c | 20 ++++++++++++++++++-- + src/timer.c | 22 ++++++++++++++++------ + src/timer.h | 10 ++++++++++ + 3 files changed, 44 insertions(+), 8 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index 29ebadd..17b28ec 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -229,8 +229,24 @@ evdev_button_scroll_button(struct evdev_device *device, + device->scroll.button_scroll_btn_pressed = is_press; + + if (is_press) { +- libinput_timer_set(&device->scroll.timer, +- time + DEFAULT_MIDDLE_BUTTON_SCROLL_TIMEOUT); ++ enum timer_flags flags = TIMER_FLAG_NONE; ++ ++ /* Special case: if middle button emulation is enabled and ++ * our scroll button is the left or right button, we only ++ * get here *after* the middle button timeout has expired ++ * for that button press. The time passed is the button-down ++ * time though (which is in the past), so we have to allow ++ * for a negative timer to be set. ++ */ ++ if (device->middlebutton.enabled && ++ (device->scroll.button == BTN_LEFT || ++ device->scroll.button == BTN_RIGHT)) { ++ flags = TIMER_FLAG_ALLOW_NEGATIVE; ++ } ++ ++ libinput_timer_set_flags(&device->scroll.timer, ++ time + DEFAULT_MIDDLE_BUTTON_SCROLL_TIMEOUT, ++ flags); + device->scroll.button_down_time = time; + } else { + libinput_timer_cancel(&device->scroll.timer); +diff --git a/src/timer.c b/src/timer.c +index c924794..362d81d 100644 +--- a/src/timer.c ++++ b/src/timer.c +@@ -67,19 +67,23 @@ libinput_timer_arm_timer_fd(struct libinput *libinput) + } + + void +-libinput_timer_set(struct libinput_timer *timer, uint64_t expire) ++libinput_timer_set_flags(struct libinput_timer *timer, ++ uint64_t expire, ++ uint32_t flags) + { + #ifndef NDEBUG + uint64_t now = libinput_now(timer->libinput); +- if (expire < now) +- log_bug_libinput(timer->libinput, +- "timer offset negative (-%" PRIu64 ")\n", +- now - expire); +- else if ((expire - now) > ms2us(5000)) ++ if (expire < now) { ++ if ((flags & TIMER_FLAG_ALLOW_NEGATIVE) == 0) ++ log_bug_libinput(timer->libinput, ++ "timer offset negative (-%" PRIu64 ")\n", ++ now - expire); ++ } else if ((expire - now) > ms2us(5000)) { + log_bug_libinput(timer->libinput, + "timer offset more than 5s, now %" + PRIu64 " expire %" PRIu64 "\n", + now, expire); ++ } + #endif + + assert(expire); +@@ -92,6 +96,12 @@ libinput_timer_set(struct libinput_timer *timer, uint64_t expire) + } + + void ++libinput_timer_set(struct libinput_timer *timer, uint64_t expire) ++{ ++ libinput_timer_set_flags(timer, expire, TIMER_FLAG_NONE); ++} ++ ++void + libinput_timer_cancel(struct libinput_timer *timer) + { + if (!timer->expire) +diff --git a/src/timer.h b/src/timer.h +index f8315cf..93d684a 100644 +--- a/src/timer.h ++++ b/src/timer.h +@@ -47,6 +47,16 @@ libinput_timer_init(struct libinput_timer *timer, struct libinput *libinput, + void + libinput_timer_set(struct libinput_timer *timer, uint64_t expire); + ++enum timer_flags { ++ TIMER_FLAG_NONE = 0, ++ TIMER_FLAG_ALLOW_NEGATIVE = (1 << 0), ++}; ++ ++void ++libinput_timer_set_flags(struct libinput_timer *timer, ++ uint64_t expire, ++ uint32_t flags); ++ + void + libinput_timer_cancel(struct libinput_timer *timer); + +-- +2.9.3 + diff --git a/libinput.spec b/libinput.spec index 8fe45df..0fe37bd 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.6.2 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,9 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-evdev-allow-button-scrolling-on-the-L-R-button-with-.patch +Patch02: 0001-evdev-add-quirk-for-Logitech-Marble-Mouse.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -94,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Feb 22 2017 Peter Hutterer 1.6.2-2 +- Fix middle button emulation for Logitech Marble Mouse (#1421439) + * Tue Feb 21 2017 Peter Hutterer 1.6.2-1 - libinput 1.6.2 From 0ea43b322c2b5dfea13141c029014f9a39e1cbe2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 23 Feb 2017 11:56:01 +1000 Subject: [PATCH 111/317] libinput 1.7rc1 --- .gitignore | 1 + ...-add-quirk-for-Logitech-Marble-Mouse.patch | 70 --------- ...on-scrolling-on-the-L-R-button-with-.patch | 135 ------------------ libinput.spec | 10 +- sources | 2 +- 5 files changed, 7 insertions(+), 211 deletions(-) delete mode 100644 0001-evdev-add-quirk-for-Logitech-Marble-Mouse.patch delete mode 100644 0001-evdev-allow-button-scrolling-on-the-L-R-button-with-.patch diff --git a/.gitignore b/.gitignore index 9597fbc..5c7a063 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /libinput-1.6.2.tar.xz +/libinput-1.6.901.tar.xz diff --git a/0001-evdev-add-quirk-for-Logitech-Marble-Mouse.patch b/0001-evdev-add-quirk-for-Logitech-Marble-Mouse.patch deleted file mode 100644 index 5db250c..0000000 --- a/0001-evdev-add-quirk-for-Logitech-Marble-Mouse.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 153269d2f5c28f5af51b5e4019f621162508299a Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 17 Feb 2017 08:39:51 +1000 -Subject: [PATCH libinput] evdev: add quirk for Logitech Marble Mouse - -Device needs BTN_MIDDLE disabled, this way middle button emulation is present -by default. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -(cherry picked from commit f7f849e576a5481751a8c3d086fc1b1b752fecc4) ---- - src/evdev.c | 5 +++++ - src/evdev.h | 1 + - udev/90-libinput-model-quirks.hwdb | 4 ++++ - 3 files changed, 10 insertions(+) - -diff --git a/src/evdev.c b/src/evdev.c -index 17b28ec..73df74f 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -2225,6 +2225,7 @@ evdev_read_model_flags(struct evdev_device *device) - MODEL(HP_ZBOOK_STUDIO_G3), - MODEL(HP_PAVILION_DM4_TOUCHPAD), - MODEL(APPLE_TOUCHPAD_ONEBUTTON), -+ MODEL(LOGITECH_MARBLE_MOUSE), - #undef MODEL - { "ID_INPUT_TRACKBALL", EVDEV_MODEL_TRACKBALL }, - { NULL, EVDEV_MODEL_DEFAULT }, -@@ -2810,6 +2811,10 @@ evdev_pre_configure_model_quirks(struct evdev_device *device) - * https://bugs.freedesktop.org/show_bug.cgi?id=98100 */ - if (device->model_flags & EVDEV_MODEL_HP_ZBOOK_STUDIO_G3) - libevdev_set_abs_maximum(device->evdev, ABS_MT_SLOT, 1); -+ -+ /* Logitech Marble Mouse claims to have a middle button */ -+ if (device->model_flags & EVDEV_MODEL_LOGITECH_MARBLE_MOUSE) -+ libevdev_disable_event_code(device->evdev, EV_KEY, BTN_MIDDLE); - } - - struct evdev_device * -diff --git a/src/evdev.h b/src/evdev.h -index 5ae250f..1c25dc5 100644 ---- a/src/evdev.h -+++ b/src/evdev.h -@@ -124,6 +124,7 @@ enum evdev_device_model { - EVDEV_MODEL_HP_ZBOOK_STUDIO_G3 = (1 << 23), - EVDEV_MODEL_HP_PAVILION_DM4_TOUCHPAD = (1 << 24), - EVDEV_MODEL_APPLE_TOUCHPAD_ONEBUTTON = (1 << 25), -+ EVDEV_MODEL_LOGITECH_MARBLE_MOUSE = (1 << 26), - }; - - struct mt_slot { -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index 10cb8ce..fafacb5 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -153,6 +153,10 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd - libinput:name:*Logitech M570*:dmi:* - LIBINPUT_MODEL_TRACKBALL=1 - -+# Logitech Marble Mouse trackball -+libinput:mouse:input:b0003v046DpC408* -+ LIBINPUT_MODEL_LOGITECH_MARBLE_MOUSE=1 -+ - ########################################## - # Synaptics - ########################################## --- -2.9.3 - diff --git a/0001-evdev-allow-button-scrolling-on-the-L-R-button-with-.patch b/0001-evdev-allow-button-scrolling-on-the-L-R-button-with-.patch deleted file mode 100644 index cf2a5f2..0000000 --- a/0001-evdev-allow-button-scrolling-on-the-L-R-button-with-.patch +++ /dev/null @@ -1,135 +0,0 @@ -From e238154dd36255d33b56fd6aebc1f591e40d84dd Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 20 Feb 2017 09:14:42 +1000 -Subject: [PATCH libinput] evdev: allow button scrolling on the L/R button with - middle emulation active - -This worked before, but triggered a negative timer bug. When one of the -physical L/R buttons is pressed with middle button emulation enabled, the -flow is: -1) phys left button down -2) middle button state machine discards events, sets timer -3) timer expires or button is released -4) middle button state machine sends button press with time from 1) -5) emulation code sees button press, sets timer for scroll emulation -6) timer logs bug because (original-button-time + timeout) is less than now() - -That log_bug_libinput() warning fails the tests but works otherwise. - -Allow this situation explicitly, on some devices we only have left and right -buttons and no scroll wheel, so having middle button emulation *and* -button-scroll working is useful. - -https://bugs.freedesktop.org/show_bug.cgi?id=99845 - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -(cherry picked from commit e43f9da9ecea6d17100c0012a89f5d162b2d7d7b) ---- - src/evdev.c | 20 ++++++++++++++++++-- - src/timer.c | 22 ++++++++++++++++------ - src/timer.h | 10 ++++++++++ - 3 files changed, 44 insertions(+), 8 deletions(-) - -diff --git a/src/evdev.c b/src/evdev.c -index 29ebadd..17b28ec 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -229,8 +229,24 @@ evdev_button_scroll_button(struct evdev_device *device, - device->scroll.button_scroll_btn_pressed = is_press; - - if (is_press) { -- libinput_timer_set(&device->scroll.timer, -- time + DEFAULT_MIDDLE_BUTTON_SCROLL_TIMEOUT); -+ enum timer_flags flags = TIMER_FLAG_NONE; -+ -+ /* Special case: if middle button emulation is enabled and -+ * our scroll button is the left or right button, we only -+ * get here *after* the middle button timeout has expired -+ * for that button press. The time passed is the button-down -+ * time though (which is in the past), so we have to allow -+ * for a negative timer to be set. -+ */ -+ if (device->middlebutton.enabled && -+ (device->scroll.button == BTN_LEFT || -+ device->scroll.button == BTN_RIGHT)) { -+ flags = TIMER_FLAG_ALLOW_NEGATIVE; -+ } -+ -+ libinput_timer_set_flags(&device->scroll.timer, -+ time + DEFAULT_MIDDLE_BUTTON_SCROLL_TIMEOUT, -+ flags); - device->scroll.button_down_time = time; - } else { - libinput_timer_cancel(&device->scroll.timer); -diff --git a/src/timer.c b/src/timer.c -index c924794..362d81d 100644 ---- a/src/timer.c -+++ b/src/timer.c -@@ -67,19 +67,23 @@ libinput_timer_arm_timer_fd(struct libinput *libinput) - } - - void --libinput_timer_set(struct libinput_timer *timer, uint64_t expire) -+libinput_timer_set_flags(struct libinput_timer *timer, -+ uint64_t expire, -+ uint32_t flags) - { - #ifndef NDEBUG - uint64_t now = libinput_now(timer->libinput); -- if (expire < now) -- log_bug_libinput(timer->libinput, -- "timer offset negative (-%" PRIu64 ")\n", -- now - expire); -- else if ((expire - now) > ms2us(5000)) -+ if (expire < now) { -+ if ((flags & TIMER_FLAG_ALLOW_NEGATIVE) == 0) -+ log_bug_libinput(timer->libinput, -+ "timer offset negative (-%" PRIu64 ")\n", -+ now - expire); -+ } else if ((expire - now) > ms2us(5000)) { - log_bug_libinput(timer->libinput, - "timer offset more than 5s, now %" - PRIu64 " expire %" PRIu64 "\n", - now, expire); -+ } - #endif - - assert(expire); -@@ -92,6 +96,12 @@ libinput_timer_set(struct libinput_timer *timer, uint64_t expire) - } - - void -+libinput_timer_set(struct libinput_timer *timer, uint64_t expire) -+{ -+ libinput_timer_set_flags(timer, expire, TIMER_FLAG_NONE); -+} -+ -+void - libinput_timer_cancel(struct libinput_timer *timer) - { - if (!timer->expire) -diff --git a/src/timer.h b/src/timer.h -index f8315cf..93d684a 100644 ---- a/src/timer.h -+++ b/src/timer.h -@@ -47,6 +47,16 @@ libinput_timer_init(struct libinput_timer *timer, struct libinput *libinput, - void - libinput_timer_set(struct libinput_timer *timer, uint64_t expire); - -+enum timer_flags { -+ TIMER_FLAG_NONE = 0, -+ TIMER_FLAG_ALLOW_NEGATIVE = (1 << 0), -+}; -+ -+void -+libinput_timer_set_flags(struct libinput_timer *timer, -+ uint64_t expire, -+ uint32_t flags); -+ - void - libinput_timer_cancel(struct libinput_timer *timer); - --- -2.9.3 - diff --git a/libinput.spec b/libinput.spec index 0fe37bd..9c40505 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.6.2 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.6.901 +Release: 1%{?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 -Patch01: 0001-evdev-allow-button-scrolling-on-the-L-R-button-with-.patch -Patch02: 0001-evdev-add-quirk-for-Logitech-Marble-Mouse.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -97,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Feb 23 2017 Peter Hutterer 1.6.901-1 +- libinput 1.7rc1 + * Wed Feb 22 2017 Peter Hutterer 1.6.2-2 - Fix middle button emulation for Logitech Marble Mouse (#1421439) diff --git a/sources b/sources index a066ca3..859da98 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.6.2.tar.xz) = f1e1436ec4259ebddf93a50fe4d39a52713efd246a39a072b44bf296a413bdadbb789d6a4f0107ed3eb37afe34a37a43c9e75dcf814462385011eff2d3f42db7 +SHA512 (libinput-1.6.901.tar.xz) = d0515c5ef0dec4846dda9151aaa3182dfd235f3b4b9f6c1c3ec196a8fbe59027d800f5a2555a0a486f73b3c701799696df18402cea7e0b56a01ad05464220051 From 6f77223bfee6cee81bc02575fdc350d6f00bf7b4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 10 Mar 2017 09:58:16 +1000 Subject: [PATCH 112/317] libinput 1.7rc2 --- .gitignore | 3 +-- libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 5c7a063..3d61c11 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/libinput-1.6.2.tar.xz -/libinput-1.6.901.tar.xz +/libinput-1.6.902.tar.xz diff --git a/libinput.spec b/libinput.spec index 9c40505..2d3a832 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.6.901 +Version: 1.6.902 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -94,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Fri Mar 10 2017 Peter Hutterer 1.6.902-1 +- libinput 1.7rc2 + * Thu Feb 23 2017 Peter Hutterer 1.6.901-1 - libinput 1.7rc1 diff --git a/sources b/sources index 859da98..73548ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.6.901.tar.xz) = d0515c5ef0dec4846dda9151aaa3182dfd235f3b4b9f6c1c3ec196a8fbe59027d800f5a2555a0a486f73b3c701799696df18402cea7e0b56a01ad05464220051 +SHA512 (libinput-1.6.902.tar.xz) = 05041c346036f2d9fc9f37f0e0e9929327af2394e917265c5f22b8451f3e80407ed8de5cfe71e84367e940a8e7df65656ebece6971b45affb98c85a0299b77c9 From 87e2c32144837d5f5ee38fc10a4d6ade49fbec68 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 23 Mar 2017 09:59:59 +1000 Subject: [PATCH 113/317] libinput 1.7 --- .gitignore | 2 +- libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3d61c11..0287ae9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/libinput-1.6.902.tar.xz +/libinput-1.7.0.tar.xz diff --git a/libinput.spec b/libinput.spec index 2d3a832..cd6bfa7 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.6.902 +Version: 1.7.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -94,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu Mar 23 2017 Peter Hutterer 1.7.0-1 +- libinput 1.7 + * Fri Mar 10 2017 Peter Hutterer 1.6.902-1 - libinput 1.7rc2 diff --git a/sources b/sources index 73548ad..e140fdf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.6.902.tar.xz) = 05041c346036f2d9fc9f37f0e0e9929327af2394e917265c5f22b8451f3e80407ed8de5cfe71e84367e940a8e7df65656ebece6971b45affb98c85a0299b77c9 +SHA512 (libinput-1.7.0.tar.xz) = 9058eab813ea3de230835155ca843f248127cbafaf1aecc9a2e209a0215b090beef0468cc863a24320f8d0db1f2863baba680e2416e9e409e958b2c1d18e43a1 From 69ba044fa5661517e2ff05ebecc12029e17896ac Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 25 Apr 2017 13:00:55 +1000 Subject: [PATCH 114/317] libinput 1.7.1 --- .gitignore | 2 +- libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 0287ae9..9db02b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/libinput-1.7.0.tar.xz +/libinput-1.7.1.tar.xz diff --git a/libinput.spec b/libinput.spec index cd6bfa7..bd533f5 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.7.0 +Version: 1.7.1 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -94,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Apr 25 2017 Peter Hutterer 1.7.1-1 +- libinput 1.7.1 + * Thu Mar 23 2017 Peter Hutterer 1.7.0-1 - libinput 1.7 diff --git a/sources b/sources index e140fdf..32c51cd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.7.0.tar.xz) = 9058eab813ea3de230835155ca843f248127cbafaf1aecc9a2e209a0215b090beef0468cc863a24320f8d0db1f2863baba680e2416e9e409e958b2c1d18e43a1 +SHA512 (libinput-1.7.1.tar.xz) = ee477fbbe2042ffeff70a960caf97e914d28c916af495765071a0184f442fa503d461bc34b87dc3dd62ef1bfd3e921ddc6fc065f8089d16d81c037d53d677352 From 2a4c3cf30ba95603db42eff3ebbbd0cb9e88e0a6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 2 May 2017 13:54:21 +1000 Subject: [PATCH 115/317] Add patches to fix elantech pressure detection --- ...e-the-pressure-range-to-a-hwdb-entry.patch | 250 ++++++++++++++++++ ...ation-for-touchpad-pressure-detectio.patch | 203 ++++++++++++++ ...used-Elantech-touchpad-model-binding.patch | 60 +++++ ...-generic-pressure-range-values-for-E.patch | 35 +++ ...c-pressure-range-for-the-ASUS-ZenBoo.patch | 36 +++ libinput.spec | 9 + 6 files changed, 593 insertions(+) create mode 100644 0001-touchpad-move-the-pressure-range-to-a-hwdb-entry.patch create mode 100644 0002-doc-add-documentation-for-touchpad-pressure-detectio.patch create mode 100644 0003-udev-Remove-unused-Elantech-touchpad-model-binding.patch create mode 100644 0004-udev-Select-more-generic-pressure-range-values-for-E.patch create mode 100644 0005-udev-Add-specific-pressure-range-for-the-ASUS-ZenBoo.patch diff --git a/0001-touchpad-move-the-pressure-range-to-a-hwdb-entry.patch b/0001-touchpad-move-the-pressure-range-to-a-hwdb-entry.patch new file mode 100644 index 0000000..3a44620 --- /dev/null +++ b/0001-touchpad-move-the-pressure-range-to-a-hwdb-entry.patch @@ -0,0 +1,250 @@ +From 7079bef05fa5171136bca3bad530006072b476ed Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 19 Apr 2017 13:45:34 +1000 +Subject: [PATCH libinput 1/5] touchpad: move the pressure range to a hwdb + entry + +Signed-off-by: Peter Hutterer +(cherry picked from commit 8d5f4decb4086e2b7982c3cd1e24afd9c11f551f) +--- + src/evdev-mt-touchpad.c | 44 +++++++++++++++++++++++++++----------- + src/libinput-util.c | 36 +++++++++++++++++++++++++++++++ + src/libinput-util.h | 1 + + test/test-misc.c | 43 +++++++++++++++++++++++++++++++++++++ + udev/90-libinput-model-quirks.hwdb | 2 ++ + udev/parse_hwdb.py | 8 ++++++- + 6 files changed, 121 insertions(+), 13 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index a24db9c..a35688b 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -2367,8 +2367,9 @@ tp_init_pressure(struct tp_dispatch *tp, + struct evdev_device *device) + { + const struct input_absinfo *abs; +- unsigned int range; + unsigned int code = ABS_PRESSURE; ++ const char *prop; ++ int hi, lo; + + if (tp->has_mt) + code = ABS_MT_PRESSURE; +@@ -2378,25 +2379,44 @@ tp_init_pressure(struct tp_dispatch *tp, + return; + } + +- tp->pressure.use_pressure = true; +- + abs = libevdev_get_abs_info(device->evdev, code); + assert(abs); + +- range = abs->maximum - abs->minimum; ++ prop = udev_device_get_property_value(device->udev_device, ++ "LIBINPUT_ATTR_PRESSURE_RANGE"); ++ if (prop) { ++ if (!parse_pressure_range_property(prop, &hi, &lo)) { ++ evdev_log_bug_client(device, ++ "discarding invalid pressure range '%s'\n", ++ prop); ++ return; ++ } + +- if (device->model_flags & EVDEV_MODEL_ELANTECH_TOUCHPAD) { +- tp->pressure.high = 24; +- tp->pressure.low = 10; +- } else if (device->model_flags & EVDEV_MODEL_CYAPA) { +- tp->pressure.high = 10; +- tp->pressure.low = 8; ++ if (hi == 0 && lo == 0) { ++ evdev_log_info(device, ++ "pressure-based touch detection disabled\n"); ++ return; ++ } + } else { ++ unsigned int range = abs->maximum - abs->minimum; ++ + /* Approximately the synaptics defaults */ +- tp->pressure.high = abs->minimum + 0.12 * range; +- tp->pressure.low = abs->minimum + 0.10 * range; ++ hi = abs->minimum + 0.12 * range; ++ lo = abs->minimum + 0.10 * range; + } + ++ if (hi > abs->maximum || hi < abs->minimum || ++ lo > abs->maximum || lo < abs->minimum) { ++ evdev_log_bug_libinput(device, ++ "discarding out-of-bounds pressure range %d:%d\n", ++ hi, lo); ++ return; ++ } ++ ++ tp->pressure.use_pressure = true; ++ tp->pressure.high = hi; ++ tp->pressure.low = lo; ++ + evdev_log_debug(device, + "using pressure-based touch detection\n"); + } +diff --git a/src/libinput-util.c b/src/libinput-util.c +index 351bbe4..38594fa 100644 +--- a/src/libinput-util.c ++++ b/src/libinput-util.c +@@ -360,6 +360,42 @@ parse_tpkbcombo_layout_poperty(const char *prop, + } + + /** ++ * Parses a string of the format "a:b" where both a and b must be integer ++ * numbers and a > b. Also allowed is the special string vaule "none" which ++ * amounts to unsetting the property. ++ * ++ * @param prop The value of the property ++ * @param hi Set to the first digit or 0 in case of 'none' ++ * @param lo Set to the second digit or 0 in case of 'none' ++ * @return true on success, false otherwise ++ */ ++bool ++parse_pressure_range_property(const char *prop, int *hi, int *lo) ++{ ++ int first, second; ++ ++ if (!prop) ++ return false; ++ ++ if (streq(prop, "none")) { ++ *hi = 0; ++ *lo = 0; ++ return true; ++ } ++ ++ if (sscanf(prop, "%d:%d", &first, &second) != 2) ++ return false; ++ ++ if (second >= first) ++ return false; ++ ++ *hi = first; ++ *lo = second; ++ ++ return true; ++} ++ ++/** + * Return the next word in a string pointed to by state before the first + * separator character. Call repeatedly to tokenize a whole string. + * +diff --git a/src/libinput-util.h b/src/libinput-util.h +index d86ff12..66fd336 100644 +--- a/src/libinput-util.h ++++ b/src/libinput-util.h +@@ -378,6 +378,7 @@ int parse_mouse_wheel_click_count_property(const char *prop); + double parse_trackpoint_accel_property(const char *prop); + bool parse_dimension_property(const char *prop, size_t *width, size_t *height); + bool parse_calibration_property(const char *prop, float calibration[6]); ++bool parse_pressure_range_property(const char *prop, int *hi, int *lo); + + enum tpkbcombo_layout { + TPKBCOMBO_LAYOUT_UNKNOWN, +diff --git a/test/test-misc.c b/test/test-misc.c +index 3f4b229..5101dcf 100644 +--- a/test/test-misc.c ++++ b/test/test-misc.c +@@ -1001,6 +1001,48 @@ START_TEST(calibration_prop_parser) + } + END_TEST + ++struct parser_test_pressure_range { ++ char *tag; ++ bool success; ++ int hi, lo; ++}; ++ ++START_TEST(pressure_range_prop_parser) ++{ ++ struct parser_test_pressure_range tests[] = { ++ { "10:8", true, 10, 8 }, ++ { "100:-1", true, 100, -1 }, ++ { "-203813:-502023", true, -203813, -502023 }, ++ { "238492:28210", true, 238492, 28210 }, ++ { "none", true, 0, 0 }, ++ { "0:0", false, 0, 0 }, ++ { "", false, 0, 0 }, ++ { "abcd", false, 0, 0 }, ++ { "10:30:10", false, 0, 0 }, ++ { NULL, false, 0, 0 } ++ }; ++ int i; ++ int hi, lo; ++ bool success; ++ ++ for (i = 0; tests[i].tag != NULL; i++) { ++ hi = lo = 0xad; ++ success = parse_pressure_range_property(tests[i].tag, &hi, &lo); ++ ck_assert(success == tests[i].success); ++ if (success) { ++ ck_assert_int_eq(hi, tests[i].hi); ++ ck_assert_int_eq(lo, tests[i].lo); ++ } else { ++ ck_assert_int_eq(hi, 0xad); ++ ck_assert_int_eq(lo, 0xad); ++ } ++ } ++ ++ success = parse_pressure_range_property(NULL, NULL, NULL); ++ ck_assert(success == false); ++} ++END_TEST ++ + START_TEST(time_conversion) + { + ck_assert_int_eq(us(10), 10); +@@ -1275,6 +1317,7 @@ litest_setup_tests_misc(void) + litest_add_no_device("misc:parser", dimension_prop_parser); + litest_add_no_device("misc:parser", reliability_prop_parser); + litest_add_no_device("misc:parser", calibration_prop_parser); ++ litest_add_no_device("misc:parser", pressure_range_prop_parser); + litest_add_no_device("misc:parser", safe_atoi_test); + litest_add_no_device("misc:parser", safe_atod_test); + litest_add_no_device("misc:parser", strsplit_test); +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index 2ff50b6..1b9876f 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -85,6 +85,7 @@ libinput:name:* Touchpad:dmi:*svnDellInc.:* + ########################################## + libinput:name:*ETPS/2 Elantech Touchpad*:dmi:* + LIBINPUT_ATTR_RESOLUTION_HINT=31x31 ++ LIBINPUT_ATTR_PRESSURE_RANGE=24:10 + LIBINPUT_MODEL_ELANTECH_TOUCHPAD=1 + + ########################################## +@@ -111,6 +112,7 @@ libinput:name:Atmel maXTouch Touchpad:dmi:*svn*GOOGLE*:pn*Samus* + + libinput:name:Cypress APA Trackpad ?cyapa?:dmi:* + LIBINPUT_MODEL_CYAPA=1 ++ LIBINPUT_ATTR_PRESSURE_RANGE=10:8 + + ########################################## + # HP +diff --git a/udev/parse_hwdb.py b/udev/parse_hwdb.py +index 2a342bf..97f04f4 100755 +--- a/udev/parse_hwdb.py ++++ b/udev/parse_hwdb.py +@@ -112,7 +112,13 @@ def property_grammar(): + Suppress('=') - + tpkbcombo_tags('VALUE')] + +- grammar = Or(model_props + size_props + reliability + tpkbcombo) ++ pressure_range = INTEGER('X') + Suppress(':') + INTEGER('Y') ++ pressure_prop = [ Literal('LIBINPUT_ATTR_PRESSURE_RANGE')('NAME') - ++ Suppress('=') - ++ Group(pressure_range('SETTINGS*')) ] ++ ++ grammar = Or(model_props + size_props + reliability + tpkbcombo + ++ pressure_prop) + + return grammar + +-- +2.9.3 + diff --git a/0002-doc-add-documentation-for-touchpad-pressure-detectio.patch b/0002-doc-add-documentation-for-touchpad-pressure-detectio.patch new file mode 100644 index 0000000..9dc85e6 --- /dev/null +++ b/0002-doc-add-documentation-for-touchpad-pressure-detectio.patch @@ -0,0 +1,203 @@ +From 8ac3c49a6198e6ec9ee08d6959f30c949f059672 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 19 Apr 2017 14:11:45 +1000 +Subject: [PATCH libinput 2/5] doc: add documentation for touchpad pressure + detection + +Signed-off-by: Peter Hutterer +(cherry picked from commit bed7e62a0d92ccd3e985e73736b0990ac7219483) +--- + doc/Makefile.am | 1 + + doc/faqs.dox | 5 ++ + doc/page-hierarchy.dox | 1 + + doc/touchpad-pressure.dox | 138 ++++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 145 insertions(+) + create mode 100644 doc/touchpad-pressure.dox + +diff --git a/doc/Makefile.am b/doc/Makefile.am +index 50fab04..af06272 100644 +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -29,6 +29,7 @@ header_files = \ + $(srcdir)/test-suite.dox \ + $(srcdir)/tools.dox \ + $(srcdir)/touchpad-jumping-cursors.dox \ ++ $(srcdir)/touchpad-pressure.dox \ + $(srcdir)/touchpads.dox \ + $(srcdir)/what-is-libinput.dox + +diff --git a/doc/faqs.dox b/doc/faqs.dox +index 0b8db83..7820ad4 100644 +--- a/doc/faqs.dox ++++ b/doc/faqs.dox +@@ -15,6 +15,11 @@ motion_normalization for a detailed explanation. + + See @ref tapping_default + ++@section faq_touchpad_pressure Why does my touchpad lose track of touches ++ ++The most common cause for this is an incorrect pressure threshold range. ++See @ref touchpad_pressure for more info. ++ + @section faq_kinetic_scrolling Kinetic scrolling does not work + + The X.Org synaptics driver implemented kinetic scrolling in the driver. It +diff --git a/doc/page-hierarchy.dox b/doc/page-hierarchy.dox +index ebfb65c..65749fe 100644 +--- a/doc/page-hierarchy.dox ++++ b/doc/page-hierarchy.dox +@@ -5,6 +5,7 @@ + - @subpage clickpad_softbuttons + - @subpage tapping + - @subpage gestures ++- @subpage touchpad_pressure + - @subpage palm_detection + - @subpage t440_support + - @subpage touchpad_jumping_cursor +diff --git a/doc/touchpad-pressure.dox b/doc/touchpad-pressure.dox +new file mode 100644 +index 0000000..7c55c9f +--- /dev/null ++++ b/doc/touchpad-pressure.dox +@@ -0,0 +1,138 @@ ++/** ++@page touchpad_pressure Touchpad pressure-based touch detection ++ ++libinput uses the touchpad pressure values to detect wether a finger has ++been placed on the touchpad. This is @ref kernel_pressure_information and ++combines with a libinput-specific hardware database to adjust the thresholds ++on a per-device basis. libinput uses pressure thresholds primarily to filter ++out accidental light touches but pressure information is also used for ++some @ref palm_detection. ++ ++Pressure thresholds are **not** directly configurable by the user, rather it ++is planned that libinput provides custom pressure thresholds for each device ++where necessary. See @ref touchpad_pressure_hwdb for instructions for your ++local device. ++ ++@section kernel_pressure_information Information provided by the kernel ++ ++The kernel sends multiple values to inform userspace about a finger touching ++the touchpad. The most basic is the ```EV_KEY/BTN_TOUCH``` boolean event ++that simply announces physical contact with the touchpad. The decision when ++this event is sent is usually made by the kernel driver and may depend on ++device-specific thresholds. These thresholds are transparent to userspace ++and cannot be modified. ++ ++Many contemporary touchpad devices provide an absolute pressure axis in ++addition to ```BTN_TOUCH```. This pressure generally increases as the pressure ++increases, however few touchpads are capable of detection pressure. The ++pressure value is usually related to the covered area - as the pressure ++increases a finger flattens and thus covers a larger area. The range ++provided by the kernel is not mapped to a specific physical range and ++often requires adjustment. Pressure is sent by the ```ABS_PRESSURE``` axis ++for single-touch touchpads or ```ABS_MT_PRESSURE``` on multi-touch capable ++touchpads. ++ ++Some devices provide additional touch size information through ++the ```ABS_MT_TOUCH_MAJOR/ABS_MT_TOUCH_MINOR``` axes and/or ++the ```ABS_MT_WIDTH_MAJOR/ABS_MT_WIDTH_MINOR``` axes. While the kernel ++documentation specifies how these axes are supposed to be mapped, few ++devices forward ++reliable information. ++ ++@section touchpad_pressure_hwdb Debugging touchpad pressure ranges ++ ++This section describes how to determine the touchpad pressure ranges ++required for a touchpad device and how to add the required hwdb entry ++locally. Note that the hwdb entry is **not public API** and **may change at ++any time**. Users are advised to @ref reporting_bugs "report a bug" with the ++updated pressure ranges when testing has completed. ++ ++First, install the "evemu" package providing the ```evemu-record``` tool. ++Run ```evemu-record``` as root (without arguments) to see a list of devices ++and select the touchpad device. Pipe the actual output of the tool into a ++file for later analysis. For example: ++ ++
++$ sudo evemu-record > touchpad-pressure.txt
++Available devices:
++/dev/input/event0:	Lid Switch
++/dev/input/event1:	Sleep Button
++/dev/input/event2:	Power Button
++/dev/input/event3:	AT Translated Set 2 keyboard
++/dev/input/event4:	SynPS/2 Synaptics TouchPad
++/dev/input/event5:	ELAN Touchscreen
++[...]
++Select the device event number [0-19]: 4
++#     Ctrl+C to quit, the output will be in touchpad-pressure.txt
++
++ ++Now move a finger at **normal pressure** several times around the touchpad, ++as if moving the cursor normally around the screen. Avoid any accidental ++palm touches or any excessive or light pressure. ++ ++The event recording is then filtered for pressure information, which is ++sorted and exported to a new file: ++
++$ grep --only-matching "ABS_MT_PRESSURE[ ]*[0-9]*" touchpad-pressure.txt | \
++	sed -e "s/ABS_MT_PRESSURE[ ]*//" | \
++	sort -n | uniq -c > touchpad-pressure-statistics.txt
++
++ ++The file contains a list of (count, pressure-value) tuples which can be ++visualized with gnuplot. Copy the following into a file named ++```touchpad-pressure-statistics.gnuplot```: ++ ++
++set style data lines
++plot 'touchpad-pressure-statistics.txt' using 2:1
++pause -1
++
++ ++Now, you can visualize the touchpad pressure curve with the following ++command: ++
++$ gnuplot  touchpad-pressure-statistics.gnuplot
++
++ ++The visualization will show a curve with the various pressure ranges, see ++[this bugzilla attachment](https://bugs.freedesktop.org/attachment.cgi?id=130659). ++In most cases, the thresholds can be guessed based on this curve. libinput ++employes a [Schmitt trigger](https://en.wikipedia.org/wiki/Schmitt_trigger) ++with an upper threshold and a lower threshold. A touch is detected when the ++pressure goes above the high threshold, a release is detected when the ++pressure fallse below the low threshold. Thus, an ideal threshold ++combination is with a high threshold slightly above the minimum threshold, a ++low threshold on the minimum threshold. ++ ++Once the thresholds are decided on (e.g. 10 and 8), they can be enabled with ++the following hwdb file: ++ ++
++$> cat /etc/udev/hwdb.d/99-touchpad-pressure.hwdb
++libinput:name:*SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPCompaq6910p*
++ LIBINPUT_ATTR_PRESSURE_RANGE=10:8
++
++ ++The first line is the match line and should be adjusted for the device name ++(see evemu-record's output) and for the local system, based on the ++information in ```/sys/class/dmi/id/modalias```. The modalias should be ++shortened to the specific system's information, usually system vendor (svn) ++and product name (pn). ++ ++Once in place, you need to run the following to commands, adjusted for your ++device's event node (see @ref faq_hwdb_changes): ++
++    sudo udevadm hwdb --update
++    sudo udevadm test /sys/class/input/eventX
++
++ ++If the pressure range property shows up correctly, restart X or the ++Wayland compositor and libinput should now use the correct pressure ++thresholds. The @ref developer_tools can be used to verify the correct ++functionality first without the need for a restart. ++ ++Once the pressure ranges are deemed correct, ++@ref reporting_bugs "report a bug" to get the pressure ranges into the ++repository. ++ ++*/ +-- +2.9.3 + diff --git a/0003-udev-Remove-unused-Elantech-touchpad-model-binding.patch b/0003-udev-Remove-unused-Elantech-touchpad-model-binding.patch new file mode 100644 index 0000000..7d9c126 --- /dev/null +++ b/0003-udev-Remove-unused-Elantech-touchpad-model-binding.patch @@ -0,0 +1,60 @@ +From c24abedeb4d5fc0245dfcd7e3eed3561f5767b11 Mon Sep 17 00:00:00 2001 +From: Paul Kocialkowski +Date: Fri, 28 Apr 2017 15:29:02 +0200 +Subject: [PATCH libinput 3/5] udev: Remove unused Elantech touchpad model + binding + +The Elantech touchpad model binding in udev is currently unused, since +pressure values were moved to a udev binding of their own. + +This gets rid of the deprecated model binding. + +Signed-off-by: Paul Kocialkowski +Reviewed-by: Peter Hutterer +Signed-off-by: Peter Hutterer +(cherry picked from commit 6af9f8e5fbb9f5588eeb51185d2cc0d7f93d34ee) +--- + src/evdev.c | 1 - + src/evdev.h | 1 - + udev/90-libinput-model-quirks.hwdb | 1 - + 3 files changed, 3 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index 2d18bed..3b4bc4b 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -2245,7 +2245,6 @@ evdev_read_model_flags(struct evdev_device *device) + MODEL(ALPS_TOUCHPAD), + MODEL(SYNAPTICS_SERIAL_TOUCHPAD), + MODEL(JUMPING_SEMI_MT), +- MODEL(ELANTECH_TOUCHPAD), + MODEL(APPLE_INTERNAL_KEYBOARD), + MODEL(CYBORG_RAT), + MODEL(CYAPA), +diff --git a/src/evdev.h b/src/evdev.h +index 465b8a3..c9a44f8 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -111,7 +111,6 @@ enum evdev_device_model { + EVDEV_MODEL_ALPS_TOUCHPAD = (1 << 8), + EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD = (1 << 9), + EVDEV_MODEL_JUMPING_SEMI_MT = (1 << 10), +- EVDEV_MODEL_ELANTECH_TOUCHPAD = (1 << 11), + EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), + EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13), + EVDEV_MODEL_CYBORG_RAT = (1 << 14), +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index 1b9876f..eaa9345 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -86,7 +86,6 @@ libinput:name:* Touchpad:dmi:*svnDellInc.:* + libinput:name:*ETPS/2 Elantech Touchpad*:dmi:* + LIBINPUT_ATTR_RESOLUTION_HINT=31x31 + LIBINPUT_ATTR_PRESSURE_RANGE=24:10 +- LIBINPUT_MODEL_ELANTECH_TOUCHPAD=1 + + ########################################## + # Google +-- +2.9.3 + diff --git a/0004-udev-Select-more-generic-pressure-range-values-for-E.patch b/0004-udev-Select-more-generic-pressure-range-values-for-E.patch new file mode 100644 index 0000000..d985baf --- /dev/null +++ b/0004-udev-Select-more-generic-pressure-range-values-for-E.patch @@ -0,0 +1,35 @@ +From 17692e5d24870e384f40ba95197396d868ab2b8b Mon Sep 17 00:00:00 2001 +From: Paul Kocialkowski +Date: Fri, 28 Apr 2017 15:29:03 +0200 +Subject: [PATCH libinput 4/5] udev: Select more generic pressure range values + for Elantech touchpads + +The current pressure values for Elantech touchpads are too high for +various devices and make the touchpad almost unusable on them. + +Decreasing the pressure range values makes those devices usable again. + +Signed-off-by: Paul Kocialkowski +Reviewed-by: Peter Hutterer +Signed-off-by: Peter Hutterer +(cherry picked from commit 1dfedc6995cf63e004bd3e0b1d22ae263feb7362) +--- + udev/90-libinput-model-quirks.hwdb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index eaa9345..73734e6 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -85,7 +85,7 @@ libinput:name:* Touchpad:dmi:*svnDellInc.:* + ########################################## + libinput:name:*ETPS/2 Elantech Touchpad*:dmi:* + LIBINPUT_ATTR_RESOLUTION_HINT=31x31 +- LIBINPUT_ATTR_PRESSURE_RANGE=24:10 ++ LIBINPUT_ATTR_PRESSURE_RANGE=10:8 + + ########################################## + # Google +-- +2.9.3 + diff --git a/0005-udev-Add-specific-pressure-range-for-the-ASUS-ZenBoo.patch b/0005-udev-Add-specific-pressure-range-for-the-ASUS-ZenBoo.patch new file mode 100644 index 0000000..b547ef3 --- /dev/null +++ b/0005-udev-Add-specific-pressure-range-for-the-ASUS-ZenBoo.patch @@ -0,0 +1,36 @@ +From 4ab9c15cac163e27f2b92726019c165eaecb7451 Mon Sep 17 00:00:00 2001 +From: Paul Kocialkowski +Date: Fri, 28 Apr 2017 15:29:04 +0200 +Subject: [PATCH libinput 5/5] udev: Add specific pressure range for the ASUS + ZenBook UX21E + +This adds specific pressure range values for the Elantech touchpad +found in the ASUS ZenBook UX21E. + +https://bugs.freedesktop.org/show_bug.cgi?id=99975 + +Signed-off-by: Paul Kocialkowski +Reviewed-by: Peter Hutterer +Signed-off-by: Peter Hutterer +(cherry picked from commit 46af543b49b4e2d75348c715d1c76c2e0d432514) +--- + udev/90-libinput-model-quirks.hwdb | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index 73734e6..560e77a 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -87,6 +87,9 @@ libinput:name:*ETPS/2 Elantech Touchpad*:dmi:* + LIBINPUT_ATTR_RESOLUTION_HINT=31x31 + LIBINPUT_ATTR_PRESSURE_RANGE=10:8 + ++libinput:name:*ETPS/2 Elantech Touchpad*:dmi:*svnASUSTeKComputerInc.:pnUX21E:* ++ LIBINPUT_ATTR_PRESSURE_RANGE=24:10 ++ + ########################################## + # Google + ########################################## +-- +2.9.3 + diff --git a/libinput.spec b/libinput.spec index bd533f5..9a07ebb 100644 --- a/libinput.spec +++ b/libinput.spec @@ -18,6 +18,12 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-touchpad-move-the-pressure-range-to-a-hwdb-entry.patch +Patch02: 0002-doc-add-documentation-for-touchpad-pressure-detectio.patch +Patch03: 0003-udev-Remove-unused-Elantech-touchpad-model-binding.patch +Patch04: 0004-udev-Select-more-generic-pressure-range-values-for-E.patch +Patch05: 0005-udev-Add-specific-pressure-range-for-the-ASUS-ZenBoo.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -94,6 +100,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue May 02 2017 Peter Hutterer 1.7.1-1 +- Add patches to fix elantech pressure detection + * Tue Apr 25 2017 Peter Hutterer 1.7.1-1 - libinput 1.7.1 From fa48f8fad7746d621ae9e369a1036dfc16a86d0c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 2 May 2017 14:34:25 +1000 Subject: [PATCH 116/317] Bump the release tag --- libinput.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 9a07ebb..b8c4e19 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.7.1 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -100,7 +100,7 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog -* Tue May 02 2017 Peter Hutterer 1.7.1-1 +* Tue May 02 2017 Peter Hutterer 1.7.1-2 - Add patches to fix elantech pressure detection * Tue Apr 25 2017 Peter Hutterer 1.7.1-1 From 4e5ee47860e0ff9b89d865c9487e14e849174898 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 4 May 2017 15:13:33 +1000 Subject: [PATCH 117/317] Fix crash when we have multiple keyboard event listeners for the lid switch (#1440927) --- ...the-event-listener-after-removing-it.patch | 53 +++++++++++++++++++ libinput.spec | 8 ++- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 0001-lid-re-init-the-event-listener-after-removing-it.patch diff --git a/0001-lid-re-init-the-event-listener-after-removing-it.patch b/0001-lid-re-init-the-event-listener-after-removing-it.patch new file mode 100644 index 0000000..f2033a6 --- /dev/null +++ b/0001-lid-re-init-the-event-listener-after-removing-it.patch @@ -0,0 +1,53 @@ +From 72d597502c3bbf3462887c23afd2f184314409e8 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 4 May 2017 14:50:31 +1000 +Subject: [PATCH libinput] lid: re-init the event listener after removing it + +We may call remove on it again and that segfaults if it hasn't been +initialized. + +Signed-off-by: Peter Hutterer +(cherry picked from commit 3735359f0c66208658754e2c2b5f7e7041a2e290) +--- + src/evdev-lid.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/src/evdev-lid.c b/src/evdev-lid.c +index 8db7f37c..e71499bb 100644 +--- a/src/evdev-lid.c ++++ b/src/evdev-lid.c +@@ -98,7 +98,9 @@ lid_switch_toggle_keyboard_listener(struct lid_switch_dispatch *dispatch, + dispatch); + } else { + libinput_device_remove_event_listener( +- &dispatch->keyboard.listener); ++ &dispatch->keyboard.listener); ++ libinput_device_init_event_listener( ++ &dispatch->keyboard.listener); + } + } + +@@ -197,7 +199,9 @@ lid_switch_pair_keyboard(struct evdev_device *lid_switch, + if (dispatch->keyboard.keyboard) { + if (bus_kbd != BUS_I8042) + return; ++ + libinput_device_remove_event_listener(&dispatch->keyboard.listener); ++ libinput_device_init_event_listener(&dispatch->keyboard.listener); + } + + dispatch->keyboard.keyboard = keyboard; +@@ -225,7 +229,9 @@ lid_switch_interface_device_removed(struct evdev_device *device, + + if (removed_device == dispatch->keyboard.keyboard) { + libinput_device_remove_event_listener( +- &dispatch->keyboard.listener); ++ &dispatch->keyboard.listener); ++ libinput_device_init_event_listener( ++ &dispatch->keyboard.listener); + dispatch->keyboard.keyboard = NULL; + } + } +-- +2.12.2 + diff --git a/libinput.spec b/libinput.spec index b8c4e19..d413dcc 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.7.1 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,11 +18,13 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif + Patch01: 0001-touchpad-move-the-pressure-range-to-a-hwdb-entry.patch Patch02: 0002-doc-add-documentation-for-touchpad-pressure-detectio.patch Patch03: 0003-udev-Remove-unused-Elantech-touchpad-model-binding.patch Patch04: 0004-udev-Select-more-generic-pressure-range-values-for-E.patch Patch05: 0005-udev-Add-specific-pressure-range-for-the-ASUS-ZenBoo.patch +Patch06: 0001-lid-re-init-the-event-listener-after-removing-it.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -100,6 +102,10 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu May 04 2017 Peter Hutterer 1.7.1-3 +- Fix crash when we have multiple keyboard event listeners for the lid + switch (#1440927) + * Tue May 02 2017 Peter Hutterer 1.7.1-2 - Add patches to fix elantech pressure detection From 9ceb958d7a0aab0f154a94c34e65461907b96e6f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 4 May 2017 17:46:07 +1000 Subject: [PATCH 118/317] Fix a crash when shutting down a touchpad lid listener (#1440927) --- ...the-event-listener-after-removing-it.patch | 60 ++++++++++++++++--- libinput.spec | 5 +- 2 files changed, 57 insertions(+), 8 deletions(-) diff --git a/0001-lid-re-init-the-event-listener-after-removing-it.patch b/0001-lid-re-init-the-event-listener-after-removing-it.patch index f2033a6..bf165b7 100644 --- a/0001-lid-re-init-the-event-listener-after-removing-it.patch +++ b/0001-lid-re-init-the-event-listener-after-removing-it.patch @@ -1,4 +1,4 @@ -From 72d597502c3bbf3462887c23afd2f184314409e8 Mon Sep 17 00:00:00 2001 +From 98eca5257c1d3d62ebaaf0ed8ee262381f3dc256 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 4 May 2017 14:50:31 +1000 Subject: [PATCH libinput] lid: re-init the event listener after removing it @@ -6,14 +6,16 @@ Subject: [PATCH libinput] lid: re-init the event listener after removing it We may call remove on it again and that segfaults if it hasn't been initialized. +https://bugzilla.redhat.com/show_bug.cgi?id=1440927 + Signed-off-by: Peter Hutterer -(cherry picked from commit 3735359f0c66208658754e2c2b5f7e7041a2e290) --- - src/evdev-lid.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) + src/evdev-lid.c | 23 ++++++++++++++++++++--- + src/evdev-mt-touchpad.c | 6 ++++++ + 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/evdev-lid.c b/src/evdev-lid.c -index 8db7f37c..e71499bb 100644 +index 8db7f37c..b7ff065e 100644 --- a/src/evdev-lid.c +++ b/src/evdev-lid.c @@ -98,7 +98,9 @@ lid_switch_toggle_keyboard_listener(struct lid_switch_dispatch *dispatch, @@ -27,7 +29,25 @@ index 8db7f37c..e71499bb 100644 } } -@@ -197,7 +199,9 @@ lid_switch_pair_keyboard(struct evdev_device *lid_switch, +@@ -174,6 +176,17 @@ evdev_read_switch_reliability_prop(struct evdev_device *device) + } + + static void ++lid_switch_remove(struct evdev_dispatch *evdev_dispatch) ++{ ++ struct lid_switch_dispatch *dispatch = lid_dispatch(evdev_dispatch); ++ ++ if (!dispatch->keyboard.keyboard) ++ return; ++ ++ libinput_device_remove_event_listener(&dispatch->keyboard.listener); ++} ++ ++static void + lid_switch_destroy(struct evdev_dispatch *evdev_dispatch) + { + struct lid_switch_dispatch *dispatch = lid_dispatch(evdev_dispatch); +@@ -197,7 +210,9 @@ lid_switch_pair_keyboard(struct evdev_device *lid_switch, if (dispatch->keyboard.keyboard) { if (bus_kbd != BUS_I8042) return; @@ -37,7 +57,7 @@ index 8db7f37c..e71499bb 100644 } dispatch->keyboard.keyboard = keyboard; -@@ -225,7 +229,9 @@ lid_switch_interface_device_removed(struct evdev_device *device, +@@ -225,7 +240,9 @@ lid_switch_interface_device_removed(struct evdev_device *device, if (removed_device == dispatch->keyboard.keyboard) { libinput_device_remove_event_listener( @@ -48,6 +68,32 @@ index 8db7f37c..e71499bb 100644 dispatch->keyboard.keyboard = NULL; } } +@@ -271,7 +288,7 @@ lid_switch_sync_initial_state(struct evdev_device *device, + struct evdev_dispatch_interface lid_switch_interface = { + lid_switch_process, + NULL, /* suspend */ +- NULL, /* remove */ ++ lid_switch_remove, + lid_switch_destroy, + lid_switch_interface_device_added, + lid_switch_interface_device_removed, +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index a35688b1..73f0fdd8 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1673,6 +1673,12 @@ tp_interface_device_removed(struct evdev_device *device, + tp->dwt.keyboard = NULL; + } + ++ if (removed_device == tp->lid_switch.lid_switch) { ++ libinput_device_remove_event_listener( ++ &tp->lid_switch.lid_switch_listener); ++ tp->lid_switch.lid_switch = NULL; ++ } ++ + if (tp->sendevents.current_mode != + LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE) + return; -- 2.12.2 diff --git a/libinput.spec b/libinput.spec index d413dcc..2472fde 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.7.1 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -102,6 +102,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu May 04 2017 Peter Hutterer 1.7.1-4 +- Fix a crash when shutting down a touchpad lid listener (#1440927) + * Thu May 04 2017 Peter Hutterer 1.7.1-3 - Fix crash when we have multiple keyboard event listeners for the lid switch (#1440927) From 9f62f55614f2f620980a13bb82152293271dbc0b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 9 May 2017 15:19:18 +1000 Subject: [PATCH 119/317] libinput 1.7.2 --- .gitignore | 1 + ...e-the-pressure-range-to-a-hwdb-entry.patch | 250 ------------------ ...ation-for-touchpad-pressure-detectio.patch | 203 -------------- ...used-Elantech-touchpad-model-binding.patch | 60 ----- ...-generic-pressure-range-values-for-E.patch | 35 --- ...c-pressure-range-for-the-ASUS-ZenBoo.patch | 36 --- libinput.spec | 13 +- sources | 2 +- 8 files changed, 7 insertions(+), 593 deletions(-) delete mode 100644 0001-touchpad-move-the-pressure-range-to-a-hwdb-entry.patch delete mode 100644 0002-doc-add-documentation-for-touchpad-pressure-detectio.patch delete mode 100644 0003-udev-Remove-unused-Elantech-touchpad-model-binding.patch delete mode 100644 0004-udev-Select-more-generic-pressure-range-values-for-E.patch delete mode 100644 0005-udev-Add-specific-pressure-range-for-the-ASUS-ZenBoo.patch diff --git a/.gitignore b/.gitignore index 9db02b3..56d78de 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /libinput-1.7.1.tar.xz +/libinput-1.7.2.tar.xz diff --git a/0001-touchpad-move-the-pressure-range-to-a-hwdb-entry.patch b/0001-touchpad-move-the-pressure-range-to-a-hwdb-entry.patch deleted file mode 100644 index 3a44620..0000000 --- a/0001-touchpad-move-the-pressure-range-to-a-hwdb-entry.patch +++ /dev/null @@ -1,250 +0,0 @@ -From 7079bef05fa5171136bca3bad530006072b476ed Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 19 Apr 2017 13:45:34 +1000 -Subject: [PATCH libinput 1/5] touchpad: move the pressure range to a hwdb - entry - -Signed-off-by: Peter Hutterer -(cherry picked from commit 8d5f4decb4086e2b7982c3cd1e24afd9c11f551f) ---- - src/evdev-mt-touchpad.c | 44 +++++++++++++++++++++++++++----------- - src/libinput-util.c | 36 +++++++++++++++++++++++++++++++ - src/libinput-util.h | 1 + - test/test-misc.c | 43 +++++++++++++++++++++++++++++++++++++ - udev/90-libinput-model-quirks.hwdb | 2 ++ - udev/parse_hwdb.py | 8 ++++++- - 6 files changed, 121 insertions(+), 13 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index a24db9c..a35688b 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -2367,8 +2367,9 @@ tp_init_pressure(struct tp_dispatch *tp, - struct evdev_device *device) - { - const struct input_absinfo *abs; -- unsigned int range; - unsigned int code = ABS_PRESSURE; -+ const char *prop; -+ int hi, lo; - - if (tp->has_mt) - code = ABS_MT_PRESSURE; -@@ -2378,25 +2379,44 @@ tp_init_pressure(struct tp_dispatch *tp, - return; - } - -- tp->pressure.use_pressure = true; -- - abs = libevdev_get_abs_info(device->evdev, code); - assert(abs); - -- range = abs->maximum - abs->minimum; -+ prop = udev_device_get_property_value(device->udev_device, -+ "LIBINPUT_ATTR_PRESSURE_RANGE"); -+ if (prop) { -+ if (!parse_pressure_range_property(prop, &hi, &lo)) { -+ evdev_log_bug_client(device, -+ "discarding invalid pressure range '%s'\n", -+ prop); -+ return; -+ } - -- if (device->model_flags & EVDEV_MODEL_ELANTECH_TOUCHPAD) { -- tp->pressure.high = 24; -- tp->pressure.low = 10; -- } else if (device->model_flags & EVDEV_MODEL_CYAPA) { -- tp->pressure.high = 10; -- tp->pressure.low = 8; -+ if (hi == 0 && lo == 0) { -+ evdev_log_info(device, -+ "pressure-based touch detection disabled\n"); -+ return; -+ } - } else { -+ unsigned int range = abs->maximum - abs->minimum; -+ - /* Approximately the synaptics defaults */ -- tp->pressure.high = abs->minimum + 0.12 * range; -- tp->pressure.low = abs->minimum + 0.10 * range; -+ hi = abs->minimum + 0.12 * range; -+ lo = abs->minimum + 0.10 * range; - } - -+ if (hi > abs->maximum || hi < abs->minimum || -+ lo > abs->maximum || lo < abs->minimum) { -+ evdev_log_bug_libinput(device, -+ "discarding out-of-bounds pressure range %d:%d\n", -+ hi, lo); -+ return; -+ } -+ -+ tp->pressure.use_pressure = true; -+ tp->pressure.high = hi; -+ tp->pressure.low = lo; -+ - evdev_log_debug(device, - "using pressure-based touch detection\n"); - } -diff --git a/src/libinput-util.c b/src/libinput-util.c -index 351bbe4..38594fa 100644 ---- a/src/libinput-util.c -+++ b/src/libinput-util.c -@@ -360,6 +360,42 @@ parse_tpkbcombo_layout_poperty(const char *prop, - } - - /** -+ * Parses a string of the format "a:b" where both a and b must be integer -+ * numbers and a > b. Also allowed is the special string vaule "none" which -+ * amounts to unsetting the property. -+ * -+ * @param prop The value of the property -+ * @param hi Set to the first digit or 0 in case of 'none' -+ * @param lo Set to the second digit or 0 in case of 'none' -+ * @return true on success, false otherwise -+ */ -+bool -+parse_pressure_range_property(const char *prop, int *hi, int *lo) -+{ -+ int first, second; -+ -+ if (!prop) -+ return false; -+ -+ if (streq(prop, "none")) { -+ *hi = 0; -+ *lo = 0; -+ return true; -+ } -+ -+ if (sscanf(prop, "%d:%d", &first, &second) != 2) -+ return false; -+ -+ if (second >= first) -+ return false; -+ -+ *hi = first; -+ *lo = second; -+ -+ return true; -+} -+ -+/** - * Return the next word in a string pointed to by state before the first - * separator character. Call repeatedly to tokenize a whole string. - * -diff --git a/src/libinput-util.h b/src/libinput-util.h -index d86ff12..66fd336 100644 ---- a/src/libinput-util.h -+++ b/src/libinput-util.h -@@ -378,6 +378,7 @@ int parse_mouse_wheel_click_count_property(const char *prop); - double parse_trackpoint_accel_property(const char *prop); - bool parse_dimension_property(const char *prop, size_t *width, size_t *height); - bool parse_calibration_property(const char *prop, float calibration[6]); -+bool parse_pressure_range_property(const char *prop, int *hi, int *lo); - - enum tpkbcombo_layout { - TPKBCOMBO_LAYOUT_UNKNOWN, -diff --git a/test/test-misc.c b/test/test-misc.c -index 3f4b229..5101dcf 100644 ---- a/test/test-misc.c -+++ b/test/test-misc.c -@@ -1001,6 +1001,48 @@ START_TEST(calibration_prop_parser) - } - END_TEST - -+struct parser_test_pressure_range { -+ char *tag; -+ bool success; -+ int hi, lo; -+}; -+ -+START_TEST(pressure_range_prop_parser) -+{ -+ struct parser_test_pressure_range tests[] = { -+ { "10:8", true, 10, 8 }, -+ { "100:-1", true, 100, -1 }, -+ { "-203813:-502023", true, -203813, -502023 }, -+ { "238492:28210", true, 238492, 28210 }, -+ { "none", true, 0, 0 }, -+ { "0:0", false, 0, 0 }, -+ { "", false, 0, 0 }, -+ { "abcd", false, 0, 0 }, -+ { "10:30:10", false, 0, 0 }, -+ { NULL, false, 0, 0 } -+ }; -+ int i; -+ int hi, lo; -+ bool success; -+ -+ for (i = 0; tests[i].tag != NULL; i++) { -+ hi = lo = 0xad; -+ success = parse_pressure_range_property(tests[i].tag, &hi, &lo); -+ ck_assert(success == tests[i].success); -+ if (success) { -+ ck_assert_int_eq(hi, tests[i].hi); -+ ck_assert_int_eq(lo, tests[i].lo); -+ } else { -+ ck_assert_int_eq(hi, 0xad); -+ ck_assert_int_eq(lo, 0xad); -+ } -+ } -+ -+ success = parse_pressure_range_property(NULL, NULL, NULL); -+ ck_assert(success == false); -+} -+END_TEST -+ - START_TEST(time_conversion) - { - ck_assert_int_eq(us(10), 10); -@@ -1275,6 +1317,7 @@ litest_setup_tests_misc(void) - litest_add_no_device("misc:parser", dimension_prop_parser); - litest_add_no_device("misc:parser", reliability_prop_parser); - litest_add_no_device("misc:parser", calibration_prop_parser); -+ litest_add_no_device("misc:parser", pressure_range_prop_parser); - litest_add_no_device("misc:parser", safe_atoi_test); - litest_add_no_device("misc:parser", safe_atod_test); - litest_add_no_device("misc:parser", strsplit_test); -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index 2ff50b6..1b9876f 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -85,6 +85,7 @@ libinput:name:* Touchpad:dmi:*svnDellInc.:* - ########################################## - libinput:name:*ETPS/2 Elantech Touchpad*:dmi:* - LIBINPUT_ATTR_RESOLUTION_HINT=31x31 -+ LIBINPUT_ATTR_PRESSURE_RANGE=24:10 - LIBINPUT_MODEL_ELANTECH_TOUCHPAD=1 - - ########################################## -@@ -111,6 +112,7 @@ libinput:name:Atmel maXTouch Touchpad:dmi:*svn*GOOGLE*:pn*Samus* - - libinput:name:Cypress APA Trackpad ?cyapa?:dmi:* - LIBINPUT_MODEL_CYAPA=1 -+ LIBINPUT_ATTR_PRESSURE_RANGE=10:8 - - ########################################## - # HP -diff --git a/udev/parse_hwdb.py b/udev/parse_hwdb.py -index 2a342bf..97f04f4 100755 ---- a/udev/parse_hwdb.py -+++ b/udev/parse_hwdb.py -@@ -112,7 +112,13 @@ def property_grammar(): - Suppress('=') - - tpkbcombo_tags('VALUE')] - -- grammar = Or(model_props + size_props + reliability + tpkbcombo) -+ pressure_range = INTEGER('X') + Suppress(':') + INTEGER('Y') -+ pressure_prop = [ Literal('LIBINPUT_ATTR_PRESSURE_RANGE')('NAME') - -+ Suppress('=') - -+ Group(pressure_range('SETTINGS*')) ] -+ -+ grammar = Or(model_props + size_props + reliability + tpkbcombo + -+ pressure_prop) - - return grammar - --- -2.9.3 - diff --git a/0002-doc-add-documentation-for-touchpad-pressure-detectio.patch b/0002-doc-add-documentation-for-touchpad-pressure-detectio.patch deleted file mode 100644 index 9dc85e6..0000000 --- a/0002-doc-add-documentation-for-touchpad-pressure-detectio.patch +++ /dev/null @@ -1,203 +0,0 @@ -From 8ac3c49a6198e6ec9ee08d6959f30c949f059672 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 19 Apr 2017 14:11:45 +1000 -Subject: [PATCH libinput 2/5] doc: add documentation for touchpad pressure - detection - -Signed-off-by: Peter Hutterer -(cherry picked from commit bed7e62a0d92ccd3e985e73736b0990ac7219483) ---- - doc/Makefile.am | 1 + - doc/faqs.dox | 5 ++ - doc/page-hierarchy.dox | 1 + - doc/touchpad-pressure.dox | 138 ++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 145 insertions(+) - create mode 100644 doc/touchpad-pressure.dox - -diff --git a/doc/Makefile.am b/doc/Makefile.am -index 50fab04..af06272 100644 ---- a/doc/Makefile.am -+++ b/doc/Makefile.am -@@ -29,6 +29,7 @@ header_files = \ - $(srcdir)/test-suite.dox \ - $(srcdir)/tools.dox \ - $(srcdir)/touchpad-jumping-cursors.dox \ -+ $(srcdir)/touchpad-pressure.dox \ - $(srcdir)/touchpads.dox \ - $(srcdir)/what-is-libinput.dox - -diff --git a/doc/faqs.dox b/doc/faqs.dox -index 0b8db83..7820ad4 100644 ---- a/doc/faqs.dox -+++ b/doc/faqs.dox -@@ -15,6 +15,11 @@ motion_normalization for a detailed explanation. - - See @ref tapping_default - -+@section faq_touchpad_pressure Why does my touchpad lose track of touches -+ -+The most common cause for this is an incorrect pressure threshold range. -+See @ref touchpad_pressure for more info. -+ - @section faq_kinetic_scrolling Kinetic scrolling does not work - - The X.Org synaptics driver implemented kinetic scrolling in the driver. It -diff --git a/doc/page-hierarchy.dox b/doc/page-hierarchy.dox -index ebfb65c..65749fe 100644 ---- a/doc/page-hierarchy.dox -+++ b/doc/page-hierarchy.dox -@@ -5,6 +5,7 @@ - - @subpage clickpad_softbuttons - - @subpage tapping - - @subpage gestures -+- @subpage touchpad_pressure - - @subpage palm_detection - - @subpage t440_support - - @subpage touchpad_jumping_cursor -diff --git a/doc/touchpad-pressure.dox b/doc/touchpad-pressure.dox -new file mode 100644 -index 0000000..7c55c9f ---- /dev/null -+++ b/doc/touchpad-pressure.dox -@@ -0,0 +1,138 @@ -+/** -+@page touchpad_pressure Touchpad pressure-based touch detection -+ -+libinput uses the touchpad pressure values to detect wether a finger has -+been placed on the touchpad. This is @ref kernel_pressure_information and -+combines with a libinput-specific hardware database to adjust the thresholds -+on a per-device basis. libinput uses pressure thresholds primarily to filter -+out accidental light touches but pressure information is also used for -+some @ref palm_detection. -+ -+Pressure thresholds are **not** directly configurable by the user, rather it -+is planned that libinput provides custom pressure thresholds for each device -+where necessary. See @ref touchpad_pressure_hwdb for instructions for your -+local device. -+ -+@section kernel_pressure_information Information provided by the kernel -+ -+The kernel sends multiple values to inform userspace about a finger touching -+the touchpad. The most basic is the ```EV_KEY/BTN_TOUCH``` boolean event -+that simply announces physical contact with the touchpad. The decision when -+this event is sent is usually made by the kernel driver and may depend on -+device-specific thresholds. These thresholds are transparent to userspace -+and cannot be modified. -+ -+Many contemporary touchpad devices provide an absolute pressure axis in -+addition to ```BTN_TOUCH```. This pressure generally increases as the pressure -+increases, however few touchpads are capable of detection pressure. The -+pressure value is usually related to the covered area - as the pressure -+increases a finger flattens and thus covers a larger area. The range -+provided by the kernel is not mapped to a specific physical range and -+often requires adjustment. Pressure is sent by the ```ABS_PRESSURE``` axis -+for single-touch touchpads or ```ABS_MT_PRESSURE``` on multi-touch capable -+touchpads. -+ -+Some devices provide additional touch size information through -+the ```ABS_MT_TOUCH_MAJOR/ABS_MT_TOUCH_MINOR``` axes and/or -+the ```ABS_MT_WIDTH_MAJOR/ABS_MT_WIDTH_MINOR``` axes. While the kernel -+documentation specifies how these axes are supposed to be mapped, few -+devices forward -+reliable information. -+ -+@section touchpad_pressure_hwdb Debugging touchpad pressure ranges -+ -+This section describes how to determine the touchpad pressure ranges -+required for a touchpad device and how to add the required hwdb entry -+locally. Note that the hwdb entry is **not public API** and **may change at -+any time**. Users are advised to @ref reporting_bugs "report a bug" with the -+updated pressure ranges when testing has completed. -+ -+First, install the "evemu" package providing the ```evemu-record``` tool. -+Run ```evemu-record``` as root (without arguments) to see a list of devices -+and select the touchpad device. Pipe the actual output of the tool into a -+file for later analysis. For example: -+ -+
-+$ sudo evemu-record > touchpad-pressure.txt
-+Available devices:
-+/dev/input/event0:	Lid Switch
-+/dev/input/event1:	Sleep Button
-+/dev/input/event2:	Power Button
-+/dev/input/event3:	AT Translated Set 2 keyboard
-+/dev/input/event4:	SynPS/2 Synaptics TouchPad
-+/dev/input/event5:	ELAN Touchscreen
-+[...]
-+Select the device event number [0-19]: 4
-+#     Ctrl+C to quit, the output will be in touchpad-pressure.txt
-+
-+ -+Now move a finger at **normal pressure** several times around the touchpad, -+as if moving the cursor normally around the screen. Avoid any accidental -+palm touches or any excessive or light pressure. -+ -+The event recording is then filtered for pressure information, which is -+sorted and exported to a new file: -+
-+$ grep --only-matching "ABS_MT_PRESSURE[ ]*[0-9]*" touchpad-pressure.txt | \
-+	sed -e "s/ABS_MT_PRESSURE[ ]*//" | \
-+	sort -n | uniq -c > touchpad-pressure-statistics.txt
-+
-+ -+The file contains a list of (count, pressure-value) tuples which can be -+visualized with gnuplot. Copy the following into a file named -+```touchpad-pressure-statistics.gnuplot```: -+ -+
-+set style data lines
-+plot 'touchpad-pressure-statistics.txt' using 2:1
-+pause -1
-+
-+ -+Now, you can visualize the touchpad pressure curve with the following -+command: -+
-+$ gnuplot  touchpad-pressure-statistics.gnuplot
-+
-+ -+The visualization will show a curve with the various pressure ranges, see -+[this bugzilla attachment](https://bugs.freedesktop.org/attachment.cgi?id=130659). -+In most cases, the thresholds can be guessed based on this curve. libinput -+employes a [Schmitt trigger](https://en.wikipedia.org/wiki/Schmitt_trigger) -+with an upper threshold and a lower threshold. A touch is detected when the -+pressure goes above the high threshold, a release is detected when the -+pressure fallse below the low threshold. Thus, an ideal threshold -+combination is with a high threshold slightly above the minimum threshold, a -+low threshold on the minimum threshold. -+ -+Once the thresholds are decided on (e.g. 10 and 8), they can be enabled with -+the following hwdb file: -+ -+
-+$> cat /etc/udev/hwdb.d/99-touchpad-pressure.hwdb
-+libinput:name:*SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPCompaq6910p*
-+ LIBINPUT_ATTR_PRESSURE_RANGE=10:8
-+
-+ -+The first line is the match line and should be adjusted for the device name -+(see evemu-record's output) and for the local system, based on the -+information in ```/sys/class/dmi/id/modalias```. The modalias should be -+shortened to the specific system's information, usually system vendor (svn) -+and product name (pn). -+ -+Once in place, you need to run the following to commands, adjusted for your -+device's event node (see @ref faq_hwdb_changes): -+
-+    sudo udevadm hwdb --update
-+    sudo udevadm test /sys/class/input/eventX
-+
-+ -+If the pressure range property shows up correctly, restart X or the -+Wayland compositor and libinput should now use the correct pressure -+thresholds. The @ref developer_tools can be used to verify the correct -+functionality first without the need for a restart. -+ -+Once the pressure ranges are deemed correct, -+@ref reporting_bugs "report a bug" to get the pressure ranges into the -+repository. -+ -+*/ --- -2.9.3 - diff --git a/0003-udev-Remove-unused-Elantech-touchpad-model-binding.patch b/0003-udev-Remove-unused-Elantech-touchpad-model-binding.patch deleted file mode 100644 index 7d9c126..0000000 --- a/0003-udev-Remove-unused-Elantech-touchpad-model-binding.patch +++ /dev/null @@ -1,60 +0,0 @@ -From c24abedeb4d5fc0245dfcd7e3eed3561f5767b11 Mon Sep 17 00:00:00 2001 -From: Paul Kocialkowski -Date: Fri, 28 Apr 2017 15:29:02 +0200 -Subject: [PATCH libinput 3/5] udev: Remove unused Elantech touchpad model - binding - -The Elantech touchpad model binding in udev is currently unused, since -pressure values were moved to a udev binding of their own. - -This gets rid of the deprecated model binding. - -Signed-off-by: Paul Kocialkowski -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -(cherry picked from commit 6af9f8e5fbb9f5588eeb51185d2cc0d7f93d34ee) ---- - src/evdev.c | 1 - - src/evdev.h | 1 - - udev/90-libinput-model-quirks.hwdb | 1 - - 3 files changed, 3 deletions(-) - -diff --git a/src/evdev.c b/src/evdev.c -index 2d18bed..3b4bc4b 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -2245,7 +2245,6 @@ evdev_read_model_flags(struct evdev_device *device) - MODEL(ALPS_TOUCHPAD), - MODEL(SYNAPTICS_SERIAL_TOUCHPAD), - MODEL(JUMPING_SEMI_MT), -- MODEL(ELANTECH_TOUCHPAD), - MODEL(APPLE_INTERNAL_KEYBOARD), - MODEL(CYBORG_RAT), - MODEL(CYAPA), -diff --git a/src/evdev.h b/src/evdev.h -index 465b8a3..c9a44f8 100644 ---- a/src/evdev.h -+++ b/src/evdev.h -@@ -111,7 +111,6 @@ enum evdev_device_model { - EVDEV_MODEL_ALPS_TOUCHPAD = (1 << 8), - EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD = (1 << 9), - EVDEV_MODEL_JUMPING_SEMI_MT = (1 << 10), -- EVDEV_MODEL_ELANTECH_TOUCHPAD = (1 << 11), - EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), - EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13), - EVDEV_MODEL_CYBORG_RAT = (1 << 14), -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index 1b9876f..eaa9345 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -86,7 +86,6 @@ libinput:name:* Touchpad:dmi:*svnDellInc.:* - libinput:name:*ETPS/2 Elantech Touchpad*:dmi:* - LIBINPUT_ATTR_RESOLUTION_HINT=31x31 - LIBINPUT_ATTR_PRESSURE_RANGE=24:10 -- LIBINPUT_MODEL_ELANTECH_TOUCHPAD=1 - - ########################################## - # Google --- -2.9.3 - diff --git a/0004-udev-Select-more-generic-pressure-range-values-for-E.patch b/0004-udev-Select-more-generic-pressure-range-values-for-E.patch deleted file mode 100644 index d985baf..0000000 --- a/0004-udev-Select-more-generic-pressure-range-values-for-E.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 17692e5d24870e384f40ba95197396d868ab2b8b Mon Sep 17 00:00:00 2001 -From: Paul Kocialkowski -Date: Fri, 28 Apr 2017 15:29:03 +0200 -Subject: [PATCH libinput 4/5] udev: Select more generic pressure range values - for Elantech touchpads - -The current pressure values for Elantech touchpads are too high for -various devices and make the touchpad almost unusable on them. - -Decreasing the pressure range values makes those devices usable again. - -Signed-off-by: Paul Kocialkowski -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -(cherry picked from commit 1dfedc6995cf63e004bd3e0b1d22ae263feb7362) ---- - udev/90-libinput-model-quirks.hwdb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index eaa9345..73734e6 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -85,7 +85,7 @@ libinput:name:* Touchpad:dmi:*svnDellInc.:* - ########################################## - libinput:name:*ETPS/2 Elantech Touchpad*:dmi:* - LIBINPUT_ATTR_RESOLUTION_HINT=31x31 -- LIBINPUT_ATTR_PRESSURE_RANGE=24:10 -+ LIBINPUT_ATTR_PRESSURE_RANGE=10:8 - - ########################################## - # Google --- -2.9.3 - diff --git a/0005-udev-Add-specific-pressure-range-for-the-ASUS-ZenBoo.patch b/0005-udev-Add-specific-pressure-range-for-the-ASUS-ZenBoo.patch deleted file mode 100644 index b547ef3..0000000 --- a/0005-udev-Add-specific-pressure-range-for-the-ASUS-ZenBoo.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 4ab9c15cac163e27f2b92726019c165eaecb7451 Mon Sep 17 00:00:00 2001 -From: Paul Kocialkowski -Date: Fri, 28 Apr 2017 15:29:04 +0200 -Subject: [PATCH libinput 5/5] udev: Add specific pressure range for the ASUS - ZenBook UX21E - -This adds specific pressure range values for the Elantech touchpad -found in the ASUS ZenBook UX21E. - -https://bugs.freedesktop.org/show_bug.cgi?id=99975 - -Signed-off-by: Paul Kocialkowski -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -(cherry picked from commit 46af543b49b4e2d75348c715d1c76c2e0d432514) ---- - udev/90-libinput-model-quirks.hwdb | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index 73734e6..560e77a 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -87,6 +87,9 @@ libinput:name:*ETPS/2 Elantech Touchpad*:dmi:* - LIBINPUT_ATTR_RESOLUTION_HINT=31x31 - LIBINPUT_ATTR_PRESSURE_RANGE=10:8 - -+libinput:name:*ETPS/2 Elantech Touchpad*:dmi:*svnASUSTeKComputerInc.:pnUX21E:* -+ LIBINPUT_ATTR_PRESSURE_RANGE=24:10 -+ - ########################################## - # Google - ########################################## --- -2.9.3 - diff --git a/libinput.spec b/libinput.spec index 2472fde..9797b9e 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.7.1 -Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.7.2 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,12 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif - -Patch01: 0001-touchpad-move-the-pressure-range-to-a-hwdb-entry.patch -Patch02: 0002-doc-add-documentation-for-touchpad-pressure-detectio.patch -Patch03: 0003-udev-Remove-unused-Elantech-touchpad-model-binding.patch -Patch04: 0004-udev-Select-more-generic-pressure-range-values-for-E.patch -Patch05: 0005-udev-Add-specific-pressure-range-for-the-ASUS-ZenBoo.patch Patch06: 0001-lid-re-init-the-event-listener-after-removing-it.patch BuildRequires: git @@ -102,6 +96,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue May 09 2017 Peter Hutterer 1.7.2-1 +- libinput 1.7.2 + * Thu May 04 2017 Peter Hutterer 1.7.1-4 - Fix a crash when shutting down a touchpad lid listener (#1440927) diff --git a/sources b/sources index 32c51cd..ed3d4f0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.7.1.tar.xz) = ee477fbbe2042ffeff70a960caf97e914d28c916af495765071a0184f442fa503d461bc34b87dc3dd62ef1bfd3e921ddc6fc065f8089d16d81c037d53d677352 +SHA512 (libinput-1.7.2.tar.xz) = cdbd2994e954aac9538fe907c275e6e23e2bed0e9c4c65f19591bdcdbf5074131c72b92e87de87c03f75a991fcdb7f568b491a12f00031c4eba11082ca44d69f From c3e6f4b5533a74976ba9adb86f325a5f927dbf90 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 9 May 2017 15:26:33 +1000 Subject: [PATCH 120/317] Ignore taps in the palm detection area even in software buttons (#1415796) --- ...e-tap-exclusion-zone-down-to-the-ful.patch | 46 +++++++++++++++++++ libinput.spec | 6 ++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-pull-the-tap-exclusion-zone-down-to-the-ful.patch diff --git a/0001-touchpad-pull-the-tap-exclusion-zone-down-to-the-ful.patch b/0001-touchpad-pull-the-tap-exclusion-zone-down-to-the-ful.patch new file mode 100644 index 0000000..dd53373 --- /dev/null +++ b/0001-touchpad-pull-the-tap-exclusion-zone-down-to-the-ful.patch @@ -0,0 +1,46 @@ +From 3a940332df9dbc07ceff076e70a0972d2cf28769 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 9 May 2017 15:07:20 +1000 +Subject: [PATCH libinput] touchpad: pull the tap exclusion zone down to the + full edge zone + +This was originally left outside of the button areas in case users tap in +those zones, but we're getting false tap events in that zone. + +On a 100mm touchpad, the edge zone is merely 5mm, it's acceptable to ignore +taps in that area even in the software button. We can revisit this if we see +tap detection failures in the future. + +https://bugzilla.redhat.com/show_bug.cgi?id=1415796 + +Signed-off-by: Peter Hutterer +--- + src/evdev-mt-touchpad.c | 12 +++--------- + 1 file changed, 3 insertions(+), 9 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index e0757e17..54fa650b 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -557,15 +557,9 @@ tp_palm_tap_is_palm(const struct tp_dispatch *tp, const struct tp_touch *t) + t->point.x < tp->palm.right_edge) + return false; + +- /* We're inside the left/right palm edge and not in one of the +- * software button areas */ +- if (t->point.y < tp->buttons.bottom_area.top_edge) { +- evdev_log_debug(tp->device, +- "palm: palm-tap detected\n"); +- return true; +- } +- +- return false; ++ evdev_log_debug(tp->device, ++ "palm: palm-tap detected\n"); ++ return true; + } + + static bool +-- +2.12.2 + diff --git a/libinput.spec b/libinput.spec index 9797b9e..0b10e52 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.7.2 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -19,6 +19,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} %endif Patch06: 0001-lid-re-init-the-event-listener-after-removing-it.patch +Patch07: 0001-touchpad-pull-the-tap-exclusion-zone-down-to-the-ful.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -96,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue May 09 2017 Peter Hutterer 1.7.2-2 +- Ignore taps in the palm detection area even in software buttons (#1415796) + * Tue May 09 2017 Peter Hutterer 1.7.2-1 - libinput 1.7.2 From e057fa633333c0196e1cf84e23479d55fa5a57df Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 12 Jun 2017 12:00:20 +1000 Subject: [PATCH 121/317] libinput 1.7.3 --- .gitignore | 1 + libinput.spec | 10 +++++----- sources | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 56d78de..c7b2744 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /libinput-1.7.1.tar.xz /libinput-1.7.2.tar.xz +/libinput-1.7.3.tar.xz diff --git a/libinput.spec b/libinput.spec index 0b10e52..fbe88cb 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.7.2 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.7.3 +Release: 1%{?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 -Patch06: 0001-lid-re-init-the-event-listener-after-removing-it.patch -Patch07: 0001-touchpad-pull-the-tap-exclusion-zone-down-to-the-ful.patch - BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -97,6 +94,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Jun 12 2017 Peter Hutterer 1.7.3-1 +- libinput 1.7.3 + * Tue May 09 2017 Peter Hutterer 1.7.2-2 - Ignore taps in the palm detection area even in software buttons (#1415796) diff --git a/sources b/sources index ed3d4f0..2679f0a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.7.2.tar.xz) = cdbd2994e954aac9538fe907c275e6e23e2bed0e9c4c65f19591bdcdbf5074131c72b92e87de87c03f75a991fcdb7f568b491a12f00031c4eba11082ca44d69f +SHA512 (libinput-1.7.3.tar.xz) = 2262dc56d213a4d3ea765e870af200e2c336a166baa1bbdf5205e3ce70faefc777429ba09563c5dd79feb5442f53abc84e04a0f32a06bb622d6e120bb8ad152b From 2272a06421e1a1bd23e7190614292f83c5d55193 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 19 Jun 2017 10:39:13 +1000 Subject: [PATCH 122/317] libinput 1.8rc1 --- libinput.spec | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/libinput.spec b/libinput.spec index fbe88cb..1ac5eb8 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.7.3 +Version: 1.7.901 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -58,7 +58,12 @@ git am -p1 %{patches} < /dev/null %build autoreconf -v --install --force || exit 1 -%configure --disable-static --disable-silent-rules --with-udev-dir=%{udevdir} +%configure --disable-static \ + --disable-debug-gui \ + --disable-documentation \ + --disable-tests \ + --disable-silent-rules \ + --with-udev-dir=%{udevdir} make %{?_smp_mflags} @@ -82,10 +87,19 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %{udevdir}/rules.d/80-libinput-device-groups.rules %{udevdir}/rules.d/90-libinput-model-quirks.rules %{udevdir}/hwdb.d/90-libinput-model-quirks.hwdb -%{_bindir}/libinput-list-devices -%{_bindir}/libinput-debug-events +%{_bindir}/libinput +%dir %{_libexecdir}/libinput/ +%{_libexecdir}/libinput/libinput-debug-events +%{_libexecdir}/libinput/libinput-list-devices +%{_libexecdir}/libinput/libinput-measure +%{_libexecdir}/libinput/libinput-measure-touchpad-tap +%{_mandir}/man1/libinput.1* +%{_mandir}/man1/libinput-measure.1* +%{_mandir}/man1/libinput-measure-touchpad-tap.1* %{_mandir}/man1/libinput-list-devices.1* %{_mandir}/man1/libinput-debug-events.1* +%{_bindir}/libinput-list-devices +%{_bindir}/libinput-debug-events %files devel %{_includedir}/libinput.h @@ -94,6 +108,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Jun 19 2017 Peter Hutterer 1.7.901-1 +- libinput 1.8rc1 + * Mon Jun 12 2017 Peter Hutterer 1.7.3-1 - libinput 1.7.3 From 686d624a02ed814fe40409800066dede5ee85af6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 19 Jun 2017 11:25:30 +1000 Subject: [PATCH 123/317] libinput 1.8rc1 with source files this time --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c7b2744..fa5a539 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /libinput-1.7.1.tar.xz /libinput-1.7.2.tar.xz /libinput-1.7.3.tar.xz +/libinput-1.7.901.tar.xz diff --git a/libinput.spec b/libinput.spec index 1ac5eb8..caf11aa 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.7.901 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -108,6 +108,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Jun 19 2017 Peter Hutterer 1.7.901-2 +- libinput 1.8rc1 with source files this time + * Mon Jun 19 2017 Peter Hutterer 1.7.901-1 - libinput 1.8rc1 diff --git a/sources b/sources index 2679f0a..765399d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.7.3.tar.xz) = 2262dc56d213a4d3ea765e870af200e2c336a166baa1bbdf5205e3ce70faefc777429ba09563c5dd79feb5442f53abc84e04a0f32a06bb622d6e120bb8ad152b +SHA512 (libinput-1.7.901.tar.xz) = 651e60ded37c52d365af8b4279fbc8da91e37ab93c2ee248580994e5257a85e04de9a8e5daf8b021244783cae582fec74109870f7090a289d66bc4e11ebd4b34 From bf0f7f95b7f23048958b833be242fdc14bb08fd6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 26 Jun 2017 19:28:32 +1000 Subject: [PATCH 124/317] libinput 1.8rc2 --- .gitignore | 1 + libinput.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index fa5a539..126e893 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /libinput-1.7.2.tar.xz /libinput-1.7.3.tar.xz /libinput-1.7.901.tar.xz +/libinput-1.7.902.tar.xz diff --git a/libinput.spec b/libinput.spec index caf11aa..46bc40e 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.7.901 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.7.902 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -108,6 +108,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Jun 26 2017 Peter Hutterer 1.7.902-1 +- libinput 1.8rc2 + * Mon Jun 19 2017 Peter Hutterer 1.7.901-2 - libinput 1.8rc1 with source files this time diff --git a/sources b/sources index 765399d..aeae545 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.7.901.tar.xz) = 651e60ded37c52d365af8b4279fbc8da91e37ab93c2ee248580994e5257a85e04de9a8e5daf8b021244783cae582fec74109870f7090a289d66bc4e11ebd4b34 +SHA512 (libinput-1.7.902.tar.xz) = 022caa34e110e59d64bc2b06eaf50441c66c5fc44685c66923f5688cf1001da980cea991b7f6f348296446ba08f67c9697caef0a938bb59e6054aa7b2c5b0bbe From e9b5d0d5f0ed7093f2f4e5b65daa7009edf4aae8 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 27 Jun 2017 09:18:03 +1000 Subject: [PATCH 125/317] Switch to meson as build system --- libinput.spec | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/libinput.spec b/libinput.spec index 46bc40e..e2c4e20 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.7.902 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -19,7 +19,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} %endif BuildRequires: git -BuildRequires: autoconf automake libtool pkgconfig +BuildRequires: meson pkgconfig BuildRequires: libevdev-devel BuildRequires: libudev-devel BuildRequires: mtdev-devel libwacom-devel @@ -57,20 +57,14 @@ git commit --allow-empty -a -q -m "%{version} baseline." git am -p1 %{patches} < /dev/null %build -autoreconf -v --install --force || exit 1 -%configure --disable-static \ - --disable-debug-gui \ - --disable-documentation \ - --disable-tests \ - --disable-silent-rules \ - --with-udev-dir=%{udevdir} -make %{?_smp_mflags} - +%meson -Ddebug-gui=false \ + -Ddocumentation=false \ + -Dtests=false \ + -Dudev-dir=%{udevdir} +%meson_build %install -%make_install -find $RPM_BUILD_ROOT -name '*.la' -delete - +%meson_install %post /sbin/ldconfig @@ -108,6 +102,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Jun 27 2017 Peter Hutterer 1.7.902-2 +- Switch to meson as build system + * Mon Jun 26 2017 Peter Hutterer 1.7.902-1 - libinput 1.8rc2 From 317d89f1fac2cca9f9d5163fbe5e14a0b220e3f3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 3 Jul 2017 15:34:47 +1000 Subject: [PATCH 126/317] libinput 1.8 --- .gitignore | 1 + libinput.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 126e893..944105a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /libinput-1.7.3.tar.xz /libinput-1.7.901.tar.xz /libinput-1.7.902.tar.xz +/libinput-1.8.0.tar.xz diff --git a/libinput.spec b/libinput.spec index e2c4e20..7d91ff2 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.7.902 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.8.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -102,6 +102,9 @@ git am -p1 %{patches} < /dev/null %changelog +* Mon Jul 03 2017 Peter Hutterer 1.8.0-1 +- libinput 1.8 + * Tue Jun 27 2017 Peter Hutterer 1.7.902-2 - Switch to meson as build system diff --git a/sources b/sources index aeae545..009fbee 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.7.902.tar.xz) = 022caa34e110e59d64bc2b06eaf50441c66c5fc44685c66923f5688cf1001da980cea991b7f6f348296446ba08f67c9697caef0a938bb59e6054aa7b2c5b0bbe +SHA512 (libinput-1.8.0.tar.xz) = 84354859c25cf2906214fd195c396e8166db361664edc625db5aab4f1b247dfc4a80d7e9dffe2b61c6bbfaa8208d3f64ce56aac2180a699cb71a088d6196ba4d From 95ca86997854dadb68d3847e3d3d1c539ef58aca Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Thu, 13 Jul 2017 16:41:55 +0200 Subject: [PATCH 127/317] Rebuild for pkg-config fix from meson Signed-off-by: Igor Gnatenko --- libinput.spec | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/libinput.spec b/libinput.spec index 7d91ff2..cb4bb24 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.8.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,12 +18,13 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -BuildRequires: git -BuildRequires: meson pkgconfig -BuildRequires: libevdev-devel -BuildRequires: libudev-devel -BuildRequires: mtdev-devel libwacom-devel -BuildRequires: pkgconfig(udev) +BuildRequires: git-core +BuildRequires: gcc +BuildRequires: meson +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(mtdev) >= 1.1.0 +BuildRequires: pkgconfig(libevdev) >= 0.4 +BuildRequires: pkgconfig(libwacom) >= 0.20 %description libinput is a library that handles input devices for display servers and other @@ -102,6 +103,11 @@ git am -p1 %{patches} < /dev/null %changelog +* Thu Jul 13 2017 Igor Gnatenko - 1.8.0-2 +- Add missing BuildRequires: gcc +- Fixup other BuildRequires +- Rebuild for pkg-config fix from meson + * Mon Jul 03 2017 Peter Hutterer 1.8.0-1 - libinput 1.8 From 1f6f6d22edc5da6b5eb6f4a7db74dbb1515d4ada Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 19 Jul 2017 12:57:20 +1000 Subject: [PATCH 128/317] libinput 1.8.1 --- .gitignore | 1 + libinput.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 944105a..fd38a3d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /libinput-1.7.901.tar.xz /libinput-1.7.902.tar.xz /libinput-1.8.0.tar.xz +/libinput-1.8.1.tar.xz diff --git a/libinput.spec b/libinput.spec index cb4bb24..de749f6 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.8.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.8.1 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -103,6 +103,9 @@ git am -p1 %{patches} < /dev/null %changelog +* Wed Jul 19 2017 Peter Hutterer 1.8.1-1 +- libinput 1.8.1 + * Thu Jul 13 2017 Igor Gnatenko - 1.8.0-2 - Add missing BuildRequires: gcc - Fixup other BuildRequires diff --git a/sources b/sources index 009fbee..88813dd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.8.0.tar.xz) = 84354859c25cf2906214fd195c396e8166db361664edc625db5aab4f1b247dfc4a80d7e9dffe2b61c6bbfaa8208d3f64ce56aac2180a699cb71a088d6196ba4d +SHA512 (libinput-1.8.1.tar.xz) = 1566ccb7d1721ee2d16badc404896d31e3ac45fda71e2577db17141a507594f3827ed0a389bb537f946cb380d77feedef8e71df76ac89f8c11c44463df01ee4f From ab9d50a19aa128cc36c3ea7b904b9987547780db Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 19:03:51 +0000 Subject: [PATCH 129/317] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index de749f6..b0996ef 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.8.1 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -103,6 +103,9 @@ git am -p1 %{patches} < /dev/null %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 1.8.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Wed Jul 19 2017 Peter Hutterer 1.8.1-1 - libinput 1.8.1 From 1b06234a8d1d43c211c7e34fdbc80f4a01361316 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 01:39:50 +0000 Subject: [PATCH 130/317] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index b0996ef..82a7f77 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.8.1 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -103,6 +103,9 @@ git am -p1 %{patches} < /dev/null %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 1.8.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 1.8.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 555b8e5bfafd6a40a19844892f414dde67503eaf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 5 Sep 2017 15:38:49 +1000 Subject: [PATCH 131/317] Remove some now-unused patches --- ...the-event-listener-after-removing-it.patch | 99 ------------------- ...e-tap-exclusion-zone-down-to-the-ful.patch | 46 --------- 2 files changed, 145 deletions(-) delete mode 100644 0001-lid-re-init-the-event-listener-after-removing-it.patch delete mode 100644 0001-touchpad-pull-the-tap-exclusion-zone-down-to-the-ful.patch diff --git a/0001-lid-re-init-the-event-listener-after-removing-it.patch b/0001-lid-re-init-the-event-listener-after-removing-it.patch deleted file mode 100644 index bf165b7..0000000 --- a/0001-lid-re-init-the-event-listener-after-removing-it.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 98eca5257c1d3d62ebaaf0ed8ee262381f3dc256 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 4 May 2017 14:50:31 +1000 -Subject: [PATCH libinput] lid: re-init the event listener after removing it - -We may call remove on it again and that segfaults if it hasn't been -initialized. - -https://bugzilla.redhat.com/show_bug.cgi?id=1440927 - -Signed-off-by: Peter Hutterer ---- - src/evdev-lid.c | 23 ++++++++++++++++++++--- - src/evdev-mt-touchpad.c | 6 ++++++ - 2 files changed, 26 insertions(+), 3 deletions(-) - -diff --git a/src/evdev-lid.c b/src/evdev-lid.c -index 8db7f37c..b7ff065e 100644 ---- a/src/evdev-lid.c -+++ b/src/evdev-lid.c -@@ -98,7 +98,9 @@ lid_switch_toggle_keyboard_listener(struct lid_switch_dispatch *dispatch, - dispatch); - } else { - libinput_device_remove_event_listener( -- &dispatch->keyboard.listener); -+ &dispatch->keyboard.listener); -+ libinput_device_init_event_listener( -+ &dispatch->keyboard.listener); - } - } - -@@ -174,6 +176,17 @@ evdev_read_switch_reliability_prop(struct evdev_device *device) - } - - static void -+lid_switch_remove(struct evdev_dispatch *evdev_dispatch) -+{ -+ struct lid_switch_dispatch *dispatch = lid_dispatch(evdev_dispatch); -+ -+ if (!dispatch->keyboard.keyboard) -+ return; -+ -+ libinput_device_remove_event_listener(&dispatch->keyboard.listener); -+} -+ -+static void - lid_switch_destroy(struct evdev_dispatch *evdev_dispatch) - { - struct lid_switch_dispatch *dispatch = lid_dispatch(evdev_dispatch); -@@ -197,7 +210,9 @@ lid_switch_pair_keyboard(struct evdev_device *lid_switch, - if (dispatch->keyboard.keyboard) { - if (bus_kbd != BUS_I8042) - return; -+ - libinput_device_remove_event_listener(&dispatch->keyboard.listener); -+ libinput_device_init_event_listener(&dispatch->keyboard.listener); - } - - dispatch->keyboard.keyboard = keyboard; -@@ -225,7 +240,9 @@ lid_switch_interface_device_removed(struct evdev_device *device, - - if (removed_device == dispatch->keyboard.keyboard) { - libinput_device_remove_event_listener( -- &dispatch->keyboard.listener); -+ &dispatch->keyboard.listener); -+ libinput_device_init_event_listener( -+ &dispatch->keyboard.listener); - dispatch->keyboard.keyboard = NULL; - } - } -@@ -271,7 +288,7 @@ lid_switch_sync_initial_state(struct evdev_device *device, - struct evdev_dispatch_interface lid_switch_interface = { - lid_switch_process, - NULL, /* suspend */ -- NULL, /* remove */ -+ lid_switch_remove, - lid_switch_destroy, - lid_switch_interface_device_added, - lid_switch_interface_device_removed, -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index a35688b1..73f0fdd8 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -1673,6 +1673,12 @@ tp_interface_device_removed(struct evdev_device *device, - tp->dwt.keyboard = NULL; - } - -+ if (removed_device == tp->lid_switch.lid_switch) { -+ libinput_device_remove_event_listener( -+ &tp->lid_switch.lid_switch_listener); -+ tp->lid_switch.lid_switch = NULL; -+ } -+ - if (tp->sendevents.current_mode != - LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE) - return; --- -2.12.2 - diff --git a/0001-touchpad-pull-the-tap-exclusion-zone-down-to-the-ful.patch b/0001-touchpad-pull-the-tap-exclusion-zone-down-to-the-ful.patch deleted file mode 100644 index dd53373..0000000 --- a/0001-touchpad-pull-the-tap-exclusion-zone-down-to-the-ful.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 3a940332df9dbc07ceff076e70a0972d2cf28769 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 9 May 2017 15:07:20 +1000 -Subject: [PATCH libinput] touchpad: pull the tap exclusion zone down to the - full edge zone - -This was originally left outside of the button areas in case users tap in -those zones, but we're getting false tap events in that zone. - -On a 100mm touchpad, the edge zone is merely 5mm, it's acceptable to ignore -taps in that area even in the software button. We can revisit this if we see -tap detection failures in the future. - -https://bugzilla.redhat.com/show_bug.cgi?id=1415796 - -Signed-off-by: Peter Hutterer ---- - src/evdev-mt-touchpad.c | 12 +++--------- - 1 file changed, 3 insertions(+), 9 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index e0757e17..54fa650b 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -557,15 +557,9 @@ tp_palm_tap_is_palm(const struct tp_dispatch *tp, const struct tp_touch *t) - t->point.x < tp->palm.right_edge) - return false; - -- /* We're inside the left/right palm edge and not in one of the -- * software button areas */ -- if (t->point.y < tp->buttons.bottom_area.top_edge) { -- evdev_log_debug(tp->device, -- "palm: palm-tap detected\n"); -- return true; -- } -- -- return false; -+ evdev_log_debug(tp->device, -+ "palm: palm-tap detected\n"); -+ return true; - } - - static bool --- -2.12.2 - From 817b4343ffa6e3db86e841f933e94230ccc2e112 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 5 Sep 2017 16:08:09 +1000 Subject: [PATCH 132/317] Don't try pinching when the finger number exceeds available slots Don't resume a disabled touchpad after a lid switch open (#1448962) --- ...on-t-try-to-pinch-for-nfingers-slots.patch | 282 ++++++++++++++++++ ...pad-don-t-resume-a-disabled-touchpad.patch | 186 ++++++++++++ libinput.spec | 9 +- 3 files changed, 476 insertions(+), 1 deletion(-) create mode 100644 0001-gestures-don-t-try-to-pinch-for-nfingers-slots.patch create mode 100644 0001-touchpad-don-t-resume-a-disabled-touchpad.patch diff --git a/0001-gestures-don-t-try-to-pinch-for-nfingers-slots.patch b/0001-gestures-don-t-try-to-pinch-for-nfingers-slots.patch new file mode 100644 index 0000000..2a589dc --- /dev/null +++ b/0001-gestures-don-t-try-to-pinch-for-nfingers-slots.patch @@ -0,0 +1,282 @@ +From a7e79ed5a69556c71bb9dd2f0047e4833affa929 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Sat, 29 Jul 2017 13:59:40 +0100 +Subject: [PATCH libinput] gestures: don't try to pinch for nfingers > slots + +We don't know the position of the third finger on 2-slot touchpads, differing +between swipe and pinch is reliable. Simply disable 3-finger pinch and always +use swipe; 3fg pinch is uncommon anyway and it's better to have one of the +gestures working reliably than both unreliably. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad-gestures.c | 7 +- + test/test-gestures.c | 211 --------------------------------------- + 2 files changed, 6 insertions(+), 212 deletions(-) + +diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c +index a20b26d4..26bdef5a 100644 +--- a/src/evdev-mt-touchpad-gestures.c ++++ b/src/evdev-mt-touchpad-gestures.c +@@ -334,6 +334,10 @@ tp_gesture_handle_state_unknown(struct tp_dispatch *tp, uint64_t time) + if (tp->gesture.finger_count == 2) { + tp_gesture_set_scroll_buildup(tp); + return GESTURE_STATE_SCROLL; ++ /* more fingers than slots, don't bother with pinch, always ++ * assume swipe */ ++ } else if (tp->gesture.finger_count > tp->num_slots) { ++ return GESTURE_STATE_SWIPE; + } + + /* for 3+ finger gestures, check if one finger is > 20mm +@@ -356,7 +360,8 @@ tp_gesture_handle_state_unknown(struct tp_dispatch *tp, uint64_t time) + + /* If both touches are moving in the same direction assume + * scroll or swipe */ +- if (tp_gesture_same_directions(dir1, dir2)) { ++ if (tp->gesture.finger_count > tp->num_slots || ++ tp_gesture_same_directions(dir1, dir2)) { + if (tp->gesture.finger_count == 2) { + tp_gesture_set_scroll_buildup(tp); + return GESTURE_STATE_SCROLL; +diff --git a/test/test-gestures.c b/test/test-gestures.c +index ce1012d4..e95d1a01 100644 +--- a/test/test-gestures.c ++++ b/test/test-gestures.c +@@ -754,110 +754,6 @@ START_TEST(gestures_pinch_3fg) + } + END_TEST + +-START_TEST(gestures_pinch_3fg_btntool) +-{ +- struct litest_device *dev = litest_current_device(); +- struct libinput *li = dev->libinput; +- struct libinput_event *event; +- struct libinput_event_gesture *gevent; +- double dx, dy; +- int cardinal = _i; /* ranged test */ +- double dir_x, dir_y; +- int i; +- double scale, oldscale; +- double angle; +- int cardinals[8][2] = { +- { 0, 30 }, +- { 30, 30 }, +- { 30, 0 }, +- { 30, -30 }, +- { 0, -30 }, +- { -30, -30 }, +- { -30, 0 }, +- { -30, 30 }, +- }; +- +- if (libevdev_get_num_slots(dev->evdev) > 2 || +- !libinput_device_has_capability(dev->libinput_device, +- LIBINPUT_DEVICE_CAP_GESTURE)) +- return; +- +- dir_x = cardinals[cardinal][0]; +- dir_y = cardinals[cardinal][1]; +- +- litest_drain_events(li); +- +- litest_touch_down(dev, 0, 50 + dir_x, 50 + dir_y); +- litest_touch_down(dev, 1, 50 - dir_x, 50 - dir_y); +- litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 0); +- litest_event(dev, EV_KEY, BTN_TOOL_TRIPLETAP, 1); +- litest_event(dev, EV_SYN, SYN_REPORT, 0); +- libinput_dispatch(li); +- +- for (i = 0; i < 8; i++) { +- litest_push_event_frame(dev); +- if (dir_x > 0.0) +- dir_x -= 2; +- else if (dir_x < 0.0) +- dir_x += 2; +- if (dir_y > 0.0) +- dir_y -= 2; +- else if (dir_y < 0.0) +- dir_y += 2; +- litest_touch_move(dev, +- 0, +- 50 + dir_x, +- 50 + dir_y); +- litest_touch_move(dev, +- 1, +- 50 - dir_x, +- 50 - dir_y); +- litest_pop_event_frame(dev); +- libinput_dispatch(li); +- } +- +- event = libinput_get_event(li); +- gevent = litest_is_gesture_event(event, +- LIBINPUT_EVENT_GESTURE_PINCH_BEGIN, +- 3); +- dx = libinput_event_gesture_get_dx(gevent); +- dy = libinput_event_gesture_get_dy(gevent); +- scale = libinput_event_gesture_get_scale(gevent); +- ck_assert(dx == 0.0); +- ck_assert(dy == 0.0); +- ck_assert(scale == 1.0); +- +- libinput_event_destroy(event); +- +- while ((event = libinput_get_event(li)) != NULL) { +- gevent = litest_is_gesture_event(event, +- LIBINPUT_EVENT_GESTURE_PINCH_UPDATE, +- 3); +- +- oldscale = scale; +- scale = libinput_event_gesture_get_scale(gevent); +- +- ck_assert(scale < oldscale); +- +- angle = libinput_event_gesture_get_angle_delta(gevent); +- ck_assert_double_le(fabs(angle), 1.0); +- +- libinput_event_destroy(event); +- libinput_dispatch(li); +- } +- +- litest_touch_up(dev, 0); +- litest_touch_up(dev, 1); +- libinput_dispatch(li); +- event = libinput_get_event(li); +- gevent = litest_is_gesture_event(event, +- LIBINPUT_EVENT_GESTURE_PINCH_END, +- 3); +- ck_assert(!libinput_event_gesture_get_cancelled(gevent)); +- libinput_event_destroy(event); +-} +-END_TEST +- + START_TEST(gestures_pinch_4fg) + { + struct litest_device *dev = litest_current_device(); +@@ -969,111 +865,6 @@ START_TEST(gestures_pinch_4fg) + } + END_TEST + +-START_TEST(gestures_pinch_4fg_btntool) +-{ +- struct litest_device *dev = litest_current_device(); +- struct libinput *li = dev->libinput; +- struct libinput_event *event; +- struct libinput_event_gesture *gevent; +- double dx, dy; +- int cardinal = _i; /* ranged test */ +- double dir_x, dir_y; +- int i; +- double scale, oldscale; +- double angle; +- int cardinals[8][2] = { +- { 0, 30 }, +- { 30, 30 }, +- { 30, 0 }, +- { 30, -30 }, +- { 0, -30 }, +- { -30, -30 }, +- { -30, 0 }, +- { -30, 30 }, +- }; +- +- if (libevdev_get_num_slots(dev->evdev) > 2 || +- !libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_QUADTAP) || +- !libinput_device_has_capability(dev->libinput_device, +- LIBINPUT_DEVICE_CAP_GESTURE)) +- return; +- +- dir_x = cardinals[cardinal][0]; +- dir_y = cardinals[cardinal][1]; +- +- litest_drain_events(li); +- +- litest_touch_down(dev, 0, 50 + dir_x, 50 + dir_y); +- litest_touch_down(dev, 1, 50 - dir_x, 50 - dir_y); +- litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 0); +- litest_event(dev, EV_KEY, BTN_TOOL_QUADTAP, 1); +- litest_event(dev, EV_SYN, SYN_REPORT, 0); +- libinput_dispatch(li); +- +- for (i = 0; i < 8; i++) { +- litest_push_event_frame(dev); +- if (dir_x > 0.0) +- dir_x -= 3; +- else if (dir_x < 0.0) +- dir_x += 3; +- if (dir_y > 0.0) +- dir_y -= 3; +- else if (dir_y < 0.0) +- dir_y += 3; +- litest_touch_move(dev, +- 0, +- 50 + dir_x, +- 50 + dir_y); +- litest_touch_move(dev, +- 1, +- 50 - dir_x, +- 50 - dir_y); +- litest_pop_event_frame(dev); +- libinput_dispatch(li); +- } +- +- event = libinput_get_event(li); +- gevent = litest_is_gesture_event(event, +- LIBINPUT_EVENT_GESTURE_PINCH_BEGIN, +- 4); +- dx = libinput_event_gesture_get_dx(gevent); +- dy = libinput_event_gesture_get_dy(gevent); +- scale = libinput_event_gesture_get_scale(gevent); +- ck_assert(dx == 0.0); +- ck_assert(dy == 0.0); +- ck_assert(scale == 1.0); +- +- libinput_event_destroy(event); +- +- while ((event = libinput_get_event(li)) != NULL) { +- gevent = litest_is_gesture_event(event, +- LIBINPUT_EVENT_GESTURE_PINCH_UPDATE, +- 4); +- +- oldscale = scale; +- scale = libinput_event_gesture_get_scale(gevent); +- +- ck_assert(scale < oldscale); +- +- angle = libinput_event_gesture_get_angle_delta(gevent); +- ck_assert_double_le(fabs(angle), 1.5); +- +- libinput_event_destroy(event); +- libinput_dispatch(li); +- } +- +- litest_touch_up(dev, 0); +- litest_touch_up(dev, 1); +- libinput_dispatch(li); +- event = libinput_get_event(li); +- gevent = litest_is_gesture_event(event, +- LIBINPUT_EVENT_GESTURE_PINCH_END, +- 4); +- ck_assert(!libinput_event_gesture_get_cancelled(gevent)); +- libinput_event_destroy(event); +-} +-END_TEST +- + START_TEST(gestures_spread) + { + struct litest_device *dev = litest_current_device(); +@@ -1282,9 +1073,7 @@ litest_setup_tests_gestures(void) + litest_add_ranged("gestures:swipe", gestures_swipe_4fg_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals); + litest_add_ranged("gestures:pinch", gestures_pinch, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals); + litest_add_ranged("gestures:pinch", gestures_pinch_3fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals); +- litest_add_ranged("gestures:pinch", gestures_pinch_3fg_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals); + litest_add_ranged("gestures:pinch", gestures_pinch_4fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals); +- litest_add_ranged("gestures:pinch", gestures_pinch_4fg_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals); + litest_add_ranged("gestures:pinch", gestures_spread, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals); + litest_add_ranged("gestures:pinch", gestures_pinch_vertical_positon, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &fingers); + +-- +2.13.5 + diff --git a/0001-touchpad-don-t-resume-a-disabled-touchpad.patch b/0001-touchpad-don-t-resume-a-disabled-touchpad.patch new file mode 100644 index 0000000..8158120 --- /dev/null +++ b/0001-touchpad-don-t-resume-a-disabled-touchpad.patch @@ -0,0 +1,186 @@ +From 03f13ce6e854b3ff5d4b8971405a97afd66eef8e Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 5 Sep 2017 14:38:53 +1000 +Subject: [PATCH libinput] touchpad: don't resume a disabled touchpad + +Signed-off-by: Peter Hutterer +--- + src/evdev-mt-touchpad.c | 44 ++++++++++++++++++---------- + test/test-lid.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 107 insertions(+), 15 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 5b8fb1ec..c0a78255 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1426,6 +1426,31 @@ tp_resume(struct tp_dispatch *tp, struct evdev_device *device) + } + } + ++#define NO_EXCLUDED_DEVICE NULL ++static void ++tp_resume_conditional(struct tp_dispatch *tp, ++ struct evdev_device *device, ++ struct evdev_device *excluded_device) ++{ ++ if (tp->sendevents.current_mode == LIBINPUT_CONFIG_SEND_EVENTS_DISABLED) ++ return; ++ ++ if (tp->sendevents.current_mode == ++ LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE) { ++ struct libinput_device *dev; ++ ++ list_for_each(dev, &device->base.seat->devices_list, link) { ++ struct evdev_device *d = evdev_device(dev); ++ if (d != excluded_device && ++ (d->tags & EVDEV_TAG_EXTERNAL_MOUSE)) { ++ return; ++ } ++ } ++ } ++ ++ tp_resume(tp, device); ++} ++ + static void + tp_trackpoint_timeout(uint64_t now, void *data) + { +@@ -1667,7 +1692,7 @@ tp_lid_switch_event(uint64_t time, struct libinput_event *event, void *data) + swev = libinput_event_get_switch_event(event); + switch (libinput_event_switch_get_switch_state(swev)) { + case LIBINPUT_SWITCH_STATE_OFF: +- tp_resume(tp, tp->device); ++ tp_resume_conditional(tp, tp->device, NO_EXCLUDED_DEVICE); + evdev_log_debug(tp->device, "lid: resume touchpad\n"); + break; + case LIBINPUT_SWITCH_STATE_ON: +@@ -1722,7 +1747,6 @@ tp_interface_device_removed(struct evdev_device *device, + struct evdev_device *removed_device) + { + struct tp_dispatch *tp = (struct tp_dispatch*)device->dispatch; +- struct libinput_device *dev; + + if (removed_device == tp->buttons.trackpoint) { + /* Clear any pending releases for the trackpoint */ +@@ -1749,19 +1773,9 @@ tp_interface_device_removed(struct evdev_device *device, + tp->lid_switch.lid_switch = NULL; + } + +- if (tp->sendevents.current_mode != +- LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE) +- return; +- +- list_for_each(dev, &device->base.seat->devices_list, link) { +- struct evdev_device *d = evdev_device(dev); +- if (d != removed_device && +- (d->tags & EVDEV_TAG_EXTERNAL_MOUSE)) { +- return; +- } +- } +- +- tp_resume(tp, device); ++ /* removed_device is still in the device list at this point, so we ++ * need to exclude it from the tp_resume_conditional */ ++ tp_resume_conditional(tp, device, removed_device); + } + + static inline void +diff --git a/test/test-lid.c b/test/test-lid.c +index 4bf4c059..7e42f53d 100644 +--- a/test/test-lid.c ++++ b/test/test-lid.c +@@ -342,6 +342,81 @@ START_TEST(lid_disable_touchpad_already_open) + } + END_TEST + ++START_TEST(lid_dont_resume_disabled_touchpad) ++{ ++ struct litest_device *sw = litest_current_device(); ++ struct litest_device *touchpad; ++ struct libinput *li = sw->libinput; ++ ++ touchpad = lid_init_paired_touchpad(li); ++ litest_disable_tap(touchpad->libinput_device); ++ libinput_device_config_send_events_set_mode(touchpad->libinput_device, ++ LIBINPUT_CONFIG_SEND_EVENTS_DISABLED); ++ litest_drain_events(li); ++ ++ /* switch is on - no events */ ++ litest_lid_action(sw, LIBINPUT_SWITCH_STATE_ON); ++ litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); ++ ++ litest_touch_down(touchpad, 0, 50, 50); ++ litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); ++ litest_touch_up(touchpad, 0); ++ litest_assert_empty_queue(li); ++ ++ /* switch is off - motion events */ ++ litest_lid_action(sw, LIBINPUT_SWITCH_STATE_OFF); ++ litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); ++ ++ litest_touch_down(touchpad, 0, 50, 50); ++ litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); ++ litest_touch_up(touchpad, 0); ++ litest_assert_empty_queue(li); ++ ++ litest_delete_device(touchpad); ++} ++END_TEST ++ ++START_TEST(lid_dont_resume_disabled_touchpad_external_mouse) ++{ ++ struct litest_device *sw = litest_current_device(); ++ struct litest_device *touchpad, *mouse; ++ struct libinput *li = sw->libinput; ++ ++ touchpad = lid_init_paired_touchpad(li); ++ mouse = litest_add_device(li, LITEST_MOUSE); ++ litest_disable_tap(touchpad->libinput_device); ++ libinput_device_config_send_events_set_mode(touchpad->libinput_device, ++ LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE); ++ litest_drain_events(li); ++ ++ litest_touch_down(touchpad, 0, 50, 50); ++ litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); ++ litest_touch_up(touchpad, 0); ++ litest_assert_empty_queue(li); ++ ++ /* switch is on - no events */ ++ litest_lid_action(sw, LIBINPUT_SWITCH_STATE_ON); ++ litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); ++ ++ litest_touch_down(touchpad, 0, 50, 50); ++ litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); ++ litest_touch_up(touchpad, 0); ++ litest_assert_empty_queue(li); ++ ++ /* switch is off - motion events */ ++ litest_lid_action(sw, LIBINPUT_SWITCH_STATE_OFF); ++ litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); ++ ++ litest_touch_down(touchpad, 0, 50, 50); ++ litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); ++ litest_touch_up(touchpad, 0); ++ litest_assert_empty_queue(li); ++ ++ litest_delete_device(touchpad); ++ litest_delete_device(mouse); ++} ++END_TEST ++ + START_TEST(lid_open_on_key) + { + struct litest_device *sw = litest_current_device(); +@@ -568,6 +643,9 @@ litest_setup_tests_lid(void) + litest_add("lid:disable_touchpad", lid_disable_touchpad_edge_scroll_interrupt, LITEST_SWITCH, LITEST_ANY); + litest_add("lid:disable_touchpad", lid_disable_touchpad_already_open, LITEST_SWITCH, LITEST_ANY); + ++ litest_add("switch:touchpad", lid_dont_resume_disabled_touchpad, LITEST_SWITCH, LITEST_ANY); ++ litest_add("switch:touchpad", lid_dont_resume_disabled_touchpad_external_mouse, LITEST_SWITCH, LITEST_ANY); ++ + litest_add("lid:keyboard", lid_open_on_key, LITEST_SWITCH, LITEST_ANY); + litest_add("lid:keyboard", lid_open_on_key_touchpad_enabled, LITEST_SWITCH, LITEST_ANY); + +-- +2.13.5 + diff --git a/libinput.spec b/libinput.spec index 82a7f77..b95ffd6 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.8.1 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,9 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-gestures-don-t-try-to-pinch-for-nfingers-slots.patch +Patch02: 0001-touchpad-don-t-resume-a-disabled-touchpad.patch + BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -103,6 +106,10 @@ git am -p1 %{patches} < /dev/null %changelog +* Tue Sep 05 2017 Peter Hutterer 1.8.1-4 +- Don't try pinching when the finger number exceeds available slots +- Don't resume a disabled touchpad after a lid switch open (#1448962) + * Thu Aug 03 2017 Fedora Release Engineering - 1.8.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From cdbbf32d3a4ec176262e1f9309a6c646b08deb27 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 7 Sep 2017 17:21:10 +1000 Subject: [PATCH 133/317] libinput 1.8.2 --- .gitignore | 1 + ...on-t-try-to-pinch-for-nfingers-slots.patch | 282 ------------------ libinput.spec | 8 +- sources | 2 +- 4 files changed, 7 insertions(+), 286 deletions(-) delete mode 100644 0001-gestures-don-t-try-to-pinch-for-nfingers-slots.patch diff --git a/.gitignore b/.gitignore index fd38a3d..64164f2 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /libinput-1.7.902.tar.xz /libinput-1.8.0.tar.xz /libinput-1.8.1.tar.xz +/libinput-1.8.2.tar.xz diff --git a/0001-gestures-don-t-try-to-pinch-for-nfingers-slots.patch b/0001-gestures-don-t-try-to-pinch-for-nfingers-slots.patch deleted file mode 100644 index 2a589dc..0000000 --- a/0001-gestures-don-t-try-to-pinch-for-nfingers-slots.patch +++ /dev/null @@ -1,282 +0,0 @@ -From a7e79ed5a69556c71bb9dd2f0047e4833affa929 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Sat, 29 Jul 2017 13:59:40 +0100 -Subject: [PATCH libinput] gestures: don't try to pinch for nfingers > slots - -We don't know the position of the third finger on 2-slot touchpads, differing -between swipe and pinch is reliable. Simply disable 3-finger pinch and always -use swipe; 3fg pinch is uncommon anyway and it's better to have one of the -gestures working reliably than both unreliably. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede ---- - src/evdev-mt-touchpad-gestures.c | 7 +- - test/test-gestures.c | 211 --------------------------------------- - 2 files changed, 6 insertions(+), 212 deletions(-) - -diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c -index a20b26d4..26bdef5a 100644 ---- a/src/evdev-mt-touchpad-gestures.c -+++ b/src/evdev-mt-touchpad-gestures.c -@@ -334,6 +334,10 @@ tp_gesture_handle_state_unknown(struct tp_dispatch *tp, uint64_t time) - if (tp->gesture.finger_count == 2) { - tp_gesture_set_scroll_buildup(tp); - return GESTURE_STATE_SCROLL; -+ /* more fingers than slots, don't bother with pinch, always -+ * assume swipe */ -+ } else if (tp->gesture.finger_count > tp->num_slots) { -+ return GESTURE_STATE_SWIPE; - } - - /* for 3+ finger gestures, check if one finger is > 20mm -@@ -356,7 +360,8 @@ tp_gesture_handle_state_unknown(struct tp_dispatch *tp, uint64_t time) - - /* If both touches are moving in the same direction assume - * scroll or swipe */ -- if (tp_gesture_same_directions(dir1, dir2)) { -+ if (tp->gesture.finger_count > tp->num_slots || -+ tp_gesture_same_directions(dir1, dir2)) { - if (tp->gesture.finger_count == 2) { - tp_gesture_set_scroll_buildup(tp); - return GESTURE_STATE_SCROLL; -diff --git a/test/test-gestures.c b/test/test-gestures.c -index ce1012d4..e95d1a01 100644 ---- a/test/test-gestures.c -+++ b/test/test-gestures.c -@@ -754,110 +754,6 @@ START_TEST(gestures_pinch_3fg) - } - END_TEST - --START_TEST(gestures_pinch_3fg_btntool) --{ -- struct litest_device *dev = litest_current_device(); -- struct libinput *li = dev->libinput; -- struct libinput_event *event; -- struct libinput_event_gesture *gevent; -- double dx, dy; -- int cardinal = _i; /* ranged test */ -- double dir_x, dir_y; -- int i; -- double scale, oldscale; -- double angle; -- int cardinals[8][2] = { -- { 0, 30 }, -- { 30, 30 }, -- { 30, 0 }, -- { 30, -30 }, -- { 0, -30 }, -- { -30, -30 }, -- { -30, 0 }, -- { -30, 30 }, -- }; -- -- if (libevdev_get_num_slots(dev->evdev) > 2 || -- !libinput_device_has_capability(dev->libinput_device, -- LIBINPUT_DEVICE_CAP_GESTURE)) -- return; -- -- dir_x = cardinals[cardinal][0]; -- dir_y = cardinals[cardinal][1]; -- -- litest_drain_events(li); -- -- litest_touch_down(dev, 0, 50 + dir_x, 50 + dir_y); -- litest_touch_down(dev, 1, 50 - dir_x, 50 - dir_y); -- litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 0); -- litest_event(dev, EV_KEY, BTN_TOOL_TRIPLETAP, 1); -- litest_event(dev, EV_SYN, SYN_REPORT, 0); -- libinput_dispatch(li); -- -- for (i = 0; i < 8; i++) { -- litest_push_event_frame(dev); -- if (dir_x > 0.0) -- dir_x -= 2; -- else if (dir_x < 0.0) -- dir_x += 2; -- if (dir_y > 0.0) -- dir_y -= 2; -- else if (dir_y < 0.0) -- dir_y += 2; -- litest_touch_move(dev, -- 0, -- 50 + dir_x, -- 50 + dir_y); -- litest_touch_move(dev, -- 1, -- 50 - dir_x, -- 50 - dir_y); -- litest_pop_event_frame(dev); -- libinput_dispatch(li); -- } -- -- event = libinput_get_event(li); -- gevent = litest_is_gesture_event(event, -- LIBINPUT_EVENT_GESTURE_PINCH_BEGIN, -- 3); -- dx = libinput_event_gesture_get_dx(gevent); -- dy = libinput_event_gesture_get_dy(gevent); -- scale = libinput_event_gesture_get_scale(gevent); -- ck_assert(dx == 0.0); -- ck_assert(dy == 0.0); -- ck_assert(scale == 1.0); -- -- libinput_event_destroy(event); -- -- while ((event = libinput_get_event(li)) != NULL) { -- gevent = litest_is_gesture_event(event, -- LIBINPUT_EVENT_GESTURE_PINCH_UPDATE, -- 3); -- -- oldscale = scale; -- scale = libinput_event_gesture_get_scale(gevent); -- -- ck_assert(scale < oldscale); -- -- angle = libinput_event_gesture_get_angle_delta(gevent); -- ck_assert_double_le(fabs(angle), 1.0); -- -- libinput_event_destroy(event); -- libinput_dispatch(li); -- } -- -- litest_touch_up(dev, 0); -- litest_touch_up(dev, 1); -- libinput_dispatch(li); -- event = libinput_get_event(li); -- gevent = litest_is_gesture_event(event, -- LIBINPUT_EVENT_GESTURE_PINCH_END, -- 3); -- ck_assert(!libinput_event_gesture_get_cancelled(gevent)); -- libinput_event_destroy(event); --} --END_TEST -- - START_TEST(gestures_pinch_4fg) - { - struct litest_device *dev = litest_current_device(); -@@ -969,111 +865,6 @@ START_TEST(gestures_pinch_4fg) - } - END_TEST - --START_TEST(gestures_pinch_4fg_btntool) --{ -- struct litest_device *dev = litest_current_device(); -- struct libinput *li = dev->libinput; -- struct libinput_event *event; -- struct libinput_event_gesture *gevent; -- double dx, dy; -- int cardinal = _i; /* ranged test */ -- double dir_x, dir_y; -- int i; -- double scale, oldscale; -- double angle; -- int cardinals[8][2] = { -- { 0, 30 }, -- { 30, 30 }, -- { 30, 0 }, -- { 30, -30 }, -- { 0, -30 }, -- { -30, -30 }, -- { -30, 0 }, -- { -30, 30 }, -- }; -- -- if (libevdev_get_num_slots(dev->evdev) > 2 || -- !libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_QUADTAP) || -- !libinput_device_has_capability(dev->libinput_device, -- LIBINPUT_DEVICE_CAP_GESTURE)) -- return; -- -- dir_x = cardinals[cardinal][0]; -- dir_y = cardinals[cardinal][1]; -- -- litest_drain_events(li); -- -- litest_touch_down(dev, 0, 50 + dir_x, 50 + dir_y); -- litest_touch_down(dev, 1, 50 - dir_x, 50 - dir_y); -- litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 0); -- litest_event(dev, EV_KEY, BTN_TOOL_QUADTAP, 1); -- litest_event(dev, EV_SYN, SYN_REPORT, 0); -- libinput_dispatch(li); -- -- for (i = 0; i < 8; i++) { -- litest_push_event_frame(dev); -- if (dir_x > 0.0) -- dir_x -= 3; -- else if (dir_x < 0.0) -- dir_x += 3; -- if (dir_y > 0.0) -- dir_y -= 3; -- else if (dir_y < 0.0) -- dir_y += 3; -- litest_touch_move(dev, -- 0, -- 50 + dir_x, -- 50 + dir_y); -- litest_touch_move(dev, -- 1, -- 50 - dir_x, -- 50 - dir_y); -- litest_pop_event_frame(dev); -- libinput_dispatch(li); -- } -- -- event = libinput_get_event(li); -- gevent = litest_is_gesture_event(event, -- LIBINPUT_EVENT_GESTURE_PINCH_BEGIN, -- 4); -- dx = libinput_event_gesture_get_dx(gevent); -- dy = libinput_event_gesture_get_dy(gevent); -- scale = libinput_event_gesture_get_scale(gevent); -- ck_assert(dx == 0.0); -- ck_assert(dy == 0.0); -- ck_assert(scale == 1.0); -- -- libinput_event_destroy(event); -- -- while ((event = libinput_get_event(li)) != NULL) { -- gevent = litest_is_gesture_event(event, -- LIBINPUT_EVENT_GESTURE_PINCH_UPDATE, -- 4); -- -- oldscale = scale; -- scale = libinput_event_gesture_get_scale(gevent); -- -- ck_assert(scale < oldscale); -- -- angle = libinput_event_gesture_get_angle_delta(gevent); -- ck_assert_double_le(fabs(angle), 1.5); -- -- libinput_event_destroy(event); -- libinput_dispatch(li); -- } -- -- litest_touch_up(dev, 0); -- litest_touch_up(dev, 1); -- libinput_dispatch(li); -- event = libinput_get_event(li); -- gevent = litest_is_gesture_event(event, -- LIBINPUT_EVENT_GESTURE_PINCH_END, -- 4); -- ck_assert(!libinput_event_gesture_get_cancelled(gevent)); -- libinput_event_destroy(event); --} --END_TEST -- - START_TEST(gestures_spread) - { - struct litest_device *dev = litest_current_device(); -@@ -1282,9 +1073,7 @@ litest_setup_tests_gestures(void) - litest_add_ranged("gestures:swipe", gestures_swipe_4fg_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals); - litest_add_ranged("gestures:pinch", gestures_pinch, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals); - litest_add_ranged("gestures:pinch", gestures_pinch_3fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals); -- litest_add_ranged("gestures:pinch", gestures_pinch_3fg_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals); - litest_add_ranged("gestures:pinch", gestures_pinch_4fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals); -- litest_add_ranged("gestures:pinch", gestures_pinch_4fg_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals); - litest_add_ranged("gestures:pinch", gestures_spread, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals); - litest_add_ranged("gestures:pinch", gestures_pinch_vertical_positon, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &fingers); - --- -2.13.5 - diff --git a/libinput.spec b/libinput.spec index b95ffd6..77bc2d4 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.8.1 -Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.8.2 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,7 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-gestures-don-t-try-to-pinch-for-nfingers-slots.patch Patch02: 0001-touchpad-don-t-resume-a-disabled-touchpad.patch BuildRequires: git-core @@ -106,6 +105,9 @@ git am -p1 %{patches} < /dev/null %changelog +* Thu Sep 07 2017 Peter Hutterer 1.8.2-1 +- libinput 1.8.2 + * Tue Sep 05 2017 Peter Hutterer 1.8.1-4 - Don't try pinching when the finger number exceeds available slots - Don't resume a disabled touchpad after a lid switch open (#1448962) diff --git a/sources b/sources index 88813dd..4848c70 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.8.1.tar.xz) = 1566ccb7d1721ee2d16badc404896d31e3ac45fda71e2577db17141a507594f3827ed0a389bb537f946cb380d77feedef8e71df76ac89f8c11c44463df01ee4f +SHA512 (libinput-1.8.2.tar.xz) = 555a7680cc8aaf62c5370a865f3aff0a933d42d94a3d8861c072666b02c9e1be45ea39de9a749a9575cdfb613b6150e412e18559d94d4919f21ca4680a3c76a7 From 01d21ba8fd30a37396e10ac1ec61cd259b03ae4f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 28 Sep 2017 15:18:18 +1000 Subject: [PATCH 134/317] libinput 1.9rc1 --- .gitignore | 1 + ...pad-don-t-resume-a-disabled-touchpad.patch | 186 ------------------ libinput.spec | 13 +- sources | 2 +- 4 files changed, 12 insertions(+), 190 deletions(-) delete mode 100644 0001-touchpad-don-t-resume-a-disabled-touchpad.patch diff --git a/.gitignore b/.gitignore index 64164f2..3e64959 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /libinput-1.8.0.tar.xz /libinput-1.8.1.tar.xz /libinput-1.8.2.tar.xz +/libinput-1.8.901.tar.xz diff --git a/0001-touchpad-don-t-resume-a-disabled-touchpad.patch b/0001-touchpad-don-t-resume-a-disabled-touchpad.patch deleted file mode 100644 index 8158120..0000000 --- a/0001-touchpad-don-t-resume-a-disabled-touchpad.patch +++ /dev/null @@ -1,186 +0,0 @@ -From 03f13ce6e854b3ff5d4b8971405a97afd66eef8e Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 5 Sep 2017 14:38:53 +1000 -Subject: [PATCH libinput] touchpad: don't resume a disabled touchpad - -Signed-off-by: Peter Hutterer ---- - src/evdev-mt-touchpad.c | 44 ++++++++++++++++++---------- - test/test-lid.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 107 insertions(+), 15 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 5b8fb1ec..c0a78255 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -1426,6 +1426,31 @@ tp_resume(struct tp_dispatch *tp, struct evdev_device *device) - } - } - -+#define NO_EXCLUDED_DEVICE NULL -+static void -+tp_resume_conditional(struct tp_dispatch *tp, -+ struct evdev_device *device, -+ struct evdev_device *excluded_device) -+{ -+ if (tp->sendevents.current_mode == LIBINPUT_CONFIG_SEND_EVENTS_DISABLED) -+ return; -+ -+ if (tp->sendevents.current_mode == -+ LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE) { -+ struct libinput_device *dev; -+ -+ list_for_each(dev, &device->base.seat->devices_list, link) { -+ struct evdev_device *d = evdev_device(dev); -+ if (d != excluded_device && -+ (d->tags & EVDEV_TAG_EXTERNAL_MOUSE)) { -+ return; -+ } -+ } -+ } -+ -+ tp_resume(tp, device); -+} -+ - static void - tp_trackpoint_timeout(uint64_t now, void *data) - { -@@ -1667,7 +1692,7 @@ tp_lid_switch_event(uint64_t time, struct libinput_event *event, void *data) - swev = libinput_event_get_switch_event(event); - switch (libinput_event_switch_get_switch_state(swev)) { - case LIBINPUT_SWITCH_STATE_OFF: -- tp_resume(tp, tp->device); -+ tp_resume_conditional(tp, tp->device, NO_EXCLUDED_DEVICE); - evdev_log_debug(tp->device, "lid: resume touchpad\n"); - break; - case LIBINPUT_SWITCH_STATE_ON: -@@ -1722,7 +1747,6 @@ tp_interface_device_removed(struct evdev_device *device, - struct evdev_device *removed_device) - { - struct tp_dispatch *tp = (struct tp_dispatch*)device->dispatch; -- struct libinput_device *dev; - - if (removed_device == tp->buttons.trackpoint) { - /* Clear any pending releases for the trackpoint */ -@@ -1749,19 +1773,9 @@ tp_interface_device_removed(struct evdev_device *device, - tp->lid_switch.lid_switch = NULL; - } - -- if (tp->sendevents.current_mode != -- LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE) -- return; -- -- list_for_each(dev, &device->base.seat->devices_list, link) { -- struct evdev_device *d = evdev_device(dev); -- if (d != removed_device && -- (d->tags & EVDEV_TAG_EXTERNAL_MOUSE)) { -- return; -- } -- } -- -- tp_resume(tp, device); -+ /* removed_device is still in the device list at this point, so we -+ * need to exclude it from the tp_resume_conditional */ -+ tp_resume_conditional(tp, device, removed_device); - } - - static inline void -diff --git a/test/test-lid.c b/test/test-lid.c -index 4bf4c059..7e42f53d 100644 ---- a/test/test-lid.c -+++ b/test/test-lid.c -@@ -342,6 +342,81 @@ START_TEST(lid_disable_touchpad_already_open) - } - END_TEST - -+START_TEST(lid_dont_resume_disabled_touchpad) -+{ -+ struct litest_device *sw = litest_current_device(); -+ struct litest_device *touchpad; -+ struct libinput *li = sw->libinput; -+ -+ touchpad = lid_init_paired_touchpad(li); -+ litest_disable_tap(touchpad->libinput_device); -+ libinput_device_config_send_events_set_mode(touchpad->libinput_device, -+ LIBINPUT_CONFIG_SEND_EVENTS_DISABLED); -+ litest_drain_events(li); -+ -+ /* switch is on - no events */ -+ litest_lid_action(sw, LIBINPUT_SWITCH_STATE_ON); -+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); -+ -+ litest_touch_down(touchpad, 0, 50, 50); -+ litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); -+ litest_touch_up(touchpad, 0); -+ litest_assert_empty_queue(li); -+ -+ /* switch is off - motion events */ -+ litest_lid_action(sw, LIBINPUT_SWITCH_STATE_OFF); -+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); -+ -+ litest_touch_down(touchpad, 0, 50, 50); -+ litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); -+ litest_touch_up(touchpad, 0); -+ litest_assert_empty_queue(li); -+ -+ litest_delete_device(touchpad); -+} -+END_TEST -+ -+START_TEST(lid_dont_resume_disabled_touchpad_external_mouse) -+{ -+ struct litest_device *sw = litest_current_device(); -+ struct litest_device *touchpad, *mouse; -+ struct libinput *li = sw->libinput; -+ -+ touchpad = lid_init_paired_touchpad(li); -+ mouse = litest_add_device(li, LITEST_MOUSE); -+ litest_disable_tap(touchpad->libinput_device); -+ libinput_device_config_send_events_set_mode(touchpad->libinput_device, -+ LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE); -+ litest_drain_events(li); -+ -+ litest_touch_down(touchpad, 0, 50, 50); -+ litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); -+ litest_touch_up(touchpad, 0); -+ litest_assert_empty_queue(li); -+ -+ /* switch is on - no events */ -+ litest_lid_action(sw, LIBINPUT_SWITCH_STATE_ON); -+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); -+ -+ litest_touch_down(touchpad, 0, 50, 50); -+ litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); -+ litest_touch_up(touchpad, 0); -+ litest_assert_empty_queue(li); -+ -+ /* switch is off - motion events */ -+ litest_lid_action(sw, LIBINPUT_SWITCH_STATE_OFF); -+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); -+ -+ litest_touch_down(touchpad, 0, 50, 50); -+ litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); -+ litest_touch_up(touchpad, 0); -+ litest_assert_empty_queue(li); -+ -+ litest_delete_device(touchpad); -+ litest_delete_device(mouse); -+} -+END_TEST -+ - START_TEST(lid_open_on_key) - { - struct litest_device *sw = litest_current_device(); -@@ -568,6 +643,9 @@ litest_setup_tests_lid(void) - litest_add("lid:disable_touchpad", lid_disable_touchpad_edge_scroll_interrupt, LITEST_SWITCH, LITEST_ANY); - litest_add("lid:disable_touchpad", lid_disable_touchpad_already_open, LITEST_SWITCH, LITEST_ANY); - -+ litest_add("switch:touchpad", lid_dont_resume_disabled_touchpad, LITEST_SWITCH, LITEST_ANY); -+ litest_add("switch:touchpad", lid_dont_resume_disabled_touchpad_external_mouse, LITEST_SWITCH, LITEST_ANY); -+ - litest_add("lid:keyboard", lid_open_on_key, LITEST_SWITCH, LITEST_ANY); - litest_add("lid:keyboard", lid_open_on_key_touchpad_enabled, LITEST_SWITCH, LITEST_ANY); - --- -2.13.5 - diff --git a/libinput.spec b/libinput.spec index 77bc2d4..780bc49 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.8.2 +Version: 1.8.901 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -18,8 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch02: 0001-touchpad-don-t-resume-a-disabled-touchpad.patch - BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -90,9 +88,15 @@ git am -p1 %{patches} < /dev/null %{_libexecdir}/libinput/libinput-list-devices %{_libexecdir}/libinput/libinput-measure %{_libexecdir}/libinput/libinput-measure-touchpad-tap +%{_libexecdir}/libinput/libinput-measure-touch-size +%{_libexecdir}/libinput/libinput-measure-touchpad-pressure +%{_libexecdir}/libinput/libinput-measure-trackpoint-range %{_mandir}/man1/libinput.1* %{_mandir}/man1/libinput-measure.1* %{_mandir}/man1/libinput-measure-touchpad-tap.1* +%{_mandir}/man1/libinput-measure-touch-size.1.gz +%{_mandir}/man1/libinput-measure-touchpad-pressure.1.gz +%{_mandir}/man1/libinput-measure-trackpoint-range.1.gz %{_mandir}/man1/libinput-list-devices.1* %{_mandir}/man1/libinput-debug-events.1* %{_bindir}/libinput-list-devices @@ -105,6 +109,9 @@ git am -p1 %{patches} < /dev/null %changelog +* Thu Sep 28 2017 Peter Hutterer 1.8.901-1 +- libinput 1.9rc1 + * Thu Sep 07 2017 Peter Hutterer 1.8.2-1 - libinput 1.8.2 diff --git a/sources b/sources index 4848c70..9cb6ae8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.8.2.tar.xz) = 555a7680cc8aaf62c5370a865f3aff0a933d42d94a3d8861c072666b02c9e1be45ea39de9a749a9575cdfb613b6150e412e18559d94d4919f21ca4680a3c76a7 +SHA512 (libinput-1.8.901.tar.xz) = cae85d300af1dc898847c67b4f10a1871c9c752645cae8cfbd04d8430ebad1aceba1f0102628ff8a005044df56201dbfaa946d8672a4f02bd84dbe8cdddaec7c From efb5637f8560138460f9df77a7eaed2f0836d514 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 10 Oct 2017 17:48:43 +1000 Subject: [PATCH 135/317] libinput 1.9rc2 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3e64959..57b8890 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /libinput-1.8.1.tar.xz /libinput-1.8.2.tar.xz /libinput-1.8.901.tar.xz +/libinput-1.8.902.tar.xz diff --git a/libinput.spec b/libinput.spec index 780bc49..bcd0dd0 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.8.901 +Version: 1.8.902 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -109,6 +109,9 @@ git am -p1 %{patches} < /dev/null %changelog +* Tue Oct 10 2017 Peter Hutterer 1.8.902-1 +- libinput 1.9rc2 + * Thu Sep 28 2017 Peter Hutterer 1.8.901-1 - libinput 1.9rc1 diff --git a/sources b/sources index 9cb6ae8..b7cb8c9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.8.901.tar.xz) = cae85d300af1dc898847c67b4f10a1871c9c752645cae8cfbd04d8430ebad1aceba1f0102628ff8a005044df56201dbfaa946d8672a4f02bd84dbe8cdddaec7c +SHA512 (libinput-1.8.902.tar.xz) = 4a0c0f5f141f728f06f624083138763c25e98aef665e5f5c0cfb31b3d227327459e007a5ed7038cdc33328ddb32b988b73aaf9ead4060ab46a0d890ad4444081 From 0d90a83365f3ef51e9b7aeb5a414568b5da7f472 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 19 Oct 2017 14:03:23 +1000 Subject: [PATCH 136/317] libinput 1.9.0 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 57b8890..9438fcd 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /libinput-1.8.2.tar.xz /libinput-1.8.901.tar.xz /libinput-1.8.902.tar.xz +/libinput-1.9.0.tar.xz diff --git a/libinput.spec b/libinput.spec index bcd0dd0..18d586d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.8.902 +Version: 1.9.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -109,6 +109,9 @@ git am -p1 %{patches} < /dev/null %changelog +* Thu Oct 19 2017 Peter Hutterer 1.9.0-1 +- libinput 1.9.0 + * Tue Oct 10 2017 Peter Hutterer 1.8.902-1 - libinput 1.9rc2 diff --git a/sources b/sources index b7cb8c9..c21a5b7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.8.902.tar.xz) = 4a0c0f5f141f728f06f624083138763c25e98aef665e5f5c0cfb31b3d227327459e007a5ed7038cdc33328ddb32b988b73aaf9ead4060ab46a0d890ad4444081 +SHA512 (libinput-1.9.0.tar.xz) = 4111dd02ef7778c246da28ead284a77014f6eaa4b7f90f36ee124af809e31c70ac065216ef5648d1d2dc525355176e2aa22788bfbb19f5f6d25276fbba42e150 From 4f0ce18b85486326abbead74dd95379947856c85 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 26 Oct 2017 14:35:54 +1000 Subject: [PATCH 137/317] Drop explicit .gz from the man pages --- libinput.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libinput.spec b/libinput.spec index 18d586d..457c779 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.9.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -94,9 +94,9 @@ git am -p1 %{patches} < /dev/null %{_mandir}/man1/libinput.1* %{_mandir}/man1/libinput-measure.1* %{_mandir}/man1/libinput-measure-touchpad-tap.1* -%{_mandir}/man1/libinput-measure-touch-size.1.gz -%{_mandir}/man1/libinput-measure-touchpad-pressure.1.gz -%{_mandir}/man1/libinput-measure-trackpoint-range.1.gz +%{_mandir}/man1/libinput-measure-touch-size.1* +%{_mandir}/man1/libinput-measure-touchpad-pressure.1* +%{_mandir}/man1/libinput-measure-trackpoint-range.1* %{_mandir}/man1/libinput-list-devices.1* %{_mandir}/man1/libinput-debug-events.1* %{_bindir}/libinput-list-devices @@ -109,6 +109,9 @@ git am -p1 %{patches} < /dev/null %changelog +* Thu Oct 26 2017 Peter Hutterer 1.9.0-2 +- Drop explicit .gz from the man pages + * Thu Oct 19 2017 Peter Hutterer 1.9.0-1 - libinput 1.9.0 From 16249394c50d2d18d0675b39df96b321af17e7b5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 30 Oct 2017 15:30:52 +1000 Subject: [PATCH 138/317] libinput 1.9.1 --- .gitignore | 1 + libinput.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9438fcd..3b62b06 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /libinput-1.8.901.tar.xz /libinput-1.8.902.tar.xz /libinput-1.9.0.tar.xz +/libinput-1.9.1.tar.xz diff --git a/libinput.spec b/libinput.spec index 457c779..70afae8 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.9.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.9.1 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -109,6 +109,9 @@ git am -p1 %{patches} < /dev/null %changelog +* Mon Oct 30 2017 Peter Hutterer 1.9.1-1 +- libinput 1.9.1 + * Thu Oct 26 2017 Peter Hutterer 1.9.0-2 - Drop explicit .gz from the man pages diff --git a/sources b/sources index c21a5b7..ad21d54 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.9.0.tar.xz) = 4111dd02ef7778c246da28ead284a77014f6eaa4b7f90f36ee124af809e31c70ac065216ef5648d1d2dc525355176e2aa22788bfbb19f5f6d25276fbba42e150 +SHA512 (libinput-1.9.1.tar.xz) = e60c401cdec6b862c6c7186e636bba285e229b82998d9f86940659806bb64c295ec1060b5e8065345668e4b3ff95457bd01327351520d9f6cf8cbc98b9b95da0 From 9a7d455eba72aa8b97ed10c64ed55bce8cd2b447 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 9 Nov 2017 15:00:48 +1000 Subject: [PATCH 139/317] Split some of the tools into a libinput-utils package so we can require the various bits easier (#1509298) --- ...e-command-isn-t-installed-print-that.patch | 46 +++++++++++++++++++ libinput.spec | 38 ++++++++++----- 2 files changed, 73 insertions(+), 11 deletions(-) create mode 100644 0001-tools-when-the-command-isn-t-installed-print-that.patch diff --git a/0001-tools-when-the-command-isn-t-installed-print-that.patch b/0001-tools-when-the-command-isn-t-installed-print-that.patch new file mode 100644 index 0000000..03a7182 --- /dev/null +++ b/0001-tools-when-the-command-isn-t-installed-print-that.patch @@ -0,0 +1,46 @@ +From 92aa1d14183bd88a8080be96672682a2e5696477 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 9 Nov 2017 15:17:37 +1000 +Subject: [PATCH libinput] tools: when the command isn't installed, print that + +Makes it more user-friendly to be able to split the tools into multiple +packages + +Signed-off-by: Peter Hutterer +--- + tools/shared.c | 19 ++++++++++++++----- + 1 file changed, 14 insertions(+), 5 deletions(-) + +diff --git a/tools/shared.c b/tools/shared.c +index ae3287ba..962159e1 100644 +--- a/tools/shared.c ++++ b/tools/shared.c +@@ -510,11 +510,20 @@ tools_exec_command(const char *prefix, int real_argc, char **real_argv) + setup_path(); + + rc = execvp(executable, argv); +- if (rc) +- fprintf(stderr, +- "Failed to execute '%s' (%s)\n", +- command, +- strerror(errno)); ++ if (rc) { ++ if (errno == ENOENT) { ++ fprintf(stderr, ++ "libinput: %s is not a libinput command or not installed. " ++ "See 'libinput --help'\n", ++ command); ++ ++ } else { ++ fprintf(stderr, ++ "Failed to execute '%s' (%s)\n", ++ command, ++ strerror(errno)); ++ } ++ } + + return EXIT_FAILURE; + } +-- +2.13.6 + diff --git a/libinput.spec b/libinput.spec index 70afae8..a147603 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.9.1 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-tools-when-the-command-isn-t-installed-print-that.patch + BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -43,6 +45,14 @@ Requires: %{name}%{?_isa} = %{version}-%{release} The %{name}-devel package contains libraries and header files for developing applications that use %{name}. +%package utils +Summary: Utilities and tools for debugging %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: python3-evdev python3-pyudev + +%description utils +The %{name}-utils package contains tools to debug hardware and analyze +%{name}. %prep %setup -q -n %{name}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} @@ -86,17 +96,8 @@ git am -p1 %{patches} < /dev/null %dir %{_libexecdir}/libinput/ %{_libexecdir}/libinput/libinput-debug-events %{_libexecdir}/libinput/libinput-list-devices -%{_libexecdir}/libinput/libinput-measure -%{_libexecdir}/libinput/libinput-measure-touchpad-tap -%{_libexecdir}/libinput/libinput-measure-touch-size -%{_libexecdir}/libinput/libinput-measure-touchpad-pressure -%{_libexecdir}/libinput/libinput-measure-trackpoint-range %{_mandir}/man1/libinput.1* -%{_mandir}/man1/libinput-measure.1* -%{_mandir}/man1/libinput-measure-touchpad-tap.1* -%{_mandir}/man1/libinput-measure-touch-size.1* -%{_mandir}/man1/libinput-measure-touchpad-pressure.1* -%{_mandir}/man1/libinput-measure-trackpoint-range.1* + %{_mandir}/man1/libinput-list-devices.1* %{_mandir}/man1/libinput-debug-events.1* %{_bindir}/libinput-list-devices @@ -107,8 +108,23 @@ git am -p1 %{patches} < /dev/null %{_libdir}/libinput.so %{_libdir}/pkgconfig/libinput.pc +%files utils +%{_libexecdir}/libinput/libinput-measure +%{_libexecdir}/libinput/libinput-measure-touchpad-tap +%{_libexecdir}/libinput/libinput-measure-touchpad-pressure +%{_libexecdir}/libinput/libinput-measure-touch-size +%{_libexecdir}/libinput/libinput-measure-trackpoint-range +%{_mandir}/man1/libinput-measure.1* +%{_mandir}/man1/libinput-measure-touchpad-tap.1* +%{_mandir}/man1/libinput-measure-touch-size.1* +%{_mandir}/man1/libinput-measure-touchpad-pressure.1* +%{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Thu Nov 09 2017 Peter Hutterer 1.9.1-2 +- Split some of the tools into a libinput-utils package so we can require + the various bits easier (#1509298) + * Mon Oct 30 2017 Peter Hutterer 1.9.1-1 - libinput 1.9.1 From 20471d9763f13b477e3b98eb1ef99fea8abd8110 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 14 Nov 2017 18:21:49 +1000 Subject: [PATCH 140/317] Handle printing of tablet mode switches (#1510814) --- ...s-Handle-LIBINPUT_SWITCH_TABLET_MODE.patch | 31 +++++++++++++++++++ libinput.spec | 6 +++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0001-tools-Handle-LIBINPUT_SWITCH_TABLET_MODE.patch diff --git a/0001-tools-Handle-LIBINPUT_SWITCH_TABLET_MODE.patch b/0001-tools-Handle-LIBINPUT_SWITCH_TABLET_MODE.patch new file mode 100644 index 0000000..9145d31 --- /dev/null +++ b/0001-tools-Handle-LIBINPUT_SWITCH_TABLET_MODE.patch @@ -0,0 +1,31 @@ +From 48fd22def7ae1a8d67d1f6f2e0d6e6f98c7a9361 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Fri, 3 Nov 2017 23:01:23 +0100 +Subject: [PATCH libinput] tools: Handle LIBINPUT_SWITCH_TABLET_MODE +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Stefan Brüns +Signed-off-by: Peter Hutterer +--- + tools/libinput-debug-events.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tools/libinput-debug-events.c b/tools/libinput-debug-events.c +index 87b7b803..fb8d84d8 100644 +--- a/tools/libinput-debug-events.c ++++ b/tools/libinput-debug-events.c +@@ -747,6 +747,9 @@ print_switch_event(struct libinput_event *ev) + case LIBINPUT_SWITCH_LID: + which = "lid"; + break; ++ case LIBINPUT_SWITCH_TABLET_MODE: ++ which = "tablet-mode"; ++ break; + default: + abort(); + } +-- +2.13.6 + diff --git a/libinput.spec b/libinput.spec index a147603..8869450 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.9.1 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -19,6 +19,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} %endif Patch01: 0001-tools-when-the-command-isn-t-installed-print-that.patch +Patch02: 0001-tools-Handle-LIBINPUT_SWITCH_TABLET_MODE.patch BuildRequires: git-core BuildRequires: gcc @@ -121,6 +122,9 @@ git am -p1 %{patches} < /dev/null %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Tue Nov 14 2017 Peter Hutterer 1.9.1-3 +- Handle printing of tablet mode switches (#1510814) + * Thu Nov 09 2017 Peter Hutterer 1.9.1-2 - Split some of the tools into a libinput-utils package so we can require the various bits easier (#1509298) From 0bb4f2fd9a613ce5977323b0aa9528e4c1105312 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 15 Nov 2017 09:53:52 +1000 Subject: [PATCH 141/317] Mark the Lenovo Compact Keyboard as external (#1510814) --- ...tion-flag-for-the-Lenovo-Compact-Key.patch | 31 +++++++++++++++++++ libinput.spec | 6 +++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0001-udev-add-integration-flag-for-the-Lenovo-Compact-Key.patch diff --git a/0001-udev-add-integration-flag-for-the-Lenovo-Compact-Key.patch b/0001-udev-add-integration-flag-for-the-Lenovo-Compact-Key.patch new file mode 100644 index 0000000..09b19bc --- /dev/null +++ b/0001-udev-add-integration-flag-for-the-Lenovo-Compact-Key.patch @@ -0,0 +1,31 @@ +From c06660b314f5d9b284088d30770c1c40006d9ab0 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 14 Nov 2017 15:53:12 +1000 +Subject: [PATCH libinput] udev: add integration flag for the Lenovo Compact + Keyboard with TrackPoint + +From https://bugzilla.redhat.com/show_bug.cgi?id=1510814 + +Signed-off-by: Peter Hutterer +--- + udev/90-libinput-model-quirks.hwdb | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index 820cb8db..c23ef833 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -204,6 +204,10 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd + LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1 + LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD=150 + ++# Lenovo ThinkPad Compact USB Keyboard with TrackPoint ++libinput:keyboard:input:b0003v17EFp6047* ++ LIBINPUT_ATTR_KEYBOARD_INTEGRATION=external ++ + ########################################## + # Logitech + ########################################## +-- +2.13.6 + diff --git a/libinput.spec b/libinput.spec index 8869450..bbd8d62 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.9.1 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -20,6 +20,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} Patch01: 0001-tools-when-the-command-isn-t-installed-print-that.patch Patch02: 0001-tools-Handle-LIBINPUT_SWITCH_TABLET_MODE.patch +Patch03: 0001-udev-add-integration-flag-for-the-Lenovo-Compact-Key.patch BuildRequires: git-core BuildRequires: gcc @@ -122,6 +123,9 @@ git am -p1 %{patches} < /dev/null %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Wed Nov 15 2017 Peter Hutterer 1.9.1-4 +- Mark the Lenovo Compact Keyboard as external (#1510814) + * Tue Nov 14 2017 Peter Hutterer 1.9.1-3 - Handle printing of tablet mode switches (#1510814) From 5bdc7cbd58e612b5fc22fea4a394374e491ba889 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 15 Nov 2017 14:46:45 +1000 Subject: [PATCH 142/317] libinput 1.9.2 --- .gitignore | 1 + ...s-Handle-LIBINPUT_SWITCH_TABLET_MODE.patch | 31 ------------- ...e-command-isn-t-installed-print-that.patch | 46 ------------------- libinput.spec | 9 ++-- sources | 2 +- 5 files changed, 7 insertions(+), 82 deletions(-) delete mode 100644 0001-tools-Handle-LIBINPUT_SWITCH_TABLET_MODE.patch delete mode 100644 0001-tools-when-the-command-isn-t-installed-print-that.patch diff --git a/.gitignore b/.gitignore index 3b62b06..0c72477 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /libinput-1.8.902.tar.xz /libinput-1.9.0.tar.xz /libinput-1.9.1.tar.xz +/libinput-1.9.2.tar.xz diff --git a/0001-tools-Handle-LIBINPUT_SWITCH_TABLET_MODE.patch b/0001-tools-Handle-LIBINPUT_SWITCH_TABLET_MODE.patch deleted file mode 100644 index 9145d31..0000000 --- a/0001-tools-Handle-LIBINPUT_SWITCH_TABLET_MODE.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 48fd22def7ae1a8d67d1f6f2e0d6e6f98c7a9361 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Stefan=20Br=C3=BCns?= -Date: Fri, 3 Nov 2017 23:01:23 +0100 -Subject: [PATCH libinput] tools: Handle LIBINPUT_SWITCH_TABLET_MODE -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Stefan Brüns -Signed-off-by: Peter Hutterer ---- - tools/libinput-debug-events.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/tools/libinput-debug-events.c b/tools/libinput-debug-events.c -index 87b7b803..fb8d84d8 100644 ---- a/tools/libinput-debug-events.c -+++ b/tools/libinput-debug-events.c -@@ -747,6 +747,9 @@ print_switch_event(struct libinput_event *ev) - case LIBINPUT_SWITCH_LID: - which = "lid"; - break; -+ case LIBINPUT_SWITCH_TABLET_MODE: -+ which = "tablet-mode"; -+ break; - default: - abort(); - } --- -2.13.6 - diff --git a/0001-tools-when-the-command-isn-t-installed-print-that.patch b/0001-tools-when-the-command-isn-t-installed-print-that.patch deleted file mode 100644 index 03a7182..0000000 --- a/0001-tools-when-the-command-isn-t-installed-print-that.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 92aa1d14183bd88a8080be96672682a2e5696477 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 9 Nov 2017 15:17:37 +1000 -Subject: [PATCH libinput] tools: when the command isn't installed, print that - -Makes it more user-friendly to be able to split the tools into multiple -packages - -Signed-off-by: Peter Hutterer ---- - tools/shared.c | 19 ++++++++++++++----- - 1 file changed, 14 insertions(+), 5 deletions(-) - -diff --git a/tools/shared.c b/tools/shared.c -index ae3287ba..962159e1 100644 ---- a/tools/shared.c -+++ b/tools/shared.c -@@ -510,11 +510,20 @@ tools_exec_command(const char *prefix, int real_argc, char **real_argv) - setup_path(); - - rc = execvp(executable, argv); -- if (rc) -- fprintf(stderr, -- "Failed to execute '%s' (%s)\n", -- command, -- strerror(errno)); -+ if (rc) { -+ if (errno == ENOENT) { -+ fprintf(stderr, -+ "libinput: %s is not a libinput command or not installed. " -+ "See 'libinput --help'\n", -+ command); -+ -+ } else { -+ fprintf(stderr, -+ "Failed to execute '%s' (%s)\n", -+ command, -+ strerror(errno)); -+ } -+ } - - return EXIT_FAILURE; - } --- -2.13.6 - diff --git a/libinput.spec b/libinput.spec index bbd8d62..3fccee8 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.9.1 -Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.9.2 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,8 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-tools-when-the-command-isn-t-installed-print-that.patch -Patch02: 0001-tools-Handle-LIBINPUT_SWITCH_TABLET_MODE.patch Patch03: 0001-udev-add-integration-flag-for-the-Lenovo-Compact-Key.patch BuildRequires: git-core @@ -123,6 +121,9 @@ git am -p1 %{patches} < /dev/null %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Wed Nov 15 2017 Peter Hutterer 1.9.2-1 +- libinput 1.9.2 + * Wed Nov 15 2017 Peter Hutterer 1.9.1-4 - Mark the Lenovo Compact Keyboard as external (#1510814) diff --git a/sources b/sources index ad21d54..2bff43a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.9.1.tar.xz) = e60c401cdec6b862c6c7186e636bba285e229b82998d9f86940659806bb64c295ec1060b5e8065345668e4b3ff95457bd01327351520d9f6cf8cbc98b9b95da0 +SHA512 (libinput-1.9.2.tar.xz) = 99719ab26be8ed35937ce91307459fa8c4aa7c383a555f1012a058ba98ca1d1c5df0d9b5e6a45046341c6dbae496dc29512b487ac7873b6ec67cab1176ee04ac From 7ac010a0d43dbeb93d5e9c6dd568e20df0a28656 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 28 Nov 2017 15:16:35 +1000 Subject: [PATCH 143/317] libinput 1.9.3 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0c72477..db19ce4 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /libinput-1.9.0.tar.xz /libinput-1.9.1.tar.xz /libinput-1.9.2.tar.xz +/libinput-1.9.3.tar.xz diff --git a/libinput.spec b/libinput.spec index 3fccee8..52c7715 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.9.2 +Version: 1.9.3 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -121,6 +121,9 @@ git am -p1 %{patches} < /dev/null %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Tue Nov 28 2017 Peter Hutterer 1.9.3-1 +- libinput 1.9.3 + * Wed Nov 15 2017 Peter Hutterer 1.9.2-1 - libinput 1.9.2 diff --git a/sources b/sources index 2bff43a..6fac782 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.9.2.tar.xz) = 99719ab26be8ed35937ce91307459fa8c4aa7c383a555f1012a058ba98ca1d1c5df0d9b5e6a45046341c6dbae496dc29512b487ac7873b6ec67cab1176ee04ac +SHA512 (libinput-1.9.3.tar.xz) = 33fb17724d4c2992bf31f9bb2e0825955468058e122ad420678b01ee293e1651d659fbae8873a7913f571243b3618032774cd350d2513eb73320d40aaa9953d1 From c8c113962bee7078cad4b6a6d38a0f157be94c86 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Dec 2017 10:28:31 +1000 Subject: [PATCH 144/317] Immediately post key events, don't wait for EV_SYN --- ...y-events-out-immediately-upon-receiv.patch | 163 ++++++++++++++++++ libinput.spec | 6 +- 2 files changed, 168 insertions(+), 1 deletion(-) create mode 100644 0001-fallback-send-key-events-out-immediately-upon-receiv.patch diff --git a/0001-fallback-send-key-events-out-immediately-upon-receiv.patch b/0001-fallback-send-key-events-out-immediately-upon-receiv.patch new file mode 100644 index 0000000..e13c179 --- /dev/null +++ b/0001-fallback-send-key-events-out-immediately-upon-receiv.patch @@ -0,0 +1,163 @@ +From 1c8636923b7d8245a5f55dfbfa191c0129ad4414 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 8 Dec 2017 09:41:07 +1000 +Subject: [PATCH libinput] fallback: send key events out immediately upon + receiving them + +Commit db3b6fe5f7f8 "fallback: change to handle the state at EV_SYN time" +introduced regressions for two types of event sequences. + +One is a kernel bug - some devices/drivers like the asus-wireless send a key +press + release within the same event frame which now cancels out and +disappears into the ether. This should be fixed in the kernel drivers but +there appear to be enough of them that we can't just pretend it's an outlier. + +The second issue is a libinput bug. If we get two key events in the same frame +(e.g. shift + A) we update the state correctly but the events are sent in the +order of the event codes. KEY_A sorts before KEY_LEFTSHIFT and our shift + A +becomes A + shift. + +Fix this by treating key events as before db3b6fe5f7f8 - by sending them out +as we get them. + +https://bugs.freedesktop.org/show_bug.cgi?id=104030 + +Signed-off-by: Peter Hutterer +--- + src/evdev-fallback.c | 35 ++++++++++++++++---------------- + test/test-keyboard.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 73 insertions(+), 18 deletions(-) + +diff --git a/src/evdev-fallback.c b/src/evdev-fallback.c +index 52a3bde1..0cd2497e 100644 +--- a/src/evdev-fallback.c ++++ b/src/evdev-fallback.c +@@ -501,6 +501,22 @@ fallback_process_key(struct fallback_dispatch *dispatch, + } + + hw_set_key_down(dispatch, e->code, e->value); ++ ++ switch (type) { ++ case KEY_TYPE_NONE: ++ break; ++ case KEY_TYPE_KEY: ++ fallback_keyboard_notify_key( ++ dispatch, ++ device, ++ time, ++ e->code, ++ e->value ? LIBINPUT_KEY_STATE_PRESSED : ++ LIBINPUT_KEY_STATE_RELEASED); ++ break; ++ case KEY_TYPE_BUTTON: ++ break; ++ } + } + + static void +@@ -834,27 +850,10 @@ fallback_handle_state(struct fallback_dispatch *dispatch, + if (dispatch->pending_event & EVDEV_KEY) { + bool want_debounce = false; + for (unsigned int code = 0; code <= KEY_MAX; code++) { +- bool new_state; +- + if (!hw_key_has_changed(dispatch, code)) + continue; + +- new_state = hw_is_key_down(dispatch, code); +- +- switch (get_key_type(code)) { +- case KEY_TYPE_NONE: +- break; +- case KEY_TYPE_KEY: +- fallback_keyboard_notify_key( +- dispatch, +- device, +- time, +- code, +- new_state ? +- LIBINPUT_KEY_STATE_PRESSED : +- LIBINPUT_KEY_STATE_RELEASED); +- break; +- case KEY_TYPE_BUTTON: ++ if (get_key_type(code) == KEY_TYPE_BUTTON) { + want_debounce = true; + break; + } +diff --git a/test/test-keyboard.c b/test/test-keyboard.c +index dc2e630e..db836381 100644 +--- a/test/test-keyboard.c ++++ b/test/test-keyboard.c +@@ -365,6 +365,61 @@ START_TEST(keyboard_no_buttons) + } + END_TEST + ++START_TEST(keyboard_frame_order) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput *li = dev->libinput; ++ ++ if (!libevdev_has_event_code(dev->evdev, EV_KEY, KEY_A) || ++ !libevdev_has_event_code(dev->evdev, EV_KEY, KEY_LEFTSHIFT)) ++ return; ++ ++ litest_drain_events(li); ++ ++ litest_event(dev, EV_KEY, KEY_LEFTSHIFT, 1); ++ litest_event(dev, EV_KEY, KEY_A, 1); ++ litest_event(dev, EV_SYN, SYN_REPORT, 0); ++ libinput_dispatch(li); ++ ++ litest_assert_key_event(li, ++ KEY_LEFTSHIFT, ++ LIBINPUT_KEY_STATE_PRESSED); ++ litest_assert_key_event(li, KEY_A, LIBINPUT_KEY_STATE_PRESSED); ++ ++ litest_event(dev, EV_KEY, KEY_LEFTSHIFT, 0); ++ litest_event(dev, EV_KEY, KEY_A, 0); ++ litest_event(dev, EV_SYN, SYN_REPORT, 0); ++ libinput_dispatch(li); ++ ++ litest_assert_key_event(li, ++ KEY_LEFTSHIFT, ++ LIBINPUT_KEY_STATE_RELEASED); ++ litest_assert_key_event(li, KEY_A, LIBINPUT_KEY_STATE_RELEASED); ++ ++ litest_event(dev, EV_KEY, KEY_A, 1); ++ litest_event(dev, EV_KEY, KEY_LEFTSHIFT, 1); ++ litest_event(dev, EV_SYN, SYN_REPORT, 0); ++ libinput_dispatch(li); ++ ++ litest_assert_key_event(li, KEY_A, LIBINPUT_KEY_STATE_PRESSED); ++ litest_assert_key_event(li, ++ KEY_LEFTSHIFT, ++ LIBINPUT_KEY_STATE_PRESSED); ++ ++ litest_event(dev, EV_KEY, KEY_A, 0); ++ litest_event(dev, EV_KEY, KEY_LEFTSHIFT, 0); ++ litest_event(dev, EV_SYN, SYN_REPORT, 0); ++ libinput_dispatch(li); ++ ++ litest_assert_key_event(li, KEY_A, LIBINPUT_KEY_STATE_RELEASED); ++ litest_assert_key_event(li, ++ KEY_LEFTSHIFT, ++ LIBINPUT_KEY_STATE_RELEASED); ++ ++ libinput_dispatch(li); ++} ++END_TEST ++ + START_TEST(keyboard_leds) + { + struct litest_device *dev = litest_current_device(); +@@ -432,6 +487,7 @@ litest_setup_tests_keyboard(void) + litest_add("keyboard:time", keyboard_time_usec, LITEST_KEYS, LITEST_ANY); + + litest_add("keyboard:events", keyboard_no_buttons, LITEST_KEYS, LITEST_ANY); ++ litest_add("keyboard:events", keyboard_frame_order, LITEST_KEYS, LITEST_ANY); + + litest_add("keyboard:leds", keyboard_leds, LITEST_ANY, LITEST_ANY); + +-- +2.13.6 + diff --git a/libinput.spec b/libinput.spec index 52c7715..8db9201 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.9.3 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -19,6 +19,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} %endif Patch03: 0001-udev-add-integration-flag-for-the-Lenovo-Compact-Key.patch +Patch04: 0001-fallback-send-key-events-out-immediately-upon-receiv.patch BuildRequires: git-core BuildRequires: gcc @@ -121,6 +122,9 @@ git am -p1 %{patches} < /dev/null %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Fri Dec 08 2017 Peter Hutterer 1.9.3-2 +- Immediately post key events, don't wait for EV_SYN + * Tue Nov 28 2017 Peter Hutterer 1.9.3-1 - libinput 1.9.3 From 3f8446aaf64314a57f6593d1fff2ef5655bebb6a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 14 Dec 2017 16:22:40 +1000 Subject: [PATCH 145/317] libinput 1.9.4 --- .gitignore | 1 + ...y-events-out-immediately-upon-receiv.patch | 163 ------------------ libinput.spec | 8 +- sources | 2 +- 4 files changed, 7 insertions(+), 167 deletions(-) delete mode 100644 0001-fallback-send-key-events-out-immediately-upon-receiv.patch diff --git a/.gitignore b/.gitignore index db19ce4..f439386 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /libinput-1.9.1.tar.xz /libinput-1.9.2.tar.xz /libinput-1.9.3.tar.xz +/libinput-1.9.4.tar.xz diff --git a/0001-fallback-send-key-events-out-immediately-upon-receiv.patch b/0001-fallback-send-key-events-out-immediately-upon-receiv.patch deleted file mode 100644 index e13c179..0000000 --- a/0001-fallback-send-key-events-out-immediately-upon-receiv.patch +++ /dev/null @@ -1,163 +0,0 @@ -From 1c8636923b7d8245a5f55dfbfa191c0129ad4414 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 8 Dec 2017 09:41:07 +1000 -Subject: [PATCH libinput] fallback: send key events out immediately upon - receiving them - -Commit db3b6fe5f7f8 "fallback: change to handle the state at EV_SYN time" -introduced regressions for two types of event sequences. - -One is a kernel bug - some devices/drivers like the asus-wireless send a key -press + release within the same event frame which now cancels out and -disappears into the ether. This should be fixed in the kernel drivers but -there appear to be enough of them that we can't just pretend it's an outlier. - -The second issue is a libinput bug. If we get two key events in the same frame -(e.g. shift + A) we update the state correctly but the events are sent in the -order of the event codes. KEY_A sorts before KEY_LEFTSHIFT and our shift + A -becomes A + shift. - -Fix this by treating key events as before db3b6fe5f7f8 - by sending them out -as we get them. - -https://bugs.freedesktop.org/show_bug.cgi?id=104030 - -Signed-off-by: Peter Hutterer ---- - src/evdev-fallback.c | 35 ++++++++++++++++---------------- - test/test-keyboard.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 73 insertions(+), 18 deletions(-) - -diff --git a/src/evdev-fallback.c b/src/evdev-fallback.c -index 52a3bde1..0cd2497e 100644 ---- a/src/evdev-fallback.c -+++ b/src/evdev-fallback.c -@@ -501,6 +501,22 @@ fallback_process_key(struct fallback_dispatch *dispatch, - } - - hw_set_key_down(dispatch, e->code, e->value); -+ -+ switch (type) { -+ case KEY_TYPE_NONE: -+ break; -+ case KEY_TYPE_KEY: -+ fallback_keyboard_notify_key( -+ dispatch, -+ device, -+ time, -+ e->code, -+ e->value ? LIBINPUT_KEY_STATE_PRESSED : -+ LIBINPUT_KEY_STATE_RELEASED); -+ break; -+ case KEY_TYPE_BUTTON: -+ break; -+ } - } - - static void -@@ -834,27 +850,10 @@ fallback_handle_state(struct fallback_dispatch *dispatch, - if (dispatch->pending_event & EVDEV_KEY) { - bool want_debounce = false; - for (unsigned int code = 0; code <= KEY_MAX; code++) { -- bool new_state; -- - if (!hw_key_has_changed(dispatch, code)) - continue; - -- new_state = hw_is_key_down(dispatch, code); -- -- switch (get_key_type(code)) { -- case KEY_TYPE_NONE: -- break; -- case KEY_TYPE_KEY: -- fallback_keyboard_notify_key( -- dispatch, -- device, -- time, -- code, -- new_state ? -- LIBINPUT_KEY_STATE_PRESSED : -- LIBINPUT_KEY_STATE_RELEASED); -- break; -- case KEY_TYPE_BUTTON: -+ if (get_key_type(code) == KEY_TYPE_BUTTON) { - want_debounce = true; - break; - } -diff --git a/test/test-keyboard.c b/test/test-keyboard.c -index dc2e630e..db836381 100644 ---- a/test/test-keyboard.c -+++ b/test/test-keyboard.c -@@ -365,6 +365,61 @@ START_TEST(keyboard_no_buttons) - } - END_TEST - -+START_TEST(keyboard_frame_order) -+{ -+ struct litest_device *dev = litest_current_device(); -+ struct libinput *li = dev->libinput; -+ -+ if (!libevdev_has_event_code(dev->evdev, EV_KEY, KEY_A) || -+ !libevdev_has_event_code(dev->evdev, EV_KEY, KEY_LEFTSHIFT)) -+ return; -+ -+ litest_drain_events(li); -+ -+ litest_event(dev, EV_KEY, KEY_LEFTSHIFT, 1); -+ litest_event(dev, EV_KEY, KEY_A, 1); -+ litest_event(dev, EV_SYN, SYN_REPORT, 0); -+ libinput_dispatch(li); -+ -+ litest_assert_key_event(li, -+ KEY_LEFTSHIFT, -+ LIBINPUT_KEY_STATE_PRESSED); -+ litest_assert_key_event(li, KEY_A, LIBINPUT_KEY_STATE_PRESSED); -+ -+ litest_event(dev, EV_KEY, KEY_LEFTSHIFT, 0); -+ litest_event(dev, EV_KEY, KEY_A, 0); -+ litest_event(dev, EV_SYN, SYN_REPORT, 0); -+ libinput_dispatch(li); -+ -+ litest_assert_key_event(li, -+ KEY_LEFTSHIFT, -+ LIBINPUT_KEY_STATE_RELEASED); -+ litest_assert_key_event(li, KEY_A, LIBINPUT_KEY_STATE_RELEASED); -+ -+ litest_event(dev, EV_KEY, KEY_A, 1); -+ litest_event(dev, EV_KEY, KEY_LEFTSHIFT, 1); -+ litest_event(dev, EV_SYN, SYN_REPORT, 0); -+ libinput_dispatch(li); -+ -+ litest_assert_key_event(li, KEY_A, LIBINPUT_KEY_STATE_PRESSED); -+ litest_assert_key_event(li, -+ KEY_LEFTSHIFT, -+ LIBINPUT_KEY_STATE_PRESSED); -+ -+ litest_event(dev, EV_KEY, KEY_A, 0); -+ litest_event(dev, EV_KEY, KEY_LEFTSHIFT, 0); -+ litest_event(dev, EV_SYN, SYN_REPORT, 0); -+ libinput_dispatch(li); -+ -+ litest_assert_key_event(li, KEY_A, LIBINPUT_KEY_STATE_RELEASED); -+ litest_assert_key_event(li, -+ KEY_LEFTSHIFT, -+ LIBINPUT_KEY_STATE_RELEASED); -+ -+ libinput_dispatch(li); -+} -+END_TEST -+ - START_TEST(keyboard_leds) - { - struct litest_device *dev = litest_current_device(); -@@ -432,6 +487,7 @@ litest_setup_tests_keyboard(void) - litest_add("keyboard:time", keyboard_time_usec, LITEST_KEYS, LITEST_ANY); - - litest_add("keyboard:events", keyboard_no_buttons, LITEST_KEYS, LITEST_ANY); -+ litest_add("keyboard:events", keyboard_frame_order, LITEST_KEYS, LITEST_ANY); - - litest_add("keyboard:leds", keyboard_leds, LITEST_ANY, LITEST_ANY); - --- -2.13.6 - diff --git a/libinput.spec b/libinput.spec index 8db9201..790a8c6 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.9.3 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.9.4 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -19,7 +19,6 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} %endif Patch03: 0001-udev-add-integration-flag-for-the-Lenovo-Compact-Key.patch -Patch04: 0001-fallback-send-key-events-out-immediately-upon-receiv.patch BuildRequires: git-core BuildRequires: gcc @@ -122,6 +121,9 @@ git am -p1 %{patches} < /dev/null %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Thu Dec 14 2017 Peter Hutterer 1.9.4-1 +- libinput 1.9.4 + * Fri Dec 08 2017 Peter Hutterer 1.9.3-2 - Immediately post key events, don't wait for EV_SYN diff --git a/sources b/sources index 6fac782..46cbbf5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.9.3.tar.xz) = 33fb17724d4c2992bf31f9bb2e0825955468058e122ad420678b01ee293e1651d659fbae8873a7913f571243b3618032774cd350d2513eb73320d40aaa9953d1 +SHA512 (libinput-1.9.4.tar.xz) = 302f9497ea9ffb2163c643e9ca2f0a773ea141f6fe0a3aa3d8e86eb11a5d11e75d858b1e679ebfd3f913c645beac059cfd356b37c4ea17a8853068f79a740a4b From be6c4601eed7abe36410aabcf2a66adbba287490 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 22 Jan 2018 11:35:19 +1000 Subject: [PATCH 146/317] libinput 1.10rc1 --- .gitignore | 1 + ...tion-flag-for-the-Lenovo-Compact-Key.patch | 31 ------------------- libinput.spec | 7 +++-- sources | 2 +- 4 files changed, 6 insertions(+), 35 deletions(-) delete mode 100644 0001-udev-add-integration-flag-for-the-Lenovo-Compact-Key.patch diff --git a/.gitignore b/.gitignore index f439386..010b12b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /libinput-1.9.2.tar.xz /libinput-1.9.3.tar.xz /libinput-1.9.4.tar.xz +/libinput-1.9.901.tar.xz diff --git a/0001-udev-add-integration-flag-for-the-Lenovo-Compact-Key.patch b/0001-udev-add-integration-flag-for-the-Lenovo-Compact-Key.patch deleted file mode 100644 index 09b19bc..0000000 --- a/0001-udev-add-integration-flag-for-the-Lenovo-Compact-Key.patch +++ /dev/null @@ -1,31 +0,0 @@ -From c06660b314f5d9b284088d30770c1c40006d9ab0 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 14 Nov 2017 15:53:12 +1000 -Subject: [PATCH libinput] udev: add integration flag for the Lenovo Compact - Keyboard with TrackPoint - -From https://bugzilla.redhat.com/show_bug.cgi?id=1510814 - -Signed-off-by: Peter Hutterer ---- - udev/90-libinput-model-quirks.hwdb | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index 820cb8db..c23ef833 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -204,6 +204,10 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd - LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1 - LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD=150 - -+# Lenovo ThinkPad Compact USB Keyboard with TrackPoint -+libinput:keyboard:input:b0003v17EFp6047* -+ LIBINPUT_ATTR_KEYBOARD_INTEGRATION=external -+ - ########################################## - # Logitech - ########################################## --- -2.13.6 - diff --git a/libinput.spec b/libinput.spec index 790a8c6..25c9f2b 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.9.4 +Version: 1.9.901 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -18,8 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch03: 0001-udev-add-integration-flag-for-the-Lenovo-Compact-Key.patch - BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -121,6 +119,9 @@ git am -p1 %{patches} < /dev/null %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Mon Jan 22 2018 Peter Hutterer 1.9.901-1 +- libinput 1.10rc1 + * Thu Dec 14 2017 Peter Hutterer 1.9.4-1 - libinput 1.9.4 diff --git a/sources b/sources index 46cbbf5..0edf74c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.9.4.tar.xz) = 302f9497ea9ffb2163c643e9ca2f0a773ea141f6fe0a3aa3d8e86eb11a5d11e75d858b1e679ebfd3f913c645beac059cfd356b37c4ea17a8853068f79a740a4b +SHA512 (libinput-1.9.901.tar.xz) = 4e79f81bb52c17833d4e9b05d84657b0e52ff681c9f0408614f7fd66bdd022f8670efc8cb1eff86285b3f39aa51f9727b5c353bae7b6a925070fe6de389f3107 From 60862d0ab5224d4a5573487e728095c879689b3a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 2 Feb 2018 12:11:23 +1000 Subject: [PATCH 147/317] Use autosetup instead of the manual git magic --- libinput.spec | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/libinput.spec b/libinput.spec index 25c9f2b..0ee025e 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.9.901 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -53,17 +53,7 @@ The %{name}-utils package contains tools to debug hardware and analyze %{name}. %prep -%setup -q -n %{name}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} -git init -if [ -z "$GIT_COMMITTER_NAME" ]; then - git config user.email "x@fedoraproject.org" - git config user.name "Fedora X Ninjas" -fi -git add . -git commit --allow-empty -a -q -m "%{version} baseline." - -# Apply all the patches. -git am -p1 %{patches} < /dev/null +%autosetup -S git %build %meson -Ddebug-gui=false \ @@ -119,6 +109,9 @@ git am -p1 %{patches} < /dev/null %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Fri Feb 02 2018 Peter Hutterer 1.9.901-2 +- Use autosetup instead of the manual git magic + * Mon Jan 22 2018 Peter Hutterer 1.9.901-1 - libinput 1.10rc1 From 4afc4b052ff2efb6ea577657967544c347fcc8fc Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 5 Feb 2018 19:38:58 +1000 Subject: [PATCH 148/317] Fix crasher on first event from tablets not supported by libwacom (#1535755) --- ...-rotation-on-a-tool-if-we-don-t-have.patch | 56 +++++++++++++++++++ libinput.spec | 8 ++- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 0001-tablet-don-t-set-rotation-on-a-tool-if-we-don-t-have.patch diff --git a/0001-tablet-don-t-set-rotation-on-a-tool-if-we-don-t-have.patch b/0001-tablet-don-t-set-rotation-on-a-tool-if-we-don-t-have.patch new file mode 100644 index 0000000..d4ed141 --- /dev/null +++ b/0001-tablet-don-t-set-rotation-on-a-tool-if-we-don-t-have.patch @@ -0,0 +1,56 @@ +From d26b08b93f05eba58d46ad6811e71e9da0e74201 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 5 Feb 2018 09:11:42 +1000 +Subject: [PATCH libinput] tablet: don't set rotation on a tool if we don't + have ABS_Z + +Rotation on a tool can either ABS_Z or in the case of the mouse/lens tools a +combination of ABS_TILT_X/Y. The code assumes that if the rotation on a stylus +(not mouse/lense) changes, we need to fetch it from ABS_Z. This happens on the +very first event from the tablet, proximity in invalidates all axes so we can +send the current state to the caller. + +On libwacom-recognized tablets we never set the rotation bit on the stylus, so +that's all fine. On tablets without libwacom support, the stylus may have a +rotation bit copied because we have it set thanks to mouse+tilt on the tablet. +When that first event is handled, we try to access ABS_Z. On tablets without +ABS_Z like Aipteks, we go boom. + +Fix this by checking for ABS_Z during tablet init, if we don't have that axis +then never set the rotation bit on the tool. That's the only axis where we +need this, all other axes have a single cause only and thus the tablet bits +are accurate anyway. + +https://bugs.freedesktop.org/show_bug.cgi?id=104939 + +Signed-off-by: Peter Hutterer +--- + src/evdev-tablet.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c +index 2f6b64da..771e7775 100644 +--- a/src/evdev-tablet.c ++++ b/src/evdev-tablet.c +@@ -933,7 +933,17 @@ tool_set_bits(const struct tablet_dispatch *tablet, + copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X); + copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y); + copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_SLIDER); +- copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z); ++ ++ /* Rotation is special, it can be either ABS_Z or ++ * BTN_TOOL_MOUSE+ABS_TILT_X/Y. Aiptek tablets have ++ * mouse+tilt (and thus rotation), but they do not have ++ * ABS_Z. So let's not copy the axis bit if we don't have ++ * ABS_Z, otherwise we try to get the value from it later on ++ * proximity in and go boom because the absinfo isn't there. ++ */ ++ if (libevdev_has_event_code(tablet->device->evdev, EV_ABS, ++ ABS_Z)) ++ copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z); + break; + case LIBINPUT_TABLET_TOOL_TYPE_MOUSE: + case LIBINPUT_TABLET_TOOL_TYPE_LENS: +-- +2.14.3 + diff --git a/libinput.spec b/libinput.spec index 0ee025e..e02e637 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.9.901 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-tablet-don-t-set-rotation-on-a-tool-if-we-don-t-have.patch + BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -109,6 +111,10 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Mon Feb 05 2018 Peter Hutterer 1.9.901-3 +- Fix crasher on first event from tablets not supported by libwacom + (#1535755) + * Fri Feb 02 2018 Peter Hutterer 1.9.901-2 - Use autosetup instead of the manual git magic From 27ee09342ea26a284a198a6172e9259b6b9ba270 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 6 Feb 2018 20:26:10 +1000 Subject: [PATCH 149/317] libinput 1.10rc2 --- .gitignore | 1 + libinput.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 010b12b..e5a3dd6 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /libinput-1.9.3.tar.xz /libinput-1.9.4.tar.xz /libinput-1.9.901.tar.xz +/libinput-1.9.902.tar.xz diff --git a/libinput.spec b/libinput.spec index e02e637..13cfdf8 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.9.901 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.9.902 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -111,6 +111,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Tue Feb 06 2018 Peter Hutterer 1.9.902-1 +- libinput 1.10rc2 + * Mon Feb 05 2018 Peter Hutterer 1.9.901-3 - Fix crasher on first event from tablets not supported by libwacom (#1535755) diff --git a/sources b/sources index 0edf74c..492edc8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.9.901.tar.xz) = 4e79f81bb52c17833d4e9b05d84657b0e52ff681c9f0408614f7fd66bdd022f8670efc8cb1eff86285b3f39aa51f9727b5c353bae7b6a925070fe6de389f3107 +SHA512 (libinput-1.9.902.tar.xz) = b2309145c90b7d24bbc8894ea1fb8846d67900ce761273a6f3fa769c0e0bb0d1162363845e26ee535d5a4f438f09fa104c04c4db0ddf9efdd229fb786e32dd7e From b1b678240612a2069f43b36cf4cf1ea950136f15 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 13 Feb 2018 11:57:10 +1000 Subject: [PATCH 150/317] libinput 1.10 --- .gitignore | 1 + ...-rotation-on-a-tool-if-we-don-t-have.patch | 56 ------------------- libinput.spec | 7 ++- sources | 2 +- 4 files changed, 6 insertions(+), 60 deletions(-) delete mode 100644 0001-tablet-don-t-set-rotation-on-a-tool-if-we-don-t-have.patch diff --git a/.gitignore b/.gitignore index e5a3dd6..f689597 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /libinput-1.9.4.tar.xz /libinput-1.9.901.tar.xz /libinput-1.9.902.tar.xz +/libinput-1.10.0.tar.xz diff --git a/0001-tablet-don-t-set-rotation-on-a-tool-if-we-don-t-have.patch b/0001-tablet-don-t-set-rotation-on-a-tool-if-we-don-t-have.patch deleted file mode 100644 index d4ed141..0000000 --- a/0001-tablet-don-t-set-rotation-on-a-tool-if-we-don-t-have.patch +++ /dev/null @@ -1,56 +0,0 @@ -From d26b08b93f05eba58d46ad6811e71e9da0e74201 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 5 Feb 2018 09:11:42 +1000 -Subject: [PATCH libinput] tablet: don't set rotation on a tool if we don't - have ABS_Z - -Rotation on a tool can either ABS_Z or in the case of the mouse/lens tools a -combination of ABS_TILT_X/Y. The code assumes that if the rotation on a stylus -(not mouse/lense) changes, we need to fetch it from ABS_Z. This happens on the -very first event from the tablet, proximity in invalidates all axes so we can -send the current state to the caller. - -On libwacom-recognized tablets we never set the rotation bit on the stylus, so -that's all fine. On tablets without libwacom support, the stylus may have a -rotation bit copied because we have it set thanks to mouse+tilt on the tablet. -When that first event is handled, we try to access ABS_Z. On tablets without -ABS_Z like Aipteks, we go boom. - -Fix this by checking for ABS_Z during tablet init, if we don't have that axis -then never set the rotation bit on the tool. That's the only axis where we -need this, all other axes have a single cause only and thus the tablet bits -are accurate anyway. - -https://bugs.freedesktop.org/show_bug.cgi?id=104939 - -Signed-off-by: Peter Hutterer ---- - src/evdev-tablet.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c -index 2f6b64da..771e7775 100644 ---- a/src/evdev-tablet.c -+++ b/src/evdev-tablet.c -@@ -933,7 +933,17 @@ tool_set_bits(const struct tablet_dispatch *tablet, - copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X); - copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y); - copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_SLIDER); -- copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z); -+ -+ /* Rotation is special, it can be either ABS_Z or -+ * BTN_TOOL_MOUSE+ABS_TILT_X/Y. Aiptek tablets have -+ * mouse+tilt (and thus rotation), but they do not have -+ * ABS_Z. So let's not copy the axis bit if we don't have -+ * ABS_Z, otherwise we try to get the value from it later on -+ * proximity in and go boom because the absinfo isn't there. -+ */ -+ if (libevdev_has_event_code(tablet->device->evdev, EV_ABS, -+ ABS_Z)) -+ copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z); - break; - case LIBINPUT_TABLET_TOOL_TYPE_MOUSE: - case LIBINPUT_TABLET_TOOL_TYPE_LENS: --- -2.14.3 - diff --git a/libinput.spec b/libinput.spec index 13cfdf8..d950b94 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.9.902 +Version: 1.10.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -18,8 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-tablet-don-t-set-rotation-on-a-tool-if-we-don-t-have.patch - BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -111,6 +109,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Tue Feb 13 2018 Peter Hutterer 1.10.0-1 +- libinput 1.10 + * Tue Feb 06 2018 Peter Hutterer 1.9.902-1 - libinput 1.10rc2 diff --git a/sources b/sources index 492edc8..71cbd0e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.9.902.tar.xz) = b2309145c90b7d24bbc8894ea1fb8846d67900ce761273a6f3fa769c0e0bb0d1162363845e26ee535d5a4f438f09fa104c04c4db0ddf9efdd229fb786e32dd7e +SHA512 (libinput-1.10.0.tar.xz) = 173f72f454c534dee755b6121c4577900ae9b8a129ac41de69410c3195950a6d149d6148892c4976f013eeabca66117d53fa67e352cc005960863a5576696928 From 2e5d33a53e675ad8fae3250fbd08b228e4ddcdbd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 13 Feb 2018 14:43:23 +1000 Subject: [PATCH 151/317] Fix crasher due to missing devnode after resume (#1536633) --- ...e-open_restricted-if-the-devnode-doe.patch | 47 +++++++++++++++++++ libinput.spec | 7 ++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 0001-evdev-fail-before-open_restricted-if-the-devnode-doe.patch diff --git a/0001-evdev-fail-before-open_restricted-if-the-devnode-doe.patch b/0001-evdev-fail-before-open_restricted-if-the-devnode-doe.patch new file mode 100644 index 0000000..4494695 --- /dev/null +++ b/0001-evdev-fail-before-open_restricted-if-the-devnode-doe.patch @@ -0,0 +1,47 @@ +From cb186abc17ad9e525609dc32385b0a7992e949a9 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 9 Feb 2018 19:24:15 +1000 +Subject: [PATCH libinput] evdev: fail before open_restricted if the devnode + doesn't exist + +https://bugzilla.redhat.com/show_bug.cgi?id=1536633 +https://bugzilla.redhat.com/show_bug.cgi?id=1539046 +https://bugzilla.redhat.com/show_bug.cgi?id=1539783 +https://bugzilla.redhat.com/show_bug.cgi?id=1540662 +https://bugs.freedesktop.org/show_bug.cgi?id=104278 + +Debugged-by: Jeff Smith +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/evdev.c b/src/evdev.c +index d1ca243d..63b93ec3 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1917,6 +1917,11 @@ evdev_device_create(struct libinput_seat *seat, + const char *devnode = udev_device_get_devnode(udev_device); + const char *sysname = udev_device_get_sysname(udev_device); + ++ if (!devnode) { ++ log_info(libinput, "%s: no device node associated\n", sysname); ++ return NULL; ++ } ++ + if (udev_device_should_be_ignored(udev_device)) { + log_debug(libinput, "%s: device is ignored\n", sysname); + return NULL; +@@ -2434,6 +2439,9 @@ evdev_device_resume(struct evdev_device *device) + return -ENODEV; + + devnode = udev_device_get_devnode(device->udev_device); ++ if (!devnode) ++ return -ENODEV; ++ + fd = open_restricted(libinput, devnode, + O_RDWR | O_NONBLOCK | O_CLOEXEC); + +-- +2.14.3 + diff --git a/libinput.spec b/libinput.spec index d950b94..1a9bd4a 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.10.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-evdev-fail-before-open_restricted-if-the-devnode-doe.patch + BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -109,6 +111,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Tue Feb 13 2018 Peter Hutterer 1.10.0-2 +- Fix crasher due to missing devnode after resume (#1536633) + * Tue Feb 13 2018 Peter Hutterer 1.10.0-1 - libinput 1.10 From 4796492d71a6ea581f55fe807c74ef1ec8bef143 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 28 Feb 2018 10:23:41 +1000 Subject: [PATCH 152/317] libinput 1.10.1 --- .gitignore | 1 + ...e-open_restricted-if-the-devnode-doe.patch | 47 ------------------- libinput.spec | 9 ++-- sources | 2 +- 4 files changed, 7 insertions(+), 52 deletions(-) delete mode 100644 0001-evdev-fail-before-open_restricted-if-the-devnode-doe.patch diff --git a/.gitignore b/.gitignore index f689597..385fbdf 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /libinput-1.9.901.tar.xz /libinput-1.9.902.tar.xz /libinput-1.10.0.tar.xz +/libinput-1.10.1.tar.xz diff --git a/0001-evdev-fail-before-open_restricted-if-the-devnode-doe.patch b/0001-evdev-fail-before-open_restricted-if-the-devnode-doe.patch deleted file mode 100644 index 4494695..0000000 --- a/0001-evdev-fail-before-open_restricted-if-the-devnode-doe.patch +++ /dev/null @@ -1,47 +0,0 @@ -From cb186abc17ad9e525609dc32385b0a7992e949a9 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 9 Feb 2018 19:24:15 +1000 -Subject: [PATCH libinput] evdev: fail before open_restricted if the devnode - doesn't exist - -https://bugzilla.redhat.com/show_bug.cgi?id=1536633 -https://bugzilla.redhat.com/show_bug.cgi?id=1539046 -https://bugzilla.redhat.com/show_bug.cgi?id=1539783 -https://bugzilla.redhat.com/show_bug.cgi?id=1540662 -https://bugs.freedesktop.org/show_bug.cgi?id=104278 - -Debugged-by: Jeff Smith -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/src/evdev.c b/src/evdev.c -index d1ca243d..63b93ec3 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1917,6 +1917,11 @@ evdev_device_create(struct libinput_seat *seat, - const char *devnode = udev_device_get_devnode(udev_device); - const char *sysname = udev_device_get_sysname(udev_device); - -+ if (!devnode) { -+ log_info(libinput, "%s: no device node associated\n", sysname); -+ return NULL; -+ } -+ - if (udev_device_should_be_ignored(udev_device)) { - log_debug(libinput, "%s: device is ignored\n", sysname); - return NULL; -@@ -2434,6 +2439,9 @@ evdev_device_resume(struct evdev_device *device) - return -ENODEV; - - devnode = udev_device_get_devnode(device->udev_device); -+ if (!devnode) -+ return -ENODEV; -+ - fd = open_restricted(libinput, devnode, - O_RDWR | O_NONBLOCK | O_CLOEXEC); - --- -2.14.3 - diff --git a/libinput.spec b/libinput.spec index 1a9bd4a..a7e6445 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.10.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.10.1 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,8 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-evdev-fail-before-open_restricted-if-the-devnode-doe.patch - BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -111,6 +109,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Wed Feb 28 2018 Peter Hutterer 1.10.1-1 +- libinput 1.10.1 + * Tue Feb 13 2018 Peter Hutterer 1.10.0-2 - Fix crasher due to missing devnode after resume (#1536633) diff --git a/sources b/sources index 71cbd0e..f3c1e8b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.10.0.tar.xz) = 173f72f454c534dee755b6121c4577900ae9b8a129ac41de69410c3195950a6d149d6148892c4976f013eeabca66117d53fa67e352cc005960863a5576696928 +SHA512 (libinput-1.10.1.tar.xz) = 69e7cd12f3d686d1b09afd93fe072ddd6f8c9a1f04c0a651c7dd02c5a20b3f8163c5b787b41bf3ae91db0da7d3e2958d315d6c9a2875259c62b0d290ac89d1fb From fb24aaa4b50ce062d798840464be83ba860f3cc4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 2 Mar 2018 14:08:25 +1000 Subject: [PATCH 153/317] Fix touchpad jitter by changing from "disable if no jitter" to "enable if jitter" (#1548550) --- ...he-hysteresis-into-its-own-substruct.patch | 60 +++++++++ ...ve-the-code-for-disabling-hysteresis.patch | 63 +++++++++ 0003-touchpad-add-wobbling-detection.patch | 126 ++++++++++++++++++ libinput.spec | 10 +- 4 files changed, 258 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-move-the-hysteresis-into-its-own-substruct.patch create mode 100644 0002-touchpad-remove-the-code-for-disabling-hysteresis.patch create mode 100644 0003-touchpad-add-wobbling-detection.patch diff --git a/0001-touchpad-move-the-hysteresis-into-its-own-substruct.patch b/0001-touchpad-move-the-hysteresis-into-its-own-substruct.patch new file mode 100644 index 0000000..53099f9 --- /dev/null +++ b/0001-touchpad-move-the-hysteresis-into-its-own-substruct.patch @@ -0,0 +1,60 @@ +From 298b28d7f1eec7ebc7cd239915966ca0c322cf54 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 23 Feb 2018 11:21:04 +1000 +Subject: [PATCH libinput 1/3] touchpad: move the hysteresis into its own + substruct + +Prep work for the wobbling detection patch + +Signed-off-by: Peter Hutterer +Reviewed-by: Konstantin Kharlamov +(cherry picked from commit e43bd4ae3a75f72b45c6bab6168bd859ab4a01b3) +--- + src/evdev-mt-touchpad.c | 10 +++++----- + src/evdev-mt-touchpad.h | 4 +++- + 2 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 7bce8114..a024be28 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -162,16 +162,16 @@ tp_motion_hysteresis(struct tp_dispatch *tp, + return; + + if (t->history.count == 0) { +- t->hysteresis_center = t->point; ++ t->hysteresis.center = t->point; + } else { + x = evdev_hysteresis(x, +- t->hysteresis_center.x, ++ t->hysteresis.center.x, + tp->hysteresis.margin.x); + y = evdev_hysteresis(y, +- t->hysteresis_center.y, ++ t->hysteresis.center.y, + tp->hysteresis.margin.y); +- t->hysteresis_center.x = x; +- t->hysteresis_center.y = y; ++ t->hysteresis.center.x = x; ++ t->hysteresis.center.y = y; + t->point.x = x; + t->point.y = y; + } +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index 442f34a3..4c2f156b 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -173,7 +173,9 @@ struct tp_touch { + unsigned int count; + } history; + +- struct device_coords hysteresis_center; ++ struct { ++ struct device_coords center; ++ } hysteresis; + + /* A pinned touchpoint is the one that pressed the physical button + * on a clickpad. After the release, it won't move until the center +-- +2.14.3 + diff --git a/0002-touchpad-remove-the-code-for-disabling-hysteresis.patch b/0002-touchpad-remove-the-code-for-disabling-hysteresis.patch new file mode 100644 index 0000000..0bdee04 --- /dev/null +++ b/0002-touchpad-remove-the-code-for-disabling-hysteresis.patch @@ -0,0 +1,63 @@ +From 5f4d975861ace89b47b6d7e265d38103045c1cc6 Mon Sep 17 00:00:00 2001 +From: Konstantin Kharlamov +Date: Sun, 18 Feb 2018 13:09:23 +0300 +Subject: [PATCH libinput 2/3] touchpad: remove the code for disabling + hysteresis + +Signed-off-by: Konstantin Kharlamov +Signed-off-by: Peter Hutterer +Reviewed-by: Konstantin Kharlamov +(cherry picked from commit e8dffbd73a1b3c17716f972f210e420de94028c2) +--- + src/evdev-mt-touchpad.c | 21 +-------------------- + 1 file changed, 1 insertion(+), 20 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index a024be28..9f36fcbe 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -135,22 +135,6 @@ tp_motion_history_push(struct tp_touch *t) + t->history.index = motion_index; + } + +-static inline void +-tp_maybe_disable_hysteresis(struct tp_dispatch *tp, uint64_t time) +-{ +- /* If the finger is down for 80ms without seeing motion events, +- the firmware filters and we don't need a software hysteresis */ +- if (tp->nfingers_down >= 1 && +- time - tp->hysteresis.last_motion_time > ms2us(80)) { +- tp->hysteresis.enabled = false; +- evdev_log_debug(tp->device, "hysteresis disabled\n"); +- return; +- } +- +- if (tp->queued & TOUCHPAD_EVENT_MOTION) +- tp->hysteresis.last_motion_time = time; +-} +- + static inline void + tp_motion_hysteresis(struct tp_dispatch *tp, + struct tp_touch *t) +@@ -1550,9 +1534,6 @@ static void + tp_handle_state(struct tp_dispatch *tp, + uint64_t time) + { +- if (tp->hysteresis.enabled) +- tp_maybe_disable_hysteresis(tp, time); +- + tp_process_state(tp, time); + tp_post_events(tp, time); + tp_post_process_state(tp, time); +@@ -2942,7 +2923,7 @@ tp_init_hysteresis(struct tp_dispatch *tp) + res_y = tp->device->abs.absinfo_y->resolution; + tp->hysteresis.margin.x = res_x/2; + tp->hysteresis.margin.y = res_y/2; +- tp->hysteresis.enabled = true; ++ tp->hysteresis.enabled = false; + } + + static void +-- +2.14.3 + diff --git a/0003-touchpad-add-wobbling-detection.patch b/0003-touchpad-add-wobbling-detection.patch new file mode 100644 index 0000000..27e20e9 --- /dev/null +++ b/0003-touchpad-add-wobbling-detection.patch @@ -0,0 +1,126 @@ +From 3efd7c82aa4758a012e0bac7a148f270060f0e54 Mon Sep 17 00:00:00 2001 +From: Konstantin Kharlamov +Date: Wed, 21 Feb 2018 20:16:41 +0300 +Subject: [PATCH libinput 3/3] touchpad: add wobbling detection + +The details are explained in comment in the code. That aside, I shall +mention the check is so light, that it shouldn't influence CPU +performance even a bit, and can blindly be kept always enabled. + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104828 + +Signed-off-by: Konstantin Kharlamov +Signed-off-by: Peter Hutterer +Reviewed-by: Konstantin Kharlamov +(cherry picked from commit 400aadd53ac00ca773533d14e231ba192f4141a9) +--- + src/evdev-mt-touchpad.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++- + src/evdev-mt-touchpad.h | 2 ++ + 2 files changed, 59 insertions(+), 1 deletion(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 9f36fcbe..d9ed8ab3 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -135,6 +135,61 @@ tp_motion_history_push(struct tp_touch *t) + t->history.index = motion_index; + } + ++/* Idea: if we got a tuple of *very* quick moves like {Left, Right, ++ * Left}, or {Right, Left, Right}, it means touchpad jitters since no ++ * human can move like that within thresholds. ++ * ++ * We encode left moves as zeroes, and right as ones. We also drop ++ * the array to all zeroes when contraints are not satisfied. Then we ++ * search for the pattern {1,0,1}. It can't match {Left, Right, Left}, ++ * but it does match {Left, Right, Left, Right}, so it's okay. ++ * ++ * This only looks at x changes, y changes are ignored. ++ */ ++static inline void ++tp_detect_wobbling(struct tp_dispatch *tp, ++ struct tp_touch *t, ++ uint64_t time) ++{ ++ int dx, dy; ++ uint64_t dtime; ++ ++ if (!(tp->queued & TOUCHPAD_EVENT_MOTION) || tp->hysteresis.enabled) ++ return; ++ ++ if (t->last_point.x == 0) { /* first invocation */ ++ dx = 0; ++ dy = 0; ++ } else { ++ dx = t->last_point.x - t->point.x; ++ dy = t->last_point.y - t->point.y; ++ } ++ ++ dtime = time - tp->hysteresis.last_motion_time; ++ ++ tp->hysteresis.last_motion_time = time; ++ t->last_point = t->point; ++ ++ if (dx == 0 && dy != 0) /* ignore y-only changes */ ++ return; ++ ++ if (dtime > ms2us(40)) { ++ t->hysteresis.x_motion_history = 0; ++ return; ++ } ++ ++ t->hysteresis.x_motion_history <<= 1; ++ if (dx > 0) { /* right move */ ++ static const char r_l_r = 0x5; /* {Right, Left, Right} */ ++ ++ t->hysteresis.x_motion_history |= 0x1; ++ if (t->hysteresis.x_motion_history == r_l_r) { ++ tp->hysteresis.enabled = true; ++ evdev_log_debug(tp->device, "hysteresis enabled\n"); ++ } ++ } ++} ++ + static inline void + tp_motion_hysteresis(struct tp_dispatch *tp, + struct tp_touch *t) +@@ -264,6 +319,7 @@ tp_new_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) + t->time = time; + t->speed.last_speed = 0; + t->speed.exceeded_count = 0; ++ t->hysteresis.x_motion_history = 0; + tp->queued |= TOUCHPAD_EVENT_MOTION; + } + +@@ -1410,7 +1466,7 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time) + + tp_thumb_detect(tp, t, time); + tp_palm_detect(tp, t, time); +- ++ tp_detect_wobbling(tp, t, time); + tp_motion_hysteresis(tp, t); + tp_motion_history_push(t); + +diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h +index 4c2f156b..467aca57 100644 +--- a/src/evdev-mt-touchpad.h ++++ b/src/evdev-mt-touchpad.h +@@ -147,6 +147,7 @@ struct tp_touch { + bool has_ended; /* TRACKING_ID == -1 */ + bool dirty; + struct device_coords point; ++ struct device_coords last_point; + uint64_t time; + int pressure; + bool is_tool_palm; /* MT_TOOL_PALM */ +@@ -175,6 +176,7 @@ struct tp_touch { + + struct { + struct device_coords center; ++ uint8_t x_motion_history; + } hysteresis; + + /* A pinned touchpoint is the one that pressed the physical button +-- +2.14.3 + diff --git a/libinput.spec b/libinput.spec index a7e6445..cdd120d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.10.1 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,10 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-touchpad-move-the-hysteresis-into-its-own-substruct.patch +Patch02: 0002-touchpad-remove-the-code-for-disabling-hysteresis.patch +Patch03: 0003-touchpad-add-wobbling-detection.patch + BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -109,6 +113,10 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Fri Mar 02 2018 Peter Hutterer 1.10.1-2 +- Fix touchpad jitter by changing from "disable if no jitter" to "enable if + jitter" (#1548550) + * Wed Feb 28 2018 Peter Hutterer 1.10.1-1 - libinput 1.10.1 From b08753422bce4301145a6e4470771744d8199d37 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 7 Mar 2018 16:19:33 +1000 Subject: [PATCH 154/317] libinput 1.10.2 --- .gitignore | 1 + ...he-hysteresis-into-its-own-substruct.patch | 60 --------- ...ve-the-code-for-disabling-hysteresis.patch | 63 --------- 0003-touchpad-add-wobbling-detection.patch | 126 ------------------ libinput.spec | 9 +- sources | 2 +- 6 files changed, 6 insertions(+), 255 deletions(-) delete mode 100644 0001-touchpad-move-the-hysteresis-into-its-own-substruct.patch delete mode 100644 0002-touchpad-remove-the-code-for-disabling-hysteresis.patch delete mode 100644 0003-touchpad-add-wobbling-detection.patch diff --git a/.gitignore b/.gitignore index 385fbdf..333adda 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /libinput-1.9.902.tar.xz /libinput-1.10.0.tar.xz /libinput-1.10.1.tar.xz +/libinput-1.10.2.tar.xz diff --git a/0001-touchpad-move-the-hysteresis-into-its-own-substruct.patch b/0001-touchpad-move-the-hysteresis-into-its-own-substruct.patch deleted file mode 100644 index 53099f9..0000000 --- a/0001-touchpad-move-the-hysteresis-into-its-own-substruct.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 298b28d7f1eec7ebc7cd239915966ca0c322cf54 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 23 Feb 2018 11:21:04 +1000 -Subject: [PATCH libinput 1/3] touchpad: move the hysteresis into its own - substruct - -Prep work for the wobbling detection patch - -Signed-off-by: Peter Hutterer -Reviewed-by: Konstantin Kharlamov -(cherry picked from commit e43bd4ae3a75f72b45c6bab6168bd859ab4a01b3) ---- - src/evdev-mt-touchpad.c | 10 +++++----- - src/evdev-mt-touchpad.h | 4 +++- - 2 files changed, 8 insertions(+), 6 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 7bce8114..a024be28 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -162,16 +162,16 @@ tp_motion_hysteresis(struct tp_dispatch *tp, - return; - - if (t->history.count == 0) { -- t->hysteresis_center = t->point; -+ t->hysteresis.center = t->point; - } else { - x = evdev_hysteresis(x, -- t->hysteresis_center.x, -+ t->hysteresis.center.x, - tp->hysteresis.margin.x); - y = evdev_hysteresis(y, -- t->hysteresis_center.y, -+ t->hysteresis.center.y, - tp->hysteresis.margin.y); -- t->hysteresis_center.x = x; -- t->hysteresis_center.y = y; -+ t->hysteresis.center.x = x; -+ t->hysteresis.center.y = y; - t->point.x = x; - t->point.y = y; - } -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index 442f34a3..4c2f156b 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -173,7 +173,9 @@ struct tp_touch { - unsigned int count; - } history; - -- struct device_coords hysteresis_center; -+ struct { -+ struct device_coords center; -+ } hysteresis; - - /* A pinned touchpoint is the one that pressed the physical button - * on a clickpad. After the release, it won't move until the center --- -2.14.3 - diff --git a/0002-touchpad-remove-the-code-for-disabling-hysteresis.patch b/0002-touchpad-remove-the-code-for-disabling-hysteresis.patch deleted file mode 100644 index 0bdee04..0000000 --- a/0002-touchpad-remove-the-code-for-disabling-hysteresis.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 5f4d975861ace89b47b6d7e265d38103045c1cc6 Mon Sep 17 00:00:00 2001 -From: Konstantin Kharlamov -Date: Sun, 18 Feb 2018 13:09:23 +0300 -Subject: [PATCH libinput 2/3] touchpad: remove the code for disabling - hysteresis - -Signed-off-by: Konstantin Kharlamov -Signed-off-by: Peter Hutterer -Reviewed-by: Konstantin Kharlamov -(cherry picked from commit e8dffbd73a1b3c17716f972f210e420de94028c2) ---- - src/evdev-mt-touchpad.c | 21 +-------------------- - 1 file changed, 1 insertion(+), 20 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index a024be28..9f36fcbe 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -135,22 +135,6 @@ tp_motion_history_push(struct tp_touch *t) - t->history.index = motion_index; - } - --static inline void --tp_maybe_disable_hysteresis(struct tp_dispatch *tp, uint64_t time) --{ -- /* If the finger is down for 80ms without seeing motion events, -- the firmware filters and we don't need a software hysteresis */ -- if (tp->nfingers_down >= 1 && -- time - tp->hysteresis.last_motion_time > ms2us(80)) { -- tp->hysteresis.enabled = false; -- evdev_log_debug(tp->device, "hysteresis disabled\n"); -- return; -- } -- -- if (tp->queued & TOUCHPAD_EVENT_MOTION) -- tp->hysteresis.last_motion_time = time; --} -- - static inline void - tp_motion_hysteresis(struct tp_dispatch *tp, - struct tp_touch *t) -@@ -1550,9 +1534,6 @@ static void - tp_handle_state(struct tp_dispatch *tp, - uint64_t time) - { -- if (tp->hysteresis.enabled) -- tp_maybe_disable_hysteresis(tp, time); -- - tp_process_state(tp, time); - tp_post_events(tp, time); - tp_post_process_state(tp, time); -@@ -2942,7 +2923,7 @@ tp_init_hysteresis(struct tp_dispatch *tp) - res_y = tp->device->abs.absinfo_y->resolution; - tp->hysteresis.margin.x = res_x/2; - tp->hysteresis.margin.y = res_y/2; -- tp->hysteresis.enabled = true; -+ tp->hysteresis.enabled = false; - } - - static void --- -2.14.3 - diff --git a/0003-touchpad-add-wobbling-detection.patch b/0003-touchpad-add-wobbling-detection.patch deleted file mode 100644 index 27e20e9..0000000 --- a/0003-touchpad-add-wobbling-detection.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 3efd7c82aa4758a012e0bac7a148f270060f0e54 Mon Sep 17 00:00:00 2001 -From: Konstantin Kharlamov -Date: Wed, 21 Feb 2018 20:16:41 +0300 -Subject: [PATCH libinput 3/3] touchpad: add wobbling detection - -The details are explained in comment in the code. That aside, I shall -mention the check is so light, that it shouldn't influence CPU -performance even a bit, and can blindly be kept always enabled. - -Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104828 - -Signed-off-by: Konstantin Kharlamov -Signed-off-by: Peter Hutterer -Reviewed-by: Konstantin Kharlamov -(cherry picked from commit 400aadd53ac00ca773533d14e231ba192f4141a9) ---- - src/evdev-mt-touchpad.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++- - src/evdev-mt-touchpad.h | 2 ++ - 2 files changed, 59 insertions(+), 1 deletion(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 9f36fcbe..d9ed8ab3 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -135,6 +135,61 @@ tp_motion_history_push(struct tp_touch *t) - t->history.index = motion_index; - } - -+/* Idea: if we got a tuple of *very* quick moves like {Left, Right, -+ * Left}, or {Right, Left, Right}, it means touchpad jitters since no -+ * human can move like that within thresholds. -+ * -+ * We encode left moves as zeroes, and right as ones. We also drop -+ * the array to all zeroes when contraints are not satisfied. Then we -+ * search for the pattern {1,0,1}. It can't match {Left, Right, Left}, -+ * but it does match {Left, Right, Left, Right}, so it's okay. -+ * -+ * This only looks at x changes, y changes are ignored. -+ */ -+static inline void -+tp_detect_wobbling(struct tp_dispatch *tp, -+ struct tp_touch *t, -+ uint64_t time) -+{ -+ int dx, dy; -+ uint64_t dtime; -+ -+ if (!(tp->queued & TOUCHPAD_EVENT_MOTION) || tp->hysteresis.enabled) -+ return; -+ -+ if (t->last_point.x == 0) { /* first invocation */ -+ dx = 0; -+ dy = 0; -+ } else { -+ dx = t->last_point.x - t->point.x; -+ dy = t->last_point.y - t->point.y; -+ } -+ -+ dtime = time - tp->hysteresis.last_motion_time; -+ -+ tp->hysteresis.last_motion_time = time; -+ t->last_point = t->point; -+ -+ if (dx == 0 && dy != 0) /* ignore y-only changes */ -+ return; -+ -+ if (dtime > ms2us(40)) { -+ t->hysteresis.x_motion_history = 0; -+ return; -+ } -+ -+ t->hysteresis.x_motion_history <<= 1; -+ if (dx > 0) { /* right move */ -+ static const char r_l_r = 0x5; /* {Right, Left, Right} */ -+ -+ t->hysteresis.x_motion_history |= 0x1; -+ if (t->hysteresis.x_motion_history == r_l_r) { -+ tp->hysteresis.enabled = true; -+ evdev_log_debug(tp->device, "hysteresis enabled\n"); -+ } -+ } -+} -+ - static inline void - tp_motion_hysteresis(struct tp_dispatch *tp, - struct tp_touch *t) -@@ -264,6 +319,7 @@ tp_new_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) - t->time = time; - t->speed.last_speed = 0; - t->speed.exceeded_count = 0; -+ t->hysteresis.x_motion_history = 0; - tp->queued |= TOUCHPAD_EVENT_MOTION; - } - -@@ -1410,7 +1466,7 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time) - - tp_thumb_detect(tp, t, time); - tp_palm_detect(tp, t, time); -- -+ tp_detect_wobbling(tp, t, time); - tp_motion_hysteresis(tp, t); - tp_motion_history_push(t); - -diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h -index 4c2f156b..467aca57 100644 ---- a/src/evdev-mt-touchpad.h -+++ b/src/evdev-mt-touchpad.h -@@ -147,6 +147,7 @@ struct tp_touch { - bool has_ended; /* TRACKING_ID == -1 */ - bool dirty; - struct device_coords point; -+ struct device_coords last_point; - uint64_t time; - int pressure; - bool is_tool_palm; /* MT_TOOL_PALM */ -@@ -175,6 +176,7 @@ struct tp_touch { - - struct { - struct device_coords center; -+ uint8_t x_motion_history; - } hysteresis; - - /* A pinned touchpoint is the one that pressed the physical button --- -2.14.3 - diff --git a/libinput.spec b/libinput.spec index cdd120d..50aa941 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.10.1 +Version: 1.10.2 Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -18,10 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-touchpad-move-the-hysteresis-into-its-own-substruct.patch -Patch02: 0002-touchpad-remove-the-code-for-disabling-hysteresis.patch -Patch03: 0003-touchpad-add-wobbling-detection.patch - BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -113,6 +109,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Wed Mar 07 2018 Peter Hutterer 1.10.2-2 +- libinput 1.10.2 + * Fri Mar 02 2018 Peter Hutterer 1.10.1-2 - Fix touchpad jitter by changing from "disable if no jitter" to "enable if jitter" (#1548550) diff --git a/sources b/sources index f3c1e8b..2dbd3d3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.10.1.tar.xz) = 69e7cd12f3d686d1b09afd93fe072ddd6f8c9a1f04c0a651c7dd02c5a20b3f8163c5b787b41bf3ae91db0da7d3e2958d315d6c9a2875259c62b0d290ac89d1fb +SHA512 (libinput-1.10.2.tar.xz) = c0418b2e0919fe085839a9ce7d4f155ea7a76f5395f5ed0ab7ab2f2226a2085b10ada5006bfb64c65d98a5fcc19395f722de379f0977a6c52a3630a9c0ad556e From 1778ef6300331865a71042a36be7a42c4a80539c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 Mar 2018 10:18:00 +1000 Subject: [PATCH 155/317] Add BuildRequires gcc-c++, needed for a test build --- libinput.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 50aa941..f8186f0 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.10.2 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -19,7 +19,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} %endif BuildRequires: git-core -BuildRequires: gcc +BuildRequires: gcc gcc-c++ BuildRequires: meson BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(mtdev) >= 1.1.0 @@ -109,6 +109,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Thu Mar 08 2018 Peter Hutterer 1.10.2-3 +- Add BuildRequires gcc-c++, needed for a test build + * Wed Mar 07 2018 Peter Hutterer 1.10.2-2 - libinput 1.10.2 From d99aa73a3cd3ed752a13bdfe741ffca9b8e646dd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 12 Mar 2018 12:03:09 +1000 Subject: [PATCH 156/317] Fix occasional crashes on gestures when libinput loses track of hovering fake fingers --- ...-hovering-touches-in-maybe_end_touch.patch | 60 +++++++++++++++++++ libinput.spec | 8 ++- 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-end-hovering-touches-in-maybe_end_touch.patch diff --git a/0001-touchpad-end-hovering-touches-in-maybe_end_touch.patch b/0001-touchpad-end-hovering-touches-in-maybe_end_touch.patch new file mode 100644 index 0000000..3080187 --- /dev/null +++ b/0001-touchpad-end-hovering-touches-in-maybe_end_touch.patch @@ -0,0 +1,60 @@ +From 42e8813a632699e55f8287430f458ae6f5312146 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 12 Mar 2018 10:33:21 +1000 +Subject: [PATCH libinput] touchpad: end hovering touches in maybe_end_touch + +Otherwise a hovering touch stays around forever even after the finger has +discontinued. This doesn't matter on slots, but for fake fingers the finger +may suddenly end up being forced down/up as a result of the pressure changes +on the real fingers. + +So when in maybe_end_touch, switch them back to NONE immediately - hovering +touches do not need to trigger a TOUCH_END event. + +https://bugs.freedesktop.org/show_bug.cgi?id=105258 + +Signed-off-by: Peter Hutterer +(cherry picked from commit d8db6b5927f61460b2991479a85056256c819485) +--- + src/evdev-mt-touchpad.c | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 3080e8a8..4ebadc25 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -345,22 +345,26 @@ tp_maybe_end_touch(struct tp_dispatch *tp, + switch (t->state) { + case TOUCH_NONE: + case TOUCH_MAYBE_END: +- case TOUCH_HOVERING: + return; + case TOUCH_END: + evdev_log_bug_libinput(tp->device, + "touch already in TOUCH_END\n"); + return; ++ case TOUCH_HOVERING: + case TOUCH_BEGIN: + case TOUCH_UPDATE: + break; + } + +- t->dirty = true; +- t->state = TOUCH_MAYBE_END; ++ if (t->state != TOUCH_HOVERING) { ++ assert(tp->nfingers_down >= 1); ++ tp->nfingers_down--; ++ t->state = TOUCH_MAYBE_END; ++ } else { ++ t->state = TOUCH_NONE; ++ } + +- assert(tp->nfingers_down >= 1); +- tp->nfingers_down--; ++ t->dirty = true; + } + + /** +-- +2.14.3 + diff --git a/libinput.spec b/libinput.spec index f8186f0..385b61d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.10.2 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-touchpad-end-hovering-touches-in-maybe_end_touch.patch + BuildRequires: git-core BuildRequires: gcc gcc-c++ BuildRequires: meson @@ -109,6 +111,10 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Mon Mar 12 2018 Peter Hutterer 1.10.2-4 +- Fix occasional crashes on gestures when libinput loses track of hovering + fake fingers + * Thu Mar 08 2018 Peter Hutterer 1.10.2-3 - Add BuildRequires gcc-c++, needed for a test build From 9a10f4b8076e19868cd795d3cfb2e874b02ed455 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 Mar 2018 21:05:44 +1000 Subject: [PATCH 157/317] libinput 1.10.3 --- .gitignore | 1 + ...-hovering-touches-in-maybe_end_touch.patch | 60 ------------------- libinput.spec | 9 +-- sources | 2 +- 4 files changed, 7 insertions(+), 65 deletions(-) delete mode 100644 0001-touchpad-end-hovering-touches-in-maybe_end_touch.patch diff --git a/.gitignore b/.gitignore index 333adda..70fbda4 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /libinput-1.10.0.tar.xz /libinput-1.10.1.tar.xz /libinput-1.10.2.tar.xz +/libinput-1.10.3.tar.xz diff --git a/0001-touchpad-end-hovering-touches-in-maybe_end_touch.patch b/0001-touchpad-end-hovering-touches-in-maybe_end_touch.patch deleted file mode 100644 index 3080187..0000000 --- a/0001-touchpad-end-hovering-touches-in-maybe_end_touch.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 42e8813a632699e55f8287430f458ae6f5312146 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 12 Mar 2018 10:33:21 +1000 -Subject: [PATCH libinput] touchpad: end hovering touches in maybe_end_touch - -Otherwise a hovering touch stays around forever even after the finger has -discontinued. This doesn't matter on slots, but for fake fingers the finger -may suddenly end up being forced down/up as a result of the pressure changes -on the real fingers. - -So when in maybe_end_touch, switch them back to NONE immediately - hovering -touches do not need to trigger a TOUCH_END event. - -https://bugs.freedesktop.org/show_bug.cgi?id=105258 - -Signed-off-by: Peter Hutterer -(cherry picked from commit d8db6b5927f61460b2991479a85056256c819485) ---- - src/evdev-mt-touchpad.c | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index 3080e8a8..4ebadc25 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -345,22 +345,26 @@ tp_maybe_end_touch(struct tp_dispatch *tp, - switch (t->state) { - case TOUCH_NONE: - case TOUCH_MAYBE_END: -- case TOUCH_HOVERING: - return; - case TOUCH_END: - evdev_log_bug_libinput(tp->device, - "touch already in TOUCH_END\n"); - return; -+ case TOUCH_HOVERING: - case TOUCH_BEGIN: - case TOUCH_UPDATE: - break; - } - -- t->dirty = true; -- t->state = TOUCH_MAYBE_END; -+ if (t->state != TOUCH_HOVERING) { -+ assert(tp->nfingers_down >= 1); -+ tp->nfingers_down--; -+ t->state = TOUCH_MAYBE_END; -+ } else { -+ t->state = TOUCH_NONE; -+ } - -- assert(tp->nfingers_down >= 1); -- tp->nfingers_down--; -+ t->dirty = true; - } - - /** --- -2.14.3 - diff --git a/libinput.spec b/libinput.spec index 385b61d..6d4d9d6 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.10.2 -Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.10.3 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,8 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-touchpad-end-hovering-touches-in-maybe_end_touch.patch - BuildRequires: git-core BuildRequires: gcc gcc-c++ BuildRequires: meson @@ -111,6 +109,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Wed Mar 14 2018 Peter Hutterer 1.10.3-1 +- libinput 1.10.3 + * Mon Mar 12 2018 Peter Hutterer 1.10.2-4 - Fix occasional crashes on gestures when libinput loses track of hovering fake fingers diff --git a/sources b/sources index 2dbd3d3..ae22223 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.10.2.tar.xz) = c0418b2e0919fe085839a9ce7d4f155ea7a76f5395f5ed0ab7ab2f2226a2085b10ada5006bfb64c65d98a5fcc19395f722de379f0977a6c52a3630a9c0ad556e +SHA512 (libinput-1.10.3.tar.xz) = 4c73673e138a7aff9d6f2d189b8afdfb51c868eca0487c8c487ffd3bb48849994a9095fbd4c5c725ee17fafc2a85298106e0cc7b59b4a8cd13ec28f65d15c01d From b4657862bd3068d2f01d54a98865a12201575cf4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 9 Apr 2018 14:56:29 +1000 Subject: [PATCH 158/317] libinput 1.10.4 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 70fbda4..2125d0b 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /libinput-1.10.1.tar.xz /libinput-1.10.2.tar.xz /libinput-1.10.3.tar.xz +/libinput-1.10.4.tar.xz diff --git a/libinput.spec b/libinput.spec index 6d4d9d6..e3828a5 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.10.3 +Version: 1.10.4 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -109,6 +109,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Mon Apr 09 2018 Peter Hutterer 1.10.4-1 +- libinput 1.10.4 + * Wed Mar 14 2018 Peter Hutterer 1.10.3-1 - libinput 1.10.3 diff --git a/sources b/sources index ae22223..e890da2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.10.3.tar.xz) = 4c73673e138a7aff9d6f2d189b8afdfb51c868eca0487c8c487ffd3bb48849994a9095fbd4c5c725ee17fafc2a85298106e0cc7b59b4a8cd13ec28f65d15c01d +SHA512 (libinput-1.10.4.tar.xz) = b6f24f135e2396d53c0576a3b3887cd3736f2209fc448c6419cd1f1d7ee6aedff8e067f4b780f50ada5a4418d5bc47a4010cb328f366ee7fd1a2dba1ffc96c38 From a8a7e75373cc15bba39262c5e01615ecf55ed078 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 19 Apr 2018 11:04:57 +1000 Subject: [PATCH 159/317] Disable ABS_MT_TOOL_PALM on the Lenovo Carbon X1 6th (#1565692) --- ...S_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch | 78 +++++++++++++++++++ libinput.spec | 7 +- 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 0001-evdev-disable-ABS_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch diff --git a/0001-evdev-disable-ABS_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch b/0001-evdev-disable-ABS_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch new file mode 100644 index 0000000..fe27148 --- /dev/null +++ b/0001-evdev-disable-ABS_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch @@ -0,0 +1,78 @@ +From 0ae123afac8abffd843efcc899ef4519611f1ee2 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 19 Apr 2018 11:00:51 +1000 +Subject: [PATCH libinput] evdev: disable ABS_MT_TOOL_PALM on the Lenovo X1 + Carbon 6th gen + +This device randomly decides that a touch is now a palm, based on +the moon phase, the user's starsign and possibly what the dog had for +breakfast. Since libinput assumes that a touchpad that labels a touch as palm +has reasons to do so, let's unassume this for this device by disabling that +axis altogether and relying on the touch pressure only. + +https://bugzilla.redhat.com/show_bug.cgi?id=1565692 + +Signed-off-by: Peter Hutterer +(cherry picked from commit 762c1726f1b633d46ce0415a43fcee93453b8b7a) +--- + src/evdev.c | 8 ++++++++ + src/evdev.h | 1 + + udev/90-libinput-model-quirks.hwdb | 4 ++++ + 3 files changed, 13 insertions(+) + +diff --git a/src/evdev.c b/src/evdev.c +index b98dc32d..8dbf12c6 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1265,6 +1265,7 @@ evdev_read_model_flags(struct evdev_device *device) + MODEL(LOGITECH_MARBLE_MOUSE), + MODEL(TABLET_NO_PROXIMITY_OUT), + MODEL(MS_NANO_TRANSCEIVER), ++ MODEL(LENOVO_CARBON_X1_6TH), + #undef MODEL + { "ID_INPUT_TRACKBALL", EVDEV_MODEL_TRACKBALL }, + { NULL, EVDEV_MODEL_DEFAULT }, +@@ -1861,6 +1862,13 @@ evdev_pre_configure_model_quirks(struct evdev_device *device) + /* Logitech Marble Mouse claims to have a middle button */ + if (device->model_flags & EVDEV_MODEL_LOGITECH_MARBLE_MOUSE) + libevdev_disable_event_code(device->evdev, EV_KEY, BTN_MIDDLE); ++ ++ /* Lenovo Carbon X1 6th gen sends bogus ABS_MT_TOOL_TYPE events for ++ * MT_TOOL_PALM */ ++ if (device->model_flags & EVDEV_MODEL_LENOVO_CARBON_X1_6TH) ++ libevdev_disable_event_code(device->evdev, ++ EV_ABS, ++ ABS_MT_TOOL_TYPE); + } + + static void +diff --git a/src/evdev.h b/src/evdev.h +index 060020f9..07941c3d 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -111,6 +111,7 @@ enum evdev_device_model { + EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD = (1 << 9), + EVDEV_MODEL_JUMPING_SEMI_MT = (1 << 10), + EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), ++ EVDEV_MODEL_LENOVO_CARBON_X1_6TH = (1 << 13), + EVDEV_MODEL_CYBORG_RAT = (1 << 14), + EVDEV_MODEL_HP_STREAM11_TOUCHPAD = (1 << 16), + EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17), +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index 20975aec..060018b0 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -210,6 +210,10 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd + libinput:keyboard:input:b0003v17EFp6047* + LIBINPUT_ATTR_KEYBOARD_INTEGRATION=external + ++# Lenovo Carbon X1 6th gen (RMI4 only, PS/2 is broken on this device) ++libinput:name:Synaptics TM3288-010:dmi:*svnLenovo:*pvrThinkPadX1Carbon6th:* ++ LIBINPUT_MODEL_LENOVO_CARBON_X1_6TH=1 ++ + ########################################## + # Logitech + ########################################## +-- +2.14.3 + diff --git a/libinput.spec b/libinput.spec index e3828a5..1ba78ce 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.10.4 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-evdev-disable-ABS_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch + BuildRequires: git-core BuildRequires: gcc gcc-c++ BuildRequires: meson @@ -109,6 +111,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Thu Apr 19 2018 Peter Hutterer 1.10.4-2 +- Disable ABS_MT_TOOL_PALM on the Lenovo Carbon X1 6th (#1565692) + * Mon Apr 09 2018 Peter Hutterer 1.10.4-1 - libinput 1.10.4 From 09a826f5ee18749b2436cd4929d2e49a1b1a8f1b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 19 Apr 2018 12:31:15 +1000 Subject: [PATCH 160/317] libinput 1.10.5 --- .gitignore | 1 + ...S_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch | 22 +++++++++---------- libinput.spec | 7 ++++-- sources | 2 +- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 2125d0b..f0297c4 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ /libinput-1.10.2.tar.xz /libinput-1.10.3.tar.xz /libinput-1.10.4.tar.xz +/libinput-1.10.5.tar.xz diff --git a/0001-evdev-disable-ABS_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch b/0001-evdev-disable-ABS_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch index fe27148..8d14de1 100644 --- a/0001-evdev-disable-ABS_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch +++ b/0001-evdev-disable-ABS_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch @@ -1,4 +1,4 @@ -From 0ae123afac8abffd843efcc899ef4519611f1ee2 Mon Sep 17 00:00:00 2001 +From 4fb3f9e1d4de48853e2cdc43300e4d1fa41550b3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 19 Apr 2018 11:00:51 +1000 Subject: [PATCH libinput] evdev: disable ABS_MT_TOOL_PALM on the Lenovo X1 @@ -21,10 +21,10 @@ Signed-off-by: Peter Hutterer 3 files changed, 13 insertions(+) diff --git a/src/evdev.c b/src/evdev.c -index b98dc32d..8dbf12c6 100644 +index 13b2b13c..a145a03b 100644 --- a/src/evdev.c +++ b/src/evdev.c -@@ -1265,6 +1265,7 @@ evdev_read_model_flags(struct evdev_device *device) +@@ -1272,6 +1272,7 @@ evdev_read_model_flags(struct evdev_device *device) MODEL(LOGITECH_MARBLE_MOUSE), MODEL(TABLET_NO_PROXIMITY_OUT), MODEL(MS_NANO_TRANSCEIVER), @@ -32,7 +32,7 @@ index b98dc32d..8dbf12c6 100644 #undef MODEL { "ID_INPUT_TRACKBALL", EVDEV_MODEL_TRACKBALL }, { NULL, EVDEV_MODEL_DEFAULT }, -@@ -1861,6 +1862,13 @@ evdev_pre_configure_model_quirks(struct evdev_device *device) +@@ -1868,6 +1869,13 @@ evdev_pre_configure_model_quirks(struct evdev_device *device) /* Logitech Marble Mouse claims to have a middle button */ if (device->model_flags & EVDEV_MODEL_LOGITECH_MARBLE_MOUSE) libevdev_disable_event_code(device->evdev, EV_KEY, BTN_MIDDLE); @@ -47,24 +47,24 @@ index b98dc32d..8dbf12c6 100644 static void diff --git a/src/evdev.h b/src/evdev.h -index 060020f9..07941c3d 100644 +index 496bea7f..cdcaf8f9 100644 --- a/src/evdev.h +++ b/src/evdev.h -@@ -111,6 +111,7 @@ enum evdev_device_model { - EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD = (1 << 9), +@@ -112,6 +112,7 @@ enum evdev_device_model { EVDEV_MODEL_JUMPING_SEMI_MT = (1 << 10), + EVDEV_MODEL_LOGITECH_K400 = (1 << 11), EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), + EVDEV_MODEL_LENOVO_CARBON_X1_6TH = (1 << 13), EVDEV_MODEL_CYBORG_RAT = (1 << 14), EVDEV_MODEL_HP_STREAM11_TOUCHPAD = (1 << 16), EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17), diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index 20975aec..060018b0 100644 +index 7470973f..6f625017 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb -@@ -210,6 +210,10 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd - libinput:keyboard:input:b0003v17EFp6047* - LIBINPUT_ATTR_KEYBOARD_INTEGRATION=external +@@ -232,6 +232,10 @@ libinput:keyboard:input:b0003v17EFp6047* + libinput:name:*ALPS TrackPoint*:svnLENOVO:*:pvrThinkPadX280:* + LIBINPUT_ATTR_TRACKPOINT_RANGE=70 +# Lenovo Carbon X1 6th gen (RMI4 only, PS/2 is broken on this device) +libinput:name:Synaptics TM3288-010:dmi:*svnLenovo:*pvrThinkPadX1Carbon6th:* diff --git a/libinput.spec b/libinput.spec index 1ba78ce..c0940d0 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.10.4 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.10.5 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -111,6 +111,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Thu Apr 19 2018 Peter Hutterer 1.10.5-1 +- libinput 1.10.5 + * Thu Apr 19 2018 Peter Hutterer 1.10.4-2 - Disable ABS_MT_TOOL_PALM on the Lenovo Carbon X1 6th (#1565692) diff --git a/sources b/sources index e890da2..2ce19c2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.10.4.tar.xz) = b6f24f135e2396d53c0576a3b3887cd3736f2209fc448c6419cd1f1d7ee6aedff8e067f4b780f50ada5a4418d5bc47a4010cb328f366ee7fd1a2dba1ffc96c38 +SHA512 (libinput-1.10.5.tar.xz) = 61f19ea777b523f0e76869b8e7dbbff5e51132d3c856c6edb9915a695f7903256228e71be2567642866923a800f1283bdd5aff97266ac26c2e42dfce0bffa50b From ecb3f850920259a9951259659a685f1c10e8b64d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 27 Apr 2018 15:06:13 +1000 Subject: [PATCH 161/317] Fix the T460s halting cursor problem (#1572394) --- ...-trackpoint-event-counter-for-the-T4.patch | 108 ++++++++++++++++++ libinput.spec | 6 +- 2 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch diff --git a/0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch b/0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch new file mode 100644 index 0000000..7866690 --- /dev/null +++ b/0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch @@ -0,0 +1,108 @@ +From d19f775c26223b2482c38c66d73969cfb6556ff9 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 27 Apr 2018 14:40:57 +1000 +Subject: [PATCH libinput] touchpad: fix the trackpoint event counter for the + T460s + +Introduced in 416fa44d80b0f2c53b652ddfa35dd4a156a65c65 but there was a logic +error: we claimed to require 3 events from a trackpoint before stopping the +touchpad but the timer was only set when we actually stopped the touchpad. So +if a trackpoint sends a single event every second, we'd disable the touchpad +after 3 seconds for the duration of the timeout, then again 3 seconds later, +etc. + +Fix this by always setting the timeout and resetting the event counter if no +activity happened. + +Signed-off-by: Peter Hutterer +(cherry picked from commit 3b019959c2b33de05c5aa073730300e6897b4268) +--- + src/evdev-mt-touchpad.c | 11 +++++++---- + test/test-trackpoint.c | 30 ++++++++++++++++++++++++++++++ + 2 files changed, 37 insertions(+), 4 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index cc01976a..953b475d 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -1912,8 +1912,10 @@ tp_trackpoint_timeout(uint64_t now, void *data) + { + struct tp_dispatch *tp = data; + +- tp_tap_resume(tp, now); +- tp->palm.trackpoint_active = false; ++ if (tp->palm.trackpoint_active) { ++ tp_tap_resume(tp, now); ++ tp->palm.trackpoint_active = false; ++ } + tp->palm.trackpoint_event_count = 0; + } + +@@ -1930,6 +1932,9 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data) + tp->palm.trackpoint_last_event_time = time; + tp->palm.trackpoint_event_count++; + ++ libinput_timer_set(&tp->palm.trackpoint_timer, ++ time + DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT); ++ + /* Require at least three events before enabling palm detection */ + if (tp->palm.trackpoint_event_count < 3) + return; +@@ -1939,8 +1944,6 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data) + tp->palm.trackpoint_active = true; + } + +- libinput_timer_set(&tp->palm.trackpoint_timer, +- time + DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT); + } + + static void +diff --git a/test/test-trackpoint.c b/test/test-trackpoint.c +index 46a66893..5cca9bc9 100644 +--- a/test/test-trackpoint.c ++++ b/test/test-trackpoint.c +@@ -379,6 +379,35 @@ START_TEST(trackpoint_palmdetect_require_min_events) + } + END_TEST + ++START_TEST(trackpoint_palmdetect_require_min_events_timeout) ++{ ++ struct litest_device *trackpoint = litest_current_device(); ++ struct litest_device *touchpad; ++ struct libinput *li = trackpoint->libinput; ++ ++ touchpad = litest_add_device(li, LITEST_SYNAPTICS_I2C); ++ litest_drain_events(li); ++ ++ for (int i = 0; i < 10; i++) { ++ /* A single event does not trigger palm detection */ ++ litest_event(trackpoint, EV_REL, REL_X, 1); ++ litest_event(trackpoint, EV_REL, REL_Y, 1); ++ litest_event(trackpoint, EV_SYN, SYN_REPORT, 0); ++ libinput_dispatch(li); ++ litest_drain_events(li); ++ ++ litest_touch_down(touchpad, 0, 30, 30); ++ litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10, 1); ++ litest_touch_up(touchpad, 0); ++ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); ++ ++ litest_timeout_trackpoint(); ++ } ++ ++ litest_delete_device(touchpad); ++} ++END_TEST ++ + void + litest_setup_tests_trackpoint(void) + { +@@ -393,4 +422,5 @@ litest_setup_tests_trackpoint(void) + litest_add("trackpoint:palmdetect", trackpoint_palmdetect, LITEST_POINTINGSTICK, LITEST_ANY); + litest_add("trackpoint:palmdetect", trackpoint_palmdetect_resume_touch, LITEST_POINTINGSTICK, LITEST_ANY); + litest_add("trackpoint:palmdetect", trackpoint_palmdetect_require_min_events, LITEST_POINTINGSTICK, LITEST_ANY); ++ litest_add("trackpoint:palmdetect", trackpoint_palmdetect_require_min_events_timeout, LITEST_POINTINGSTICK, LITEST_ANY); + } +-- +2.14.3 + diff --git a/libinput.spec b/libinput.spec index c0940d0..515e65c 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.10.5 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -19,6 +19,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} %endif Patch01: 0001-evdev-disable-ABS_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch +Patch02: 0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch BuildRequires: git-core BuildRequires: gcc gcc-c++ @@ -111,6 +112,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Fri Apr 27 2018 Peter Hutterer 1.10.5-2 +- Fix the T460s halting cursor problem (#1572394) + * Thu Apr 19 2018 Peter Hutterer 1.10.5-1 - libinput 1.10.5 From f2700b6bc25b8f81cc0862e4ecc9aa96c38651ef Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 27 Apr 2018 16:00:18 +1000 Subject: [PATCH 162/317] Fix the T460s halting cursor problem harder (#1572394) --- ...-trackpoint-event-counter-for-the-T4.patch | 40 ++++++++++--------- libinput.spec | 5 ++- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch b/0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch index 7866690..f0c7dba 100644 --- a/0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch +++ b/0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch @@ -1,4 +1,4 @@ -From d19f775c26223b2482c38c66d73969cfb6556ff9 Mon Sep 17 00:00:00 2001 +From 4172888e91281df81b226920a28117d24ee57266 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 27 Apr 2018 14:40:57 +1000 Subject: [PATCH libinput] touchpad: fix the trackpoint event counter for the @@ -15,17 +15,25 @@ Fix this by always setting the timeout and resetting the event counter if no activity happened. Signed-off-by: Peter Hutterer -(cherry picked from commit 3b019959c2b33de05c5aa073730300e6897b4268) +(cherry picked from commit c0fd857def5547f612d2c14ae57dda1cef47a92c) --- - src/evdev-mt-touchpad.c | 11 +++++++---- + src/evdev-mt-touchpad.c | 13 ++++++++++--- test/test-trackpoint.c | 30 ++++++++++++++++++++++++++++++ - 2 files changed, 37 insertions(+), 4 deletions(-) + 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index cc01976a..953b475d 100644 +index cc01976a..25520526 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c -@@ -1912,8 +1912,10 @@ tp_trackpoint_timeout(uint64_t now, void *data) +@@ -31,6 +31,7 @@ + #include "evdev-mt-touchpad.h" + + #define DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT ms2us(300) ++#define DEFAULT_TRACKPOINT_EVENT_TIMEOUT ms2us(40) + #define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_1 ms2us(200) + #define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_2 ms2us(500) + #define THUMB_MOVE_TIMEOUT ms2us(300) +@@ -1912,8 +1913,10 @@ tp_trackpoint_timeout(uint64_t now, void *data) { struct tp_dispatch *tp = data; @@ -38,25 +46,21 @@ index cc01976a..953b475d 100644 tp->palm.trackpoint_event_count = 0; } -@@ -1930,6 +1932,9 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data) +@@ -1930,9 +1933,13 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data) tp->palm.trackpoint_last_event_time = time; tp->palm.trackpoint_event_count++; -+ libinput_timer_set(&tp->palm.trackpoint_timer, -+ time + DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT); + /* Require at least three events before enabling palm detection */ - if (tp->palm.trackpoint_event_count < 3) +- if (tp->palm.trackpoint_event_count < 3) ++ if (tp->palm.trackpoint_event_count < 3) { ++ libinput_timer_set(&tp->palm.trackpoint_timer, ++ time + DEFAULT_TRACKPOINT_EVENT_TIMEOUT); return; -@@ -1939,8 +1944,6 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data) - tp->palm.trackpoint_active = true; - } ++ } -- libinput_timer_set(&tp->palm.trackpoint_timer, -- time + DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT); - } - - static void + if (!tp->palm.trackpoint_active) { + tp_stop_actions(tp, time); diff --git a/test/test-trackpoint.c b/test/test-trackpoint.c index 46a66893..5cca9bc9 100644 --- a/test/test-trackpoint.c diff --git a/libinput.spec b/libinput.spec index 515e65c..922c29a 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.10.5 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -112,6 +112,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Fri Apr 27 2018 Peter Hutterer 1.10.5-3 +- Fix the T460s halting cursor problem harder (#1572394) + * Fri Apr 27 2018 Peter Hutterer 1.10.5-2 - Fix the T460s halting cursor problem (#1572394) From f11bd4ba52c717e00a3755141dbc0a8d7ab45cba Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 1 May 2018 17:52:30 +1000 Subject: [PATCH 163/317] libinput 1.10.6 --- .gitignore | 1 + ...S_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch | 78 ------------------- libinput.spec | 8 +- sources | 2 +- 4 files changed, 7 insertions(+), 82 deletions(-) delete mode 100644 0001-evdev-disable-ABS_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch diff --git a/.gitignore b/.gitignore index f0297c4..8cb5f9d 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ /libinput-1.10.3.tar.xz /libinput-1.10.4.tar.xz /libinput-1.10.5.tar.xz +/libinput-1.10.6.tar.xz diff --git a/0001-evdev-disable-ABS_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch b/0001-evdev-disable-ABS_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch deleted file mode 100644 index 8d14de1..0000000 --- a/0001-evdev-disable-ABS_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 4fb3f9e1d4de48853e2cdc43300e4d1fa41550b3 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 19 Apr 2018 11:00:51 +1000 -Subject: [PATCH libinput] evdev: disable ABS_MT_TOOL_PALM on the Lenovo X1 - Carbon 6th gen - -This device randomly decides that a touch is now a palm, based on -the moon phase, the user's starsign and possibly what the dog had for -breakfast. Since libinput assumes that a touchpad that labels a touch as palm -has reasons to do so, let's unassume this for this device by disabling that -axis altogether and relying on the touch pressure only. - -https://bugzilla.redhat.com/show_bug.cgi?id=1565692 - -Signed-off-by: Peter Hutterer -(cherry picked from commit 762c1726f1b633d46ce0415a43fcee93453b8b7a) ---- - src/evdev.c | 8 ++++++++ - src/evdev.h | 1 + - udev/90-libinput-model-quirks.hwdb | 4 ++++ - 3 files changed, 13 insertions(+) - -diff --git a/src/evdev.c b/src/evdev.c -index 13b2b13c..a145a03b 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1272,6 +1272,7 @@ evdev_read_model_flags(struct evdev_device *device) - MODEL(LOGITECH_MARBLE_MOUSE), - MODEL(TABLET_NO_PROXIMITY_OUT), - MODEL(MS_NANO_TRANSCEIVER), -+ MODEL(LENOVO_CARBON_X1_6TH), - #undef MODEL - { "ID_INPUT_TRACKBALL", EVDEV_MODEL_TRACKBALL }, - { NULL, EVDEV_MODEL_DEFAULT }, -@@ -1868,6 +1869,13 @@ evdev_pre_configure_model_quirks(struct evdev_device *device) - /* Logitech Marble Mouse claims to have a middle button */ - if (device->model_flags & EVDEV_MODEL_LOGITECH_MARBLE_MOUSE) - libevdev_disable_event_code(device->evdev, EV_KEY, BTN_MIDDLE); -+ -+ /* Lenovo Carbon X1 6th gen sends bogus ABS_MT_TOOL_TYPE events for -+ * MT_TOOL_PALM */ -+ if (device->model_flags & EVDEV_MODEL_LENOVO_CARBON_X1_6TH) -+ libevdev_disable_event_code(device->evdev, -+ EV_ABS, -+ ABS_MT_TOOL_TYPE); - } - - static void -diff --git a/src/evdev.h b/src/evdev.h -index 496bea7f..cdcaf8f9 100644 ---- a/src/evdev.h -+++ b/src/evdev.h -@@ -112,6 +112,7 @@ enum evdev_device_model { - EVDEV_MODEL_JUMPING_SEMI_MT = (1 << 10), - EVDEV_MODEL_LOGITECH_K400 = (1 << 11), - EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), -+ EVDEV_MODEL_LENOVO_CARBON_X1_6TH = (1 << 13), - EVDEV_MODEL_CYBORG_RAT = (1 << 14), - EVDEV_MODEL_HP_STREAM11_TOUCHPAD = (1 << 16), - EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17), -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index 7470973f..6f625017 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -232,6 +232,10 @@ libinput:keyboard:input:b0003v17EFp6047* - libinput:name:*ALPS TrackPoint*:svnLENOVO:*:pvrThinkPadX280:* - LIBINPUT_ATTR_TRACKPOINT_RANGE=70 - -+# Lenovo Carbon X1 6th gen (RMI4 only, PS/2 is broken on this device) -+libinput:name:Synaptics TM3288-010:dmi:*svnLenovo:*pvrThinkPadX1Carbon6th:* -+ LIBINPUT_MODEL_LENOVO_CARBON_X1_6TH=1 -+ - ########################################## - # Logitech - ########################################## --- -2.14.3 - diff --git a/libinput.spec b/libinput.spec index 922c29a..ec1119d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.10.5 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.10.6 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,7 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-evdev-disable-ABS_MT_TOOL_PALM-on-the-Lenovo-X1-Carb.patch Patch02: 0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch BuildRequires: git-core @@ -112,6 +111,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Tue May 01 2018 Peter Hutterer 1.10.6-1 +- libinput 1.10.6 + * Fri Apr 27 2018 Peter Hutterer 1.10.5-3 - Fix the T460s halting cursor problem harder (#1572394) diff --git a/sources b/sources index 2ce19c2..43281a5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.10.5.tar.xz) = 61f19ea777b523f0e76869b8e7dbbff5e51132d3c856c6edb9915a695f7903256228e71be2567642866923a800f1283bdd5aff97266ac26c2e42dfce0bffa50b +SHA512 (libinput-1.10.6.tar.xz) = b76963c3429c5590ee04f1da94d08775c8bb8584830e678804fb1d4cf0e2af84826782eae71fdd57492461f85df87ac2fc940c280b0672c75cd81d5f34702fe4 From ea254a5f10c3f08854eb333d26d04bca1d963b3a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 14 May 2018 11:09:10 +1000 Subject: [PATCH 164/317] Fix palm threshold on MacBookPro5,5 (#1575260) --- ...-spurious-palm-detections-on-MacBook.patch | 29 ++++++++++ 0001-util-allow-for-palm-pressure-255.patch | 53 +++++++++++++++++++ libinput.spec | 7 ++- 3 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 0001-Add-quirk-to-fix-spurious-palm-detections-on-MacBook.patch create mode 100644 0001-util-allow-for-palm-pressure-255.patch diff --git a/0001-Add-quirk-to-fix-spurious-palm-detections-on-MacBook.patch b/0001-Add-quirk-to-fix-spurious-palm-detections-on-MacBook.patch new file mode 100644 index 0000000..496ca64 --- /dev/null +++ b/0001-Add-quirk-to-fix-spurious-palm-detections-on-MacBook.patch @@ -0,0 +1,29 @@ +From 7ce9766162ee30e54eba544d9d83650e1c313d79 Mon Sep 17 00:00:00 2001 +From: Veli-Jussi Raitila +Date: Fri, 11 May 2018 12:26:16 +0300 +Subject: [PATCH libinput] Add quirk to fix spurious palm detections on MacBook + Pro (13-inch, Mid 2009) + +Signed-off-by: Peter Hutterer +--- + udev/90-libinput-model-quirks.hwdb | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index dd5ae4d9..d5d47682 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -74,6 +74,10 @@ libinput:touchpad:input:b0005v05ACp030E* + libinput:touchpad:input:b0003v05ACp021A* + LIBINPUT_MODEL_APPLE_TOUCHPAD_ONEBUTTON=1 + ++# MacBookPro5,5 (Mid 2009) ++libinput:name:bcm5974:dmi:*:svnAppleInc.:pnMacBookPro5,5:* ++ LIBINPUT_ATTR_PALM_SIZE_THRESHOLD=1000 ++ + ########################################## + # Asus + ########################################## +-- +2.14.3 + diff --git a/0001-util-allow-for-palm-pressure-255.patch b/0001-util-allow-for-palm-pressure-255.patch new file mode 100644 index 0000000..23856b9 --- /dev/null +++ b/0001-util-allow-for-palm-pressure-255.patch @@ -0,0 +1,53 @@ +From 59eb10e593213403c301a5ce3fbd0a22b6e52efd Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 30 Apr 2018 10:40:45 +1000 +Subject: [PATCH libinput] util: allow for palm pressure > 255 + +https://bugs.freedesktop.org/show_bug.cgi?id=105753 + +Signed-off-by: Peter Hutterer +--- + src/libinput-util.c | 4 +--- + test/test-misc.c | 3 +-- + 2 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/src/libinput-util.c b/src/libinput-util.c +index 93d73827..e774fb78 100644 +--- a/src/libinput-util.c ++++ b/src/libinput-util.c +@@ -425,9 +425,7 @@ parse_palm_pressure_property(const char *prop) + if (!prop) + return 0; + +- if (!safe_atoi(prop, &threshold) || +- threshold < 0 || +- threshold > 255) /* No touchpad device has pressure > 255 */ ++ if (!safe_atoi(prop, &threshold) || threshold < 0) + return 0; + + return threshold; +diff --git a/test/test-misc.c b/test/test-misc.c +index c62cd03e..608bba61 100644 +--- a/test/test-misc.c ++++ b/test/test-misc.c +@@ -1055,16 +1055,15 @@ START_TEST(palm_pressure_parser) + { "1", 1 }, + { "10", 10 }, + { "255", 255 }, ++ { "360", 360 }, + + { "-12", 0 }, +- { "360", 0 }, + { "0", 0 }, + { "-0", 0 }, + { "a", 0 }, + { "10a", 0 }, + { "10-", 0 }, + { "sadfasfd", 0 }, +- { "361", 0 }, + { NULL, 0 } + }; + +-- +2.14.3 + diff --git a/libinput.spec b/libinput.spec index ec1119d..5c3753f 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.10.6 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -19,6 +19,8 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} %endif Patch02: 0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch +Patch03: 0001-util-allow-for-palm-pressure-255.patch +Patch04: 0001-Add-quirk-to-fix-spurious-palm-detections-on-MacBook.patch BuildRequires: git-core BuildRequires: gcc gcc-c++ @@ -111,6 +113,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Mon May 14 2018 Peter Hutterer 1.10.6-2 +- Fix palm threshold on MacBookPro5,5 (#1575260) + * Tue May 01 2018 Peter Hutterer 1.10.6-1 - libinput 1.10.6 From 7dd7fed381a9a6fb3763d69c65df2a052a3e3077 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 17 May 2018 12:26:20 +1000 Subject: [PATCH 165/317] libinput 1.10.7 --- .gitignore | 1 + ...-spurious-palm-detections-on-MacBook.patch | 29 ----- ...-trackpoint-event-counter-for-the-T4.patch | 112 ------------------ 0001-util-allow-for-palm-pressure-255.patch | 53 --------- libinput.spec | 11 +- sources | 2 +- 6 files changed, 7 insertions(+), 201 deletions(-) delete mode 100644 0001-Add-quirk-to-fix-spurious-palm-detections-on-MacBook.patch delete mode 100644 0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch delete mode 100644 0001-util-allow-for-palm-pressure-255.patch diff --git a/.gitignore b/.gitignore index 8cb5f9d..a1e03d1 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ /libinput-1.10.4.tar.xz /libinput-1.10.5.tar.xz /libinput-1.10.6.tar.xz +/libinput-1.10.7.tar.xz diff --git a/0001-Add-quirk-to-fix-spurious-palm-detections-on-MacBook.patch b/0001-Add-quirk-to-fix-spurious-palm-detections-on-MacBook.patch deleted file mode 100644 index 496ca64..0000000 --- a/0001-Add-quirk-to-fix-spurious-palm-detections-on-MacBook.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 7ce9766162ee30e54eba544d9d83650e1c313d79 Mon Sep 17 00:00:00 2001 -From: Veli-Jussi Raitila -Date: Fri, 11 May 2018 12:26:16 +0300 -Subject: [PATCH libinput] Add quirk to fix spurious palm detections on MacBook - Pro (13-inch, Mid 2009) - -Signed-off-by: Peter Hutterer ---- - udev/90-libinput-model-quirks.hwdb | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb -index dd5ae4d9..d5d47682 100644 ---- a/udev/90-libinput-model-quirks.hwdb -+++ b/udev/90-libinput-model-quirks.hwdb -@@ -74,6 +74,10 @@ libinput:touchpad:input:b0005v05ACp030E* - libinput:touchpad:input:b0003v05ACp021A* - LIBINPUT_MODEL_APPLE_TOUCHPAD_ONEBUTTON=1 - -+# MacBookPro5,5 (Mid 2009) -+libinput:name:bcm5974:dmi:*:svnAppleInc.:pnMacBookPro5,5:* -+ LIBINPUT_ATTR_PALM_SIZE_THRESHOLD=1000 -+ - ########################################## - # Asus - ########################################## --- -2.14.3 - diff --git a/0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch b/0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch deleted file mode 100644 index f0c7dba..0000000 --- a/0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 4172888e91281df81b226920a28117d24ee57266 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 27 Apr 2018 14:40:57 +1000 -Subject: [PATCH libinput] touchpad: fix the trackpoint event counter for the - T460s - -Introduced in 416fa44d80b0f2c53b652ddfa35dd4a156a65c65 but there was a logic -error: we claimed to require 3 events from a trackpoint before stopping the -touchpad but the timer was only set when we actually stopped the touchpad. So -if a trackpoint sends a single event every second, we'd disable the touchpad -after 3 seconds for the duration of the timeout, then again 3 seconds later, -etc. - -Fix this by always setting the timeout and resetting the event counter if no -activity happened. - -Signed-off-by: Peter Hutterer -(cherry picked from commit c0fd857def5547f612d2c14ae57dda1cef47a92c) ---- - src/evdev-mt-touchpad.c | 13 ++++++++++--- - test/test-trackpoint.c | 30 ++++++++++++++++++++++++++++++ - 2 files changed, 40 insertions(+), 3 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index cc01976a..25520526 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -31,6 +31,7 @@ - #include "evdev-mt-touchpad.h" - - #define DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT ms2us(300) -+#define DEFAULT_TRACKPOINT_EVENT_TIMEOUT ms2us(40) - #define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_1 ms2us(200) - #define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_2 ms2us(500) - #define THUMB_MOVE_TIMEOUT ms2us(300) -@@ -1912,8 +1913,10 @@ tp_trackpoint_timeout(uint64_t now, void *data) - { - struct tp_dispatch *tp = data; - -- tp_tap_resume(tp, now); -- tp->palm.trackpoint_active = false; -+ if (tp->palm.trackpoint_active) { -+ tp_tap_resume(tp, now); -+ tp->palm.trackpoint_active = false; -+ } - tp->palm.trackpoint_event_count = 0; - } - -@@ -1930,9 +1933,13 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data) - tp->palm.trackpoint_last_event_time = time; - tp->palm.trackpoint_event_count++; - -+ - /* Require at least three events before enabling palm detection */ -- if (tp->palm.trackpoint_event_count < 3) -+ if (tp->palm.trackpoint_event_count < 3) { -+ libinput_timer_set(&tp->palm.trackpoint_timer, -+ time + DEFAULT_TRACKPOINT_EVENT_TIMEOUT); - return; -+ } - - if (!tp->palm.trackpoint_active) { - tp_stop_actions(tp, time); -diff --git a/test/test-trackpoint.c b/test/test-trackpoint.c -index 46a66893..5cca9bc9 100644 ---- a/test/test-trackpoint.c -+++ b/test/test-trackpoint.c -@@ -379,6 +379,35 @@ START_TEST(trackpoint_palmdetect_require_min_events) - } - END_TEST - -+START_TEST(trackpoint_palmdetect_require_min_events_timeout) -+{ -+ struct litest_device *trackpoint = litest_current_device(); -+ struct litest_device *touchpad; -+ struct libinput *li = trackpoint->libinput; -+ -+ touchpad = litest_add_device(li, LITEST_SYNAPTICS_I2C); -+ litest_drain_events(li); -+ -+ for (int i = 0; i < 10; i++) { -+ /* A single event does not trigger palm detection */ -+ litest_event(trackpoint, EV_REL, REL_X, 1); -+ litest_event(trackpoint, EV_REL, REL_Y, 1); -+ litest_event(trackpoint, EV_SYN, SYN_REPORT, 0); -+ libinput_dispatch(li); -+ litest_drain_events(li); -+ -+ litest_touch_down(touchpad, 0, 30, 30); -+ litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10, 1); -+ litest_touch_up(touchpad, 0); -+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); -+ -+ litest_timeout_trackpoint(); -+ } -+ -+ litest_delete_device(touchpad); -+} -+END_TEST -+ - void - litest_setup_tests_trackpoint(void) - { -@@ -393,4 +422,5 @@ litest_setup_tests_trackpoint(void) - litest_add("trackpoint:palmdetect", trackpoint_palmdetect, LITEST_POINTINGSTICK, LITEST_ANY); - litest_add("trackpoint:palmdetect", trackpoint_palmdetect_resume_touch, LITEST_POINTINGSTICK, LITEST_ANY); - litest_add("trackpoint:palmdetect", trackpoint_palmdetect_require_min_events, LITEST_POINTINGSTICK, LITEST_ANY); -+ litest_add("trackpoint:palmdetect", trackpoint_palmdetect_require_min_events_timeout, LITEST_POINTINGSTICK, LITEST_ANY); - } --- -2.14.3 - diff --git a/0001-util-allow-for-palm-pressure-255.patch b/0001-util-allow-for-palm-pressure-255.patch deleted file mode 100644 index 23856b9..0000000 --- a/0001-util-allow-for-palm-pressure-255.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 59eb10e593213403c301a5ce3fbd0a22b6e52efd Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 30 Apr 2018 10:40:45 +1000 -Subject: [PATCH libinput] util: allow for palm pressure > 255 - -https://bugs.freedesktop.org/show_bug.cgi?id=105753 - -Signed-off-by: Peter Hutterer ---- - src/libinput-util.c | 4 +--- - test/test-misc.c | 3 +-- - 2 files changed, 2 insertions(+), 5 deletions(-) - -diff --git a/src/libinput-util.c b/src/libinput-util.c -index 93d73827..e774fb78 100644 ---- a/src/libinput-util.c -+++ b/src/libinput-util.c -@@ -425,9 +425,7 @@ parse_palm_pressure_property(const char *prop) - if (!prop) - return 0; - -- if (!safe_atoi(prop, &threshold) || -- threshold < 0 || -- threshold > 255) /* No touchpad device has pressure > 255 */ -+ if (!safe_atoi(prop, &threshold) || threshold < 0) - return 0; - - return threshold; -diff --git a/test/test-misc.c b/test/test-misc.c -index c62cd03e..608bba61 100644 ---- a/test/test-misc.c -+++ b/test/test-misc.c -@@ -1055,16 +1055,15 @@ START_TEST(palm_pressure_parser) - { "1", 1 }, - { "10", 10 }, - { "255", 255 }, -+ { "360", 360 }, - - { "-12", 0 }, -- { "360", 0 }, - { "0", 0 }, - { "-0", 0 }, - { "a", 0 }, - { "10a", 0 }, - { "10-", 0 }, - { "sadfasfd", 0 }, -- { "361", 0 }, - { NULL, 0 } - }; - --- -2.14.3 - diff --git a/libinput.spec b/libinput.spec index 5c3753f..4b54571 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.10.6 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.10.7 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,10 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch02: 0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch -Patch03: 0001-util-allow-for-palm-pressure-255.patch -Patch04: 0001-Add-quirk-to-fix-spurious-palm-detections-on-MacBook.patch - BuildRequires: git-core BuildRequires: gcc gcc-c++ BuildRequires: meson @@ -113,6 +109,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-measure-trackpoint-range.1* %changelog +* Thu May 17 2018 Peter Hutterer 1.10.7-2 +- libinput 1.10.7 + * Mon May 14 2018 Peter Hutterer 1.10.6-2 - Fix palm threshold on MacBookPro5,5 (#1575260) diff --git a/sources b/sources index 43281a5..6856db9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.10.6.tar.xz) = b76963c3429c5590ee04f1da94d08775c8bb8584830e678804fb1d4cf0e2af84826782eae71fdd57492461f85df87ac2fc940c280b0672c75cd81d5f34702fe4 +SHA512 (libinput-1.10.7.tar.xz) = b102b8065ceed7511ad26efba34d5d9b0c13f0f7aaa882bb21501f7a5166f4cbe140fcbb488e90e6880bd47bb2b27667a4d6aa79b8726269fa1337897034a684 From 1acd6d12e8c047fc8ab7b999997e9d0c458ad1c3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 22 May 2018 11:41:52 +1000 Subject: [PATCH 166/317] libinput 1.11 rc1 --- .gitignore | 1 + libinput.spec | 13 ++++++++++--- sources | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a1e03d1..f5b1f7c 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /libinput-1.10.5.tar.xz /libinput-1.10.6.tar.xz /libinput-1.10.7.tar.xz +/libinput-1.10.901.tar.xz diff --git a/libinput.spec b/libinput.spec index 4b54571..c21fa3d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.10.7 +Version: 1.10.901 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -88,8 +88,6 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-list-devices.1* %{_mandir}/man1/libinput-debug-events.1* -%{_bindir}/libinput-list-devices -%{_bindir}/libinput-debug-events %files devel %{_includedir}/libinput.h @@ -98,17 +96,26 @@ The %{name}-utils package contains tools to debug hardware and analyze %files utils %{_libexecdir}/libinput/libinput-measure +%{_libexecdir}/libinput/libinput-measure-fuzz %{_libexecdir}/libinput/libinput-measure-touchpad-tap %{_libexecdir}/libinput/libinput-measure-touchpad-pressure %{_libexecdir}/libinput/libinput-measure-touch-size %{_libexecdir}/libinput/libinput-measure-trackpoint-range +%{_libexecdir}/libinput/libinput-record +%{_libexecdir}/libinput/libinput-replay %{_mandir}/man1/libinput-measure.1* +%{_mandir}/man1/libinput-measure-fuzz.1* %{_mandir}/man1/libinput-measure-touchpad-tap.1* %{_mandir}/man1/libinput-measure-touch-size.1* %{_mandir}/man1/libinput-measure-touchpad-pressure.1* %{_mandir}/man1/libinput-measure-trackpoint-range.1* +%{_mandir}/man1/libinput-record.1* +%{_mandir}/man1/libinput-replay.1* %changelog +* Tue May 22 2018 Peter Hutterer 1.10.901-1 +- libinput 1.11 rc1 + * Thu May 17 2018 Peter Hutterer 1.10.7-2 - libinput 1.10.7 diff --git a/sources b/sources index 6856db9..75f110d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.10.7.tar.xz) = b102b8065ceed7511ad26efba34d5d9b0c13f0f7aaa882bb21501f7a5166f4cbe140fcbb488e90e6880bd47bb2b27667a4d6aa79b8726269fa1337897034a684 +SHA512 (libinput-1.10.901.tar.xz) = b2251e8d33e95e7e6c8a7a54dc8038b540ea4132a0e7662eca11c9afdc7b6b5052f22f07e07c36e47a5b7d27005d8f667184b4ced729c7401747ee8761a394bd From c4ac66d12eb31630847b8377b0d64ea5f96a7795 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 30 May 2018 10:41:49 +1000 Subject: [PATCH 167/317] libinput 1.11 rc2 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f5b1f7c..93fc81f 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /libinput-1.10.6.tar.xz /libinput-1.10.7.tar.xz /libinput-1.10.901.tar.xz +/libinput-1.10.902.tar.xz diff --git a/libinput.spec b/libinput.spec index c21fa3d..3b1e665 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.10.901 +Version: 1.10.902 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -113,6 +113,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-replay.1* %changelog +* Wed May 30 2018 Peter Hutterer 1.10.902-1 +- libinput 1.11 rc2 + * Tue May 22 2018 Peter Hutterer 1.10.901-1 - libinput 1.11 rc1 diff --git a/sources b/sources index 75f110d..70d0844 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.10.901.tar.xz) = b2251e8d33e95e7e6c8a7a54dc8038b540ea4132a0e7662eca11c9afdc7b6b5052f22f07e07c36e47a5b7d27005d8f667184b4ced729c7401747ee8761a394bd +SHA512 (libinput-1.10.902.tar.xz) = c7c3da905852312e0b522b9356bf03ba5cb424020e0caf41cbd36fc22a6d337c2faebb878c01f958e7c078c9608f311b00190e8690b242000c6197a91d05e9a2 From 398e08b0ede27530e6b3a4bda2b282d2e16800b6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 1 Jun 2018 11:21:37 +1000 Subject: [PATCH 168/317] Revert direct sensitivity attribute reading (#1583324) --- ...-the-trackpoint-sensitivity-directly.patch | 55 +++++++++++++++++++ libinput.spec | 8 ++- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 0001-Revert-udev-copy-the-trackpoint-sensitivity-directly.patch diff --git a/0001-Revert-udev-copy-the-trackpoint-sensitivity-directly.patch b/0001-Revert-udev-copy-the-trackpoint-sensitivity-directly.patch new file mode 100644 index 0000000..e6186c5 --- /dev/null +++ b/0001-Revert-udev-copy-the-trackpoint-sensitivity-directly.patch @@ -0,0 +1,55 @@ +From 4b9050a0c18ea679bd8ca85ec92c9090b01974ca Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 1 Jun 2018 11:19:49 +1000 +Subject: [PATCH libinput] Revert "udev: copy the trackpoint sensitivity + directly from sysfs" + +The lenovo compact keyboard with trackpoint has a sensitivity of 5, which +causes the trackpoint range to be 0. + +https://bugzilla.redhat.com/show_bug.cgi?id=1583324 + +This reverts commit a4036a33ca6ca8da7d2417cac6b840a89b295e5f. +--- + src/evdev.c | 4 ++-- + udev/90-libinput-model-quirks.rules.in | 4 ---- + 2 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index 1ac5b4f0..4da80a1f 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1194,7 +1194,7 @@ evdev_get_trackpoint_range(struct evdev_device *device) + HTTP_DOC_LINK); + + prop = udev_device_get_property_value(device->udev_device, +- "LIBINPUT_ATTR_TRACKPOINT_SENSITIVITY"); ++ "POINTINGSTICK_SENSITIVITY"); + if (prop) { + int sensitivity; + +@@ -1210,7 +1210,7 @@ evdev_get_trackpoint_range(struct evdev_device *device) + sensitivity/DEFAULT_TRACKPOINT_SENSITIVITY; + + evdev_log_debug(device, +- "trackpoint sensitivity is %d\n", ++ "trackpoint udev sensitivity is %d\n", + sensitivity); + } + +diff --git a/udev/90-libinput-model-quirks.rules.in b/udev/90-libinput-model-quirks.rules.in +index cab8dcda..75d5b368 100644 +--- a/udev/90-libinput-model-quirks.rules.in ++++ b/udev/90-libinput-model-quirks.rules.in +@@ -39,8 +39,4 @@ KERNELS=="input*", \ + KERNELS=="input*", \ + IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:dt:$attr{[devicetree/base]model}'" + +-ENV{ID_INPUT_POINTINGSTICK}=="1", \ +- ATTRS{sensitivity}=="?*", \ +- ENV{LIBINPUT_ATTR_TRACKPOINT_SENSITIVITY}="$attr{sensitivity}" +- + LABEL="libinput_model_quirks_end" +-- +2.14.3 + diff --git a/libinput.spec b/libinput.spec index 3b1e665..9fc7cd9 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.10.902 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,9 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +# https://bugzilla.redhat.com/show_bug.cgi?id=1583324 +Patch01: 0001-Revert-udev-copy-the-trackpoint-sensitivity-directly.patch + BuildRequires: git-core BuildRequires: gcc gcc-c++ BuildRequires: meson @@ -113,6 +116,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-replay.1* %changelog +* Fri Jun 01 2018 Peter Hutterer 1.10.902-2 +- Revert direct sensitivity attribute reading (#1583324) + * Wed May 30 2018 Peter Hutterer 1.10.902-1 - libinput 1.11 rc2 From 85ae930e2237d1909791b97feb71783dd896d397 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 5 Jun 2018 10:32:36 +1000 Subject: [PATCH 169/317] libinput 1.11.0 --- .gitignore | 1 + ...-the-trackpoint-sensitivity-directly.patch | 55 ------------------- libinput.spec | 10 ++-- sources | 2 +- 4 files changed, 7 insertions(+), 61 deletions(-) delete mode 100644 0001-Revert-udev-copy-the-trackpoint-sensitivity-directly.patch diff --git a/.gitignore b/.gitignore index 93fc81f..dd665e7 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ /libinput-1.10.7.tar.xz /libinput-1.10.901.tar.xz /libinput-1.10.902.tar.xz +/libinput-1.11.0.tar.xz diff --git a/0001-Revert-udev-copy-the-trackpoint-sensitivity-directly.patch b/0001-Revert-udev-copy-the-trackpoint-sensitivity-directly.patch deleted file mode 100644 index e6186c5..0000000 --- a/0001-Revert-udev-copy-the-trackpoint-sensitivity-directly.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 4b9050a0c18ea679bd8ca85ec92c9090b01974ca Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 1 Jun 2018 11:19:49 +1000 -Subject: [PATCH libinput] Revert "udev: copy the trackpoint sensitivity - directly from sysfs" - -The lenovo compact keyboard with trackpoint has a sensitivity of 5, which -causes the trackpoint range to be 0. - -https://bugzilla.redhat.com/show_bug.cgi?id=1583324 - -This reverts commit a4036a33ca6ca8da7d2417cac6b840a89b295e5f. ---- - src/evdev.c | 4 ++-- - udev/90-libinput-model-quirks.rules.in | 4 ---- - 2 files changed, 2 insertions(+), 6 deletions(-) - -diff --git a/src/evdev.c b/src/evdev.c -index 1ac5b4f0..4da80a1f 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1194,7 +1194,7 @@ evdev_get_trackpoint_range(struct evdev_device *device) - HTTP_DOC_LINK); - - prop = udev_device_get_property_value(device->udev_device, -- "LIBINPUT_ATTR_TRACKPOINT_SENSITIVITY"); -+ "POINTINGSTICK_SENSITIVITY"); - if (prop) { - int sensitivity; - -@@ -1210,7 +1210,7 @@ evdev_get_trackpoint_range(struct evdev_device *device) - sensitivity/DEFAULT_TRACKPOINT_SENSITIVITY; - - evdev_log_debug(device, -- "trackpoint sensitivity is %d\n", -+ "trackpoint udev sensitivity is %d\n", - sensitivity); - } - -diff --git a/udev/90-libinput-model-quirks.rules.in b/udev/90-libinput-model-quirks.rules.in -index cab8dcda..75d5b368 100644 ---- a/udev/90-libinput-model-quirks.rules.in -+++ b/udev/90-libinput-model-quirks.rules.in -@@ -39,8 +39,4 @@ KERNELS=="input*", \ - KERNELS=="input*", \ - IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:dt:$attr{[devicetree/base]model}'" - --ENV{ID_INPUT_POINTINGSTICK}=="1", \ -- ATTRS{sensitivity}=="?*", \ -- ENV{LIBINPUT_ATTR_TRACKPOINT_SENSITIVITY}="$attr{sensitivity}" -- - LABEL="libinput_model_quirks_end" --- -2.14.3 - diff --git a/libinput.spec b/libinput.spec index 9fc7cd9..21eb637 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.10.902 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.11.0 +Release: 1%{?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 -# https://bugzilla.redhat.com/show_bug.cgi?id=1583324 -Patch01: 0001-Revert-udev-copy-the-trackpoint-sensitivity-directly.patch - BuildRequires: git-core BuildRequires: gcc gcc-c++ BuildRequires: meson @@ -116,6 +113,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-replay.1* %changelog +* Tue Jun 05 2018 Peter Hutterer 1.11.0-1 +- libinput 1.11.0 + * Fri Jun 01 2018 Peter Hutterer 1.10.902-2 - Revert direct sensitivity attribute reading (#1583324) diff --git a/sources b/sources index 70d0844..d1595ea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.10.902.tar.xz) = c7c3da905852312e0b522b9356bf03ba5cb424020e0caf41cbd36fc22a6d337c2faebb878c01f958e7c078c9608f311b00190e8690b242000c6197a91d05e9a2 +SHA512 (libinput-1.11.0.tar.xz) = 382a6c9ec4aaf13ac209ee5a7f507c7a6d2dd399c5104703ac7c6ac62fb3f393de6f4e15d7895b18c8b8d845ce8fc1f551a90aa7532f0de4cc17e57a09cfe857 From eee0356e383310a07389e107ee496e508d8b7240 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 19 Jun 2018 17:53:01 +1000 Subject: [PATCH 170/317] libinput 1.11.1 --- .gitignore | 1 + libinput.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index dd665e7..a0fc047 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ /libinput-1.10.901.tar.xz /libinput-1.10.902.tar.xz /libinput-1.11.0.tar.xz +/libinput-1.11.1.tar.xz diff --git a/libinput.spec b/libinput.spec index 21eb637..8a66221 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.11.0 +Version: 1.11.1 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -113,6 +113,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-replay.1* %changelog +* Tue Jun 19 2018 Peter Hutterer 1.11.1-1 +- libinput 1.11.1 + * Tue Jun 05 2018 Peter Hutterer 1.11.0-1 - libinput 1.11.0 diff --git a/sources b/sources index d1595ea..9c3c012 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.11.0.tar.xz) = 382a6c9ec4aaf13ac209ee5a7f507c7a6d2dd399c5104703ac7c6ac62fb3f393de6f4e15d7895b18c8b8d845ce8fc1f551a90aa7532f0de4cc17e57a09cfe857 +SHA512 (libinput-1.11.1.tar.xz) = 3dd1a318c89d66f5a66016c6dbfa5277b61a8cb5337d99f85b1eeef40ed894bdc04fd4588a97383988daea0f034df5a72bff318325320a01b857db9deb94a2b0 From 53669d8e66afb4ba5fecefeea059963f644f3ad0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 20 Jun 2018 11:44:46 +1000 Subject: [PATCH 171/317] Fix segfault in libinput list-devices --- ...valid-grab-parameter-to-list-devices.patch | 58 +++++++++++++++++++ libinput.spec | 7 ++- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 0001-tools-pass-a-valid-grab-parameter-to-list-devices.patch diff --git a/0001-tools-pass-a-valid-grab-parameter-to-list-devices.patch b/0001-tools-pass-a-valid-grab-parameter-to-list-devices.patch new file mode 100644 index 0000000..5334715 --- /dev/null +++ b/0001-tools-pass-a-valid-grab-parameter-to-list-devices.patch @@ -0,0 +1,58 @@ +From 7c51c881dc72827ca50ae9eea3d123eef9cb4a66 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 20 Jun 2018 07:56:05 +1000 +Subject: [PATCH libinput] tools: pass a valid grab parameter to list-devices + +My kingdome for a compiler warning. Or a scan-build warning. Or a coverity +warning. Or anything... But no, nothing. + +Also make the open_restricted() more robust to a NULL userdata, because +effectively that's what we were passing here. + +Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/50 + +Introduced in 0a13223c39fdf0f079715bf83d498c0dcd9cf4f8 + +Signed-off-by: Peter Hutterer +--- + tools/libinput-list-devices.c | 3 ++- + tools/shared.c | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/tools/libinput-list-devices.c b/tools/libinput-list-devices.c +index aa225ca0..4cbdf775 100644 +--- a/tools/libinput-list-devices.c ++++ b/tools/libinput-list-devices.c +@@ -372,6 +372,7 @@ main(int argc, char **argv) + { + struct libinput *li; + struct libinput_event *ev; ++ bool grab = false; + + /* This is kept for backwards-compatibility with the old + libinput-list-devices */ +@@ -388,7 +389,7 @@ main(int argc, char **argv) + } + } + +- li = tools_open_backend(BACKEND_UDEV, "seat0", false, false); ++ li = tools_open_backend(BACKEND_UDEV, "seat0", false, &grab); + if (!li) + return 1; + +diff --git a/tools/shared.c b/tools/shared.c +index d1f02702..d3fb6294 100644 +--- a/tools/shared.c ++++ b/tools/shared.c +@@ -232,7 +232,7 @@ open_restricted(const char *path, int flags, void *user_data) + if (fd < 0) + fprintf(stderr, "Failed to open %s (%s)\n", + path, strerror(errno)); +- else if (*grab && ioctl(fd, EVIOCGRAB, (void*)1) == -1) ++ else if (grab && *grab && ioctl(fd, EVIOCGRAB, (void*)1) == -1) + fprintf(stderr, "Grab requested, but failed for %s (%s)\n", + path, strerror(errno)); + +-- +2.17.1 + diff --git a/libinput.spec b/libinput.spec index 8a66221..a9ff3f9 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.11.1 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-tools-pass-a-valid-grab-parameter-to-list-devices.patch + BuildRequires: git-core BuildRequires: gcc gcc-c++ BuildRequires: meson @@ -113,6 +115,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-replay.1* %changelog +* Wed Jun 20 2018 Peter Hutterer 1.11.1-2 +- Fix segfault in libinput list-devices + * Tue Jun 19 2018 Peter Hutterer 1.11.1-1 - libinput 1.11.1 From 18f75835c43c8906919f46cfb13e4ec11ec889d1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 3 Jul 2018 15:05:10 +1000 Subject: [PATCH 172/317] libinput 1.11.2 --- .gitignore | 1 + ...valid-grab-parameter-to-list-devices.patch | 58 ------------------- libinput.spec | 9 +-- sources | 2 +- 4 files changed, 7 insertions(+), 63 deletions(-) delete mode 100644 0001-tools-pass-a-valid-grab-parameter-to-list-devices.patch diff --git a/.gitignore b/.gitignore index a0fc047..512cf0c 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ /libinput-1.10.902.tar.xz /libinput-1.11.0.tar.xz /libinput-1.11.1.tar.xz +/libinput-1.11.2.tar.xz diff --git a/0001-tools-pass-a-valid-grab-parameter-to-list-devices.patch b/0001-tools-pass-a-valid-grab-parameter-to-list-devices.patch deleted file mode 100644 index 5334715..0000000 --- a/0001-tools-pass-a-valid-grab-parameter-to-list-devices.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 7c51c881dc72827ca50ae9eea3d123eef9cb4a66 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 20 Jun 2018 07:56:05 +1000 -Subject: [PATCH libinput] tools: pass a valid grab parameter to list-devices - -My kingdome for a compiler warning. Or a scan-build warning. Or a coverity -warning. Or anything... But no, nothing. - -Also make the open_restricted() more robust to a NULL userdata, because -effectively that's what we were passing here. - -Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/50 - -Introduced in 0a13223c39fdf0f079715bf83d498c0dcd9cf4f8 - -Signed-off-by: Peter Hutterer ---- - tools/libinput-list-devices.c | 3 ++- - tools/shared.c | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/tools/libinput-list-devices.c b/tools/libinput-list-devices.c -index aa225ca0..4cbdf775 100644 ---- a/tools/libinput-list-devices.c -+++ b/tools/libinput-list-devices.c -@@ -372,6 +372,7 @@ main(int argc, char **argv) - { - struct libinput *li; - struct libinput_event *ev; -+ bool grab = false; - - /* This is kept for backwards-compatibility with the old - libinput-list-devices */ -@@ -388,7 +389,7 @@ main(int argc, char **argv) - } - } - -- li = tools_open_backend(BACKEND_UDEV, "seat0", false, false); -+ li = tools_open_backend(BACKEND_UDEV, "seat0", false, &grab); - if (!li) - return 1; - -diff --git a/tools/shared.c b/tools/shared.c -index d1f02702..d3fb6294 100644 ---- a/tools/shared.c -+++ b/tools/shared.c -@@ -232,7 +232,7 @@ open_restricted(const char *path, int flags, void *user_data) - if (fd < 0) - fprintf(stderr, "Failed to open %s (%s)\n", - path, strerror(errno)); -- else if (*grab && ioctl(fd, EVIOCGRAB, (void*)1) == -1) -+ else if (grab && *grab && ioctl(fd, EVIOCGRAB, (void*)1) == -1) - fprintf(stderr, "Grab requested, but failed for %s (%s)\n", - path, strerror(errno)); - --- -2.17.1 - diff --git a/libinput.spec b/libinput.spec index a9ff3f9..2964453 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.11.1 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.11.2 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,8 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-tools-pass-a-valid-grab-parameter-to-list-devices.patch - BuildRequires: git-core BuildRequires: gcc gcc-c++ BuildRequires: meson @@ -115,6 +113,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-replay.1* %changelog +* Tue Jul 03 2018 Peter Hutterer 1.11.2-1 +- libinput 1.11.2 + * Wed Jun 20 2018 Peter Hutterer 1.11.1-2 - Fix segfault in libinput list-devices diff --git a/sources b/sources index 9c3c012..3b0d0a1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.11.1.tar.xz) = 3dd1a318c89d66f5a66016c6dbfa5277b61a8cb5337d99f85b1eeef40ed894bdc04fd4588a97383988daea0f034df5a72bff318325320a01b857db9deb94a2b0 +SHA512 (libinput-1.11.2.tar.xz) = cb6ada877fc3c09f634f3db39d5507e66d4b86c3d632bb8f7498c7b01fdf8372b2053a79b641293900b7fcc0aa4e920f7c830d9c7b2d9ff3cd61c58eb7c20b65 From f7a6f4a20f141bbf0124fd4f4ba80e054ef2ff6f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 6 Jul 2018 13:38:03 +1000 Subject: [PATCH 173/317] Replace all python3 calls with the rpm macro --- libinput.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 2964453..a855332 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.11.2 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -25,6 +25,7 @@ BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(mtdev) >= 1.1.0 BuildRequires: pkgconfig(libevdev) >= 0.4 BuildRequires: pkgconfig(libwacom) >= 0.20 +BuildRequires: python3-devel %description libinput is a library that handles input devices for display servers and other @@ -54,6 +55,8 @@ The %{name}-utils package contains tools to debug hardware and analyze %prep %autosetup -S git +# Replace whatever the source uses with the approved call +pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %build %meson -Ddebug-gui=false \ @@ -113,6 +116,9 @@ The %{name}-utils package contains tools to debug hardware and analyze %{_mandir}/man1/libinput-replay.1* %changelog +* Fri Jul 06 2018 Peter Hutterer 1.11.2-2 +- Replace all python3 calls with the rpm macro + * Tue Jul 03 2018 Peter Hutterer 1.11.2-1 - libinput 1.11.2 From ce8e6e33fc4442f64b581ce32211c8b2a75c821a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 08:16:22 +0000 Subject: [PATCH 174/317] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index a855332..047266c 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.11.2 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -116,6 +116,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-replay.1* %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 1.11.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Fri Jul 06 2018 Peter Hutterer 1.11.2-2 - Replace all python3 calls with the rpm macro From e90a3a52aef22206cb6a570b272948e78b60ade7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 25 Jul 2018 15:00:22 +1000 Subject: [PATCH 175/317] libinput 1.11.3 --- .gitignore | 1 + libinput.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 512cf0c..683873d 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ /libinput-1.11.0.tar.xz /libinput-1.11.1.tar.xz /libinput-1.11.2.tar.xz +/libinput-1.11.3.tar.xz diff --git a/libinput.spec b/libinput.spec index 047266c..90eb200 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.11.2 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.11.3 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -116,6 +116,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-replay.1* %changelog +* Wed Jul 25 2018 Peter Hutterer 1.11.3-1 +- libinput 1.11.3 + * Fri Jul 13 2018 Fedora Release Engineering - 1.11.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 3b0d0a1..2324c1f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.11.2.tar.xz) = cb6ada877fc3c09f634f3db39d5507e66d4b86c3d632bb8f7498c7b01fdf8372b2053a79b641293900b7fcc0aa4e920f7c830d9c7b2d9ff3cd61c58eb7c20b65 +SHA512 (libinput-1.11.3.tar.xz) = 5e18daab6202bcbfddeebc35dac4cabb5f726b5b73f5fc87975b58f3019a54a4b1f506a3200e920638ddddfb978a0b96c23c2e90b081942f86d33c16d4836949 From 11ff13d4962759859707b7a80509c75b72847a21 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 25 Jul 2018 15:53:06 +1000 Subject: [PATCH 176/317] simplify gitignore --- .gitignore | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index 683873d..9a06e56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,31 +1 @@ -/libinput-1.7.1.tar.xz -/libinput-1.7.2.tar.xz -/libinput-1.7.3.tar.xz -/libinput-1.7.901.tar.xz -/libinput-1.7.902.tar.xz -/libinput-1.8.0.tar.xz -/libinput-1.8.1.tar.xz -/libinput-1.8.2.tar.xz -/libinput-1.8.901.tar.xz -/libinput-1.8.902.tar.xz -/libinput-1.9.0.tar.xz -/libinput-1.9.1.tar.xz -/libinput-1.9.2.tar.xz -/libinput-1.9.3.tar.xz -/libinput-1.9.4.tar.xz -/libinput-1.9.901.tar.xz -/libinput-1.9.902.tar.xz -/libinput-1.10.0.tar.xz -/libinput-1.10.1.tar.xz -/libinput-1.10.2.tar.xz -/libinput-1.10.3.tar.xz -/libinput-1.10.4.tar.xz -/libinput-1.10.5.tar.xz -/libinput-1.10.6.tar.xz -/libinput-1.10.7.tar.xz -/libinput-1.10.901.tar.xz -/libinput-1.10.902.tar.xz -/libinput-1.11.0.tar.xz -/libinput-1.11.1.tar.xz -/libinput-1.11.2.tar.xz -/libinput-1.11.3.tar.xz +/libinput-*.tar.xz From cef6457a000f50b04e742c57dae62ae96b57655c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 31 Jul 2018 12:58:24 +1000 Subject: [PATCH 177/317] libinput 1.12rc1 --- ...name-of-the-measure-touchpad-tap-scr.patch | 27 +++++++++++++++++++ libinput.spec | 14 +++++++--- sources | 2 +- 3 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 0001-meson.build-fix-name-of-the-measure-touchpad-tap-scr.patch diff --git a/0001-meson.build-fix-name-of-the-measure-touchpad-tap-scr.patch b/0001-meson.build-fix-name-of-the-measure-touchpad-tap-scr.patch new file mode 100644 index 0000000..4941bb9 --- /dev/null +++ b/0001-meson.build-fix-name-of-the-measure-touchpad-tap-scr.patch @@ -0,0 +1,27 @@ +From 22faa97f25136981828fae7f99bbc1933d42afc1 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 31 Jul 2018 13:00:38 +1000 +Subject: [PATCH libinput] meson.build: fix name of the measure touchpad-tap + script + +Signed-off-by: Peter Hutterer +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 74b88548..6f04e4d3 100644 +--- a/meson.build ++++ b/meson.build +@@ -490,7 +490,7 @@ configure_file(input : 'tools/libinput-measure-fuzz.man', + ) + + configure_file(input: 'tools/libinput-measure-touchpad-tap.py', +- output: 'libinput-measure-touchpad_tap', ++ output: 'libinput-measure-touchpad-tap', + configuration : config_noop, + install : true, + install_dir : libinput_tool_path +-- +2.17.1 + diff --git a/libinput.spec b/libinput.spec index 90eb200..ebccd45 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.11.3 +Version: 1.11.901 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -18,6 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-meson.build-fix-name-of-the-measure-touchpad-tap-scr.patch + BuildRequires: git-core BuildRequires: gcc gcc-c++ BuildRequires: meson @@ -81,13 +83,12 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{udevdir}/libinput-device-group %{udevdir}/libinput-model-quirks %{udevdir}/rules.d/80-libinput-device-groups.rules -%{udevdir}/rules.d/90-libinput-model-quirks.rules -%{udevdir}/hwdb.d/90-libinput-model-quirks.hwdb %{_bindir}/libinput %dir %{_libexecdir}/libinput/ %{_libexecdir}/libinput/libinput-debug-events %{_libexecdir}/libinput/libinput-list-devices %{_mandir}/man1/libinput.1* +%{_datadir}/libinput/*.quirks %{_mandir}/man1/libinput-list-devices.1* %{_mandir}/man1/libinput-debug-events.1* @@ -104,6 +105,7 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_libexecdir}/libinput/libinput-measure-touchpad-pressure %{_libexecdir}/libinput/libinput-measure-touch-size %{_libexecdir}/libinput/libinput-measure-trackpoint-range +%{_libexecdir}/libinput/libinput-quirks %{_libexecdir}/libinput/libinput-record %{_libexecdir}/libinput/libinput-replay %{_mandir}/man1/libinput-measure.1* @@ -112,10 +114,16 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-measure-touch-size.1* %{_mandir}/man1/libinput-measure-touchpad-pressure.1* %{_mandir}/man1/libinput-measure-trackpoint-range.1* +%{_mandir}/man1/libinput-quirks.1* +%{_mandir}/man1/libinput-quirks-list.1* +%{_mandir}/man1/libinput-quirks-validate.1* %{_mandir}/man1/libinput-record.1* %{_mandir}/man1/libinput-replay.1* %changelog +* Tue Jul 31 2018 Peter Hutterer 1.11.901-1 +- libinput 1.12rc1 + * Wed Jul 25 2018 Peter Hutterer 1.11.3-1 - libinput 1.11.3 diff --git a/sources b/sources index 2324c1f..e3f1503 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.11.3.tar.xz) = 5e18daab6202bcbfddeebc35dac4cabb5f726b5b73f5fc87975b58f3019a54a4b1f506a3200e920638ddddfb978a0b96c23c2e90b081942f86d33c16d4836949 +SHA512 (libinput-1.11.901.tar.xz) = 5b20cde2f63d98a655eb8d841c128af5eb07cc355238e64b3db0e2ecda998cc8f6b9aef210f248840f88bcadc916ee7562158c672bbd23537b9bd5a80310bdcf From 3c4051318cf7ec6a316895bfe72e9fe9b0cf5124 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 14 Aug 2018 09:43:15 +1000 Subject: [PATCH 178/317] libinput 1.12rc2 --- ...name-of-the-measure-touchpad-tap-scr.patch | 27 ------------------- libinput.spec | 7 ++--- sources | 2 +- 3 files changed, 5 insertions(+), 31 deletions(-) delete mode 100644 0001-meson.build-fix-name-of-the-measure-touchpad-tap-scr.patch diff --git a/0001-meson.build-fix-name-of-the-measure-touchpad-tap-scr.patch b/0001-meson.build-fix-name-of-the-measure-touchpad-tap-scr.patch deleted file mode 100644 index 4941bb9..0000000 --- a/0001-meson.build-fix-name-of-the-measure-touchpad-tap-scr.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 22faa97f25136981828fae7f99bbc1933d42afc1 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 31 Jul 2018 13:00:38 +1000 -Subject: [PATCH libinput] meson.build: fix name of the measure touchpad-tap - script - -Signed-off-by: Peter Hutterer ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 74b88548..6f04e4d3 100644 ---- a/meson.build -+++ b/meson.build -@@ -490,7 +490,7 @@ configure_file(input : 'tools/libinput-measure-fuzz.man', - ) - - configure_file(input: 'tools/libinput-measure-touchpad-tap.py', -- output: 'libinput-measure-touchpad_tap', -+ output: 'libinput-measure-touchpad-tap', - configuration : config_noop, - install : true, - install_dir : libinput_tool_path --- -2.17.1 - diff --git a/libinput.spec b/libinput.spec index ebccd45..1c098c3 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.11.901 +Version: 1.11.902 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -18,8 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-meson.build-fix-name-of-the-measure-touchpad-tap-scr.patch - BuildRequires: git-core BuildRequires: gcc gcc-c++ BuildRequires: meson @@ -121,6 +119,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-replay.1* %changelog +* Tue Aug 14 2018 Peter Hutterer 1.11.902-1 +- libinput 1.12rc2 + * Tue Jul 31 2018 Peter Hutterer 1.11.901-1 - libinput 1.12rc1 diff --git a/sources b/sources index e3f1503..cc9c1f3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.11.901.tar.xz) = 5b20cde2f63d98a655eb8d841c128af5eb07cc355238e64b3db0e2ecda998cc8f6b9aef210f248840f88bcadc916ee7562158c672bbd23537b9bd5a80310bdcf +SHA512 (libinput-1.11.902.tar.xz) = 23290f8375225cfb5b3f37126f92bb42a5670a3861a234be9680f3e52299145d0082a35a2910ff1991f537dc14f48c5060e4540667f0272333a164aa8ebb18d0 From 212148a1a9a44a800d8f3444561813533e987ff6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 4 Sep 2018 11:25:45 +1000 Subject: [PATCH 179/317] libinput 1.12rc3 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 1c098c3..9d0bb86 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.11.902 +Version: 1.11.903 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -119,6 +119,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-replay.1* %changelog +* Tue Sep 04 2018 Peter Hutterer 1.11.903-1 +- libinput 1.12rc3 + * Tue Aug 14 2018 Peter Hutterer 1.11.902-1 - libinput 1.12rc2 diff --git a/sources b/sources index cc9c1f3..ea17c8f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.11.902.tar.xz) = 23290f8375225cfb5b3f37126f92bb42a5670a3861a234be9680f3e52299145d0082a35a2910ff1991f537dc14f48c5060e4540667f0272333a164aa8ebb18d0 +SHA512 (libinput-1.11.903.tar.xz) = a1a307a2d587f78a8ff8c7886c60c32eb6a821d20efb67fddd60986a0d754dc366a15001cfdb37f04f0bf832cff679ed40be605522a76afa510bca538eebfaa6 From 247b223c17719d32bd2c168b58f0fb4d16b79c6d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 11 Sep 2018 14:20:53 +1000 Subject: [PATCH 180/317] libinput 1.12 --- libinput.spec | 8 +++++--- sources | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libinput.spec b/libinput.spec index 9d0bb86..3b41c01 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.11.903 +Version: 1.12.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -81,6 +81,7 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{udevdir}/libinput-device-group %{udevdir}/libinput-model-quirks %{udevdir}/rules.d/80-libinput-device-groups.rules +%{udevdir}/rules.d/90-libinput-model-quirks.rules %{_bindir}/libinput %dir %{_libexecdir}/libinput/ %{_libexecdir}/libinput/libinput-debug-events @@ -102,7 +103,6 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_libexecdir}/libinput/libinput-measure-touchpad-tap %{_libexecdir}/libinput/libinput-measure-touchpad-pressure %{_libexecdir}/libinput/libinput-measure-touch-size -%{_libexecdir}/libinput/libinput-measure-trackpoint-range %{_libexecdir}/libinput/libinput-quirks %{_libexecdir}/libinput/libinput-record %{_libexecdir}/libinput/libinput-replay @@ -111,7 +111,6 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-measure-touchpad-tap.1* %{_mandir}/man1/libinput-measure-touch-size.1* %{_mandir}/man1/libinput-measure-touchpad-pressure.1* -%{_mandir}/man1/libinput-measure-trackpoint-range.1* %{_mandir}/man1/libinput-quirks.1* %{_mandir}/man1/libinput-quirks-list.1* %{_mandir}/man1/libinput-quirks-validate.1* @@ -119,6 +118,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-replay.1* %changelog +* Tue Sep 11 2018 Peter Hutterer 1.12.0-1 +- libinput 1.12 + * Tue Sep 04 2018 Peter Hutterer 1.11.903-1 - libinput 1.12rc3 diff --git a/sources b/sources index ea17c8f..e71a767 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.11.903.tar.xz) = a1a307a2d587f78a8ff8c7886c60c32eb6a821d20efb67fddd60986a0d754dc366a15001cfdb37f04f0bf832cff679ed40be605522a76afa510bca538eebfaa6 +SHA512 (libinput-1.12.0.tar.xz) = 4aee877785f9ac080e4f8ee20f3643bc4f3ddbc568aca6c363a962f8c8f76b8db7dc113c8167092f0277d112346a85b9a7e7c3c3f227ed243aaba32c9092c924 From 0bb2ac11b7d6b49303963c137fb5976e525aa512 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 3 Oct 2018 12:58:11 +1000 Subject: [PATCH 181/317] libinput 1.12.1 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 3b41c01..4e8546b 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.12.0 +Version: 1.12.1 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -118,6 +118,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-replay.1* %changelog +* Wed Oct 03 2018 Peter Hutterer 1.12.1-1 +- libinput 1.12.1 + * Tue Sep 11 2018 Peter Hutterer 1.12.0-1 - libinput 1.12 diff --git a/sources b/sources index e71a767..f8826bc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.12.0.tar.xz) = 4aee877785f9ac080e4f8ee20f3643bc4f3ddbc568aca6c363a962f8c8f76b8db7dc113c8167092f0277d112346a85b9a7e7c3c3f227ed243aaba32c9092c924 +SHA512 (libinput-1.12.1.tar.xz) = de1714526ee1244e3086729efa5b72724b2b989fa8d04418e633d1ef5a8ea777ae3cd4b8c5b015ca0da2b8cf5b07111bff2283c7d6068abcdfa81c3f71b81d68 From d2a72ac83f8814363847aaea76d2d96e7f0d5fdf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 24 Oct 2018 15:47:57 +1000 Subject: [PATCH 182/317] libinput 1.12.2 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 4e8546b..c6dd334 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.12.1 +Version: 1.12.2 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -118,6 +118,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-replay.1* %changelog +* Wed Oct 24 2018 Peter Hutterer 1.12.2-1 +- libinput 1.12.2 + * Wed Oct 03 2018 Peter Hutterer 1.12.1-1 - libinput 1.12.1 diff --git a/sources b/sources index f8826bc..1416d2b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.12.1.tar.xz) = de1714526ee1244e3086729efa5b72724b2b989fa8d04418e633d1ef5a8ea777ae3cd4b8c5b015ca0da2b8cf5b07111bff2283c7d6068abcdfa81c3f71b81d68 +SHA512 (libinput-1.12.2.tar.xz) = f7122a1d18dd2d0072a34fd9897ebe25a065100b3754052d7ec133bddb56d5c2a5a94950cfc8366ef5d117180c28b3ff99b1a62f3ab95df5ac22f86721fbdc67 From 8ba5655288326e6f43ffcaf0b10cea5dd3035d0b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 7 Nov 2018 15:03:28 +1000 Subject: [PATCH 183/317] libinput 1.12.3 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index c6dd334..2d319c5 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.12.2 +Version: 1.12.3 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -118,6 +118,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-replay.1* %changelog +* Wed Nov 07 2018 Peter Hutterer 1.12.3-1 +- libinput 1.12.3 + * Wed Oct 24 2018 Peter Hutterer 1.12.2-1 - libinput 1.12.2 diff --git a/sources b/sources index 1416d2b..cb31bcc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.12.2.tar.xz) = f7122a1d18dd2d0072a34fd9897ebe25a065100b3754052d7ec133bddb56d5c2a5a94950cfc8366ef5d117180c28b3ff99b1a62f3ab95df5ac22f86721fbdc67 +SHA512 (libinput-1.12.3.tar.xz) = cdc512cb53442ae85d5a23e10db9dd3548bcca0de24d7fcc48954a60773563d84d9b10278b6a693ade95d0789bb5d42bbb8b7cf1c178fe85401cb09a5402ff02 From 4b89c9110708e702046b670757b0d5b1b243df32 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 18 Dec 2018 15:36:10 +1000 Subject: [PATCH 184/317] libinput 1.12.4 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 2d319c5..bab64f1 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.12.3 +Version: 1.12.4 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -118,6 +118,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-replay.1* %changelog +* Tue Dec 18 2018 Peter Hutterer 1.12.4-1 +- libinput 1.12.4 + * Wed Nov 07 2018 Peter Hutterer 1.12.3-1 - libinput 1.12.3 diff --git a/sources b/sources index cb31bcc..9644912 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.12.3.tar.xz) = cdc512cb53442ae85d5a23e10db9dd3548bcca0de24d7fcc48954a60773563d84d9b10278b6a693ade95d0789bb5d42bbb8b7cf1c178fe85401cb09a5402ff02 +SHA512 (libinput-1.12.4.tar.xz) = 4e43ed5213059a481e5a73549c8325e5729d08512c4f580b924d4338a1b69dabd77fb612bec418f294c1da96c738ce26e45f8de8fbc222ab1af71a1535b3240f From 7677320cee1fd4dc7e43f7d2be4d3d87645ada54 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 7 Jan 2019 14:15:00 +1000 Subject: [PATCH 185/317] libinput 1.12.5 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index bab64f1..62f2d99 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.12.4 +Version: 1.12.5 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -118,6 +118,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-replay.1* %changelog +* Mon Jan 07 2019 Peter Hutterer 1.12.5-1 +- libinput 1.12.5 + * Tue Dec 18 2018 Peter Hutterer 1.12.4-1 - libinput 1.12.4 diff --git a/sources b/sources index 9644912..b9b2570 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.12.4.tar.xz) = 4e43ed5213059a481e5a73549c8325e5729d08512c4f580b924d4338a1b69dabd77fb612bec418f294c1da96c738ce26e45f8de8fbc222ab1af71a1535b3240f +SHA512 (libinput-1.12.5.tar.xz) = 9365b91b3ac2c4ff0f9927913242afac7677979682dd7b541001b13d09d7982acd854f6d348101cfa4b0854c6a92b4c683f62593a97870e32ae3d607eaeae3ff From 405e05afdd0f58eeb1286042c9e4acf55b3d60b2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 21 Jan 2019 11:32:34 +1000 Subject: [PATCH 186/317] libinput 1.12.6 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 62f2d99..bbe9c25 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.12.5 +Version: 1.12.6 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -118,6 +118,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-replay.1* %changelog +* Mon Jan 21 2019 Peter Hutterer 1.12.6-1 +- libinput 1.12.6 + * Mon Jan 07 2019 Peter Hutterer 1.12.5-1 - libinput 1.12.5 diff --git a/sources b/sources index b9b2570..c79baaa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.12.5.tar.xz) = 9365b91b3ac2c4ff0f9927913242afac7677979682dd7b541001b13d09d7982acd854f6d348101cfa4b0854c6a92b4c683f62593a97870e32ae3d607eaeae3ff +SHA512 (libinput-1.12.6.tar.xz) = 02ad90c77a0c8c27fd96ec34e1546c5f0947ced49bad386372c1ef7c41b3b2157c39020f0766f20aaf2ab3c97128567e169279bea21115ced39499dda325d2ef From 97dbd1e22b0d579b7b15898a7810cf918db15081 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 22 Jan 2019 18:39:48 +0100 Subject: [PATCH 187/317] Remove obsolete ldconfig scriptlets References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets Signed-off-by: Igor Gnatenko --- libinput.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index bbe9c25..bc37b6a 100644 --- a/libinput.spec +++ b/libinput.spec @@ -69,10 +69,10 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %meson_install %post -/sbin/ldconfig +%{?ldconfig} /usr/bin/udevadm hwdb --update >/dev/null 2>&1 || : -%postun -p /sbin/ldconfig +%ldconfig_postun %files From 00f13486021d316b45150e82bf4e2288480d3078 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 07:23:41 +0000 Subject: [PATCH 188/317] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index bc37b6a..bbf0774 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.12.6 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -118,6 +118,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-replay.1* %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 1.12.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Mon Jan 21 2019 Peter Hutterer 1.12.6-1 - libinput 1.12.6 From bad9712fc366b1ca46d6faa2c240ef3bac5ab464 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 14 Feb 2019 16:56:04 +1000 Subject: [PATCH 189/317] Don't update the hwdb on install, we don't have any hwdb files anymore --- libinput.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index bbf0774..932c907 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.12.6 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -70,7 +70,6 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %post %{?ldconfig} -/usr/bin/udevadm hwdb --update >/dev/null 2>&1 || : %ldconfig_postun @@ -118,6 +117,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-replay.1* %changelog +* Thu Feb 14 2019 Peter Hutterer 1.12.6-3 +- Don't update the hwdb on install, we don't have any hwdb files anymore + * Fri Feb 01 2019 Fedora Release Engineering - 1.12.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 16ed7bef68da53d4d6dba84c1232d95549719746 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 28 Feb 2019 14:13:46 +1000 Subject: [PATCH 190/317] Add some basic testing --- tests/libinput-tool-beakerlib/PURPOSE | 4 +++ tests/libinput-tool-beakerlib/runtest.sh | 34 ++++++++++++++++++++++++ tests/libinput-tool/PURPOSE | 5 ++++ tests/libinput-tool/runtest.sh | 16 +++++++++++ tests/tests.yml | 16 +++++++++++ 5 files changed, 75 insertions(+) create mode 100644 tests/libinput-tool-beakerlib/PURPOSE create mode 100644 tests/libinput-tool-beakerlib/runtest.sh create mode 100644 tests/libinput-tool/PURPOSE create mode 100644 tests/libinput-tool/runtest.sh create mode 100644 tests/tests.yml diff --git a/tests/libinput-tool-beakerlib/PURPOSE b/tests/libinput-tool-beakerlib/PURPOSE new file mode 100644 index 0000000..5ba320c --- /dev/null +++ b/tests/libinput-tool-beakerlib/PURPOSE @@ -0,0 +1,4 @@ +PURPOSE of libinput-tool-beakerlib +Description: Test for the libinput commandline tool +Author: Peter Hutterer + diff --git a/tests/libinput-tool-beakerlib/runtest.sh b/tests/libinput-tool-beakerlib/runtest.sh new file mode 100644 index 0000000..486b100 --- /dev/null +++ b/tests/libinput-tool-beakerlib/runtest.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# Include rhts environment +. /usr/bin/rhts-environment.sh +. /usr/share/rhts-library/rhtslib.sh + +PACKAGE="libinput" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlAssertRpm $PACKAGE-utils + rlPhaseEnd + + rlPhaseStartTest + rlRun "libinput --help" 0 "libinput help exists cleanly" + rlRun "libinput --version" 0 "libinput version exists cleanly" + rlPhaseEnd + + rlPhaseStartTest + rlRun "libinput quirks validate" 0 "libinput quirks parse " + rlPhaseEnd + + rlPhaseStartTest + rlRun "libinput record --help" 0 "libinput record exists" + rlRun "libinput measure --help" 0 "libinput measure exists" + rlRun "libinput measure fuzz --help" 0 "libinput measure fuzz exists" + rlRun "libinput measure touch-size --help" 0 "libinput measure touch-size exists" + rlRun "libinput measure touchpad-pressure --help" 0 "libinput touchpad-pressure exists" + rlRun "libinput measure touchpad-tap --help" 0 "libinput touchpad-tap exists" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd + diff --git a/tests/libinput-tool/PURPOSE b/tests/libinput-tool/PURPOSE new file mode 100644 index 0000000..297a94b --- /dev/null +++ b/tests/libinput-tool/PURPOSE @@ -0,0 +1,5 @@ +PURPOSE of libinput-tool +Description: Test for the libinput commandline tool +Author: Peter Hutterer + + diff --git a/tests/libinput-tool/runtest.sh b/tests/libinput-tool/runtest.sh new file mode 100644 index 0000000..2e77ad2 --- /dev/null +++ b/tests/libinput-tool/runtest.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# check libinput is in the path, --help and --version need to work +libinput --help +libinput --version + +# this should fail if the quirks failed to install +libinput quirks validate + +# check the various tools exist +libinput record --help +libinput measure --help +libinput measure fuzz --help +libinput measure touch-size --help +libinput measure touchpad-pressure --help +libinput measure touchpad-tap --help diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..bf65561 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,16 @@ +--- +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - classic + tests: + - libinput-tool-beakerlib + +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + tests: + - libinput-tool From 6884ed088b3357619b9a491d19eb34b3351b6629 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Mar 2019 11:39:32 +1000 Subject: [PATCH 191/317] test: address yamllint errors Signed-off-by: Peter Hutterer --- tests/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index bf65561..93ac841 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -3,14 +3,14 @@ roles: - role: standard-test-beakerlib tags: - - classic + - classic tests: - - libinput-tool-beakerlib + - libinput-tool-beakerlib - hosts: localhost roles: - role: standard-test-basic tags: - - classic + - classic tests: - - libinput-tool + - libinput-tool From 71024332133cd4cba8336e9ca1b1dcec9cb16df0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Mar 2019 12:04:55 +1000 Subject: [PATCH 192/317] Let's try scripts tests and source roles --- tests/libinput-test-suite/PURPOSE | 5 ++++ tests/libinput-test-suite/runtest.sh | 14 ++++++++++ .../libinput-tool-test.sh | 16 +++++++++++ tests/tests.yml | 27 +++++++++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 tests/libinput-test-suite/PURPOSE create mode 100644 tests/libinput-test-suite/runtest.sh create mode 100644 tests/libinput-tool-scripttest/libinput-tool-test.sh diff --git a/tests/libinput-test-suite/PURPOSE b/tests/libinput-test-suite/PURPOSE new file mode 100644 index 0000000..4396bd4 --- /dev/null +++ b/tests/libinput-test-suite/PURPOSE @@ -0,0 +1,5 @@ +PURPOSE of libinput-test-suite +Description: Full test suite run for libinput +Author: Peter Hutterer + + diff --git a/tests/libinput-test-suite/runtest.sh b/tests/libinput-test-suite/runtest.sh new file mode 100644 index 0000000..187dbca --- /dev/null +++ b/tests/libinput-test-suite/runtest.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +export # let's see what's available +ls /dev/input +ls /dev/ + +ls # let's debug where the actual tarball sits in case the next one fails +# Can we use the spec file version number here?? +pushd libinput-* + +meson builddir -Ddocumentation=false -Dtests=true -Ddebug-gui=false +ninja -C builddir test + +popd > /dev/null diff --git a/tests/libinput-tool-scripttest/libinput-tool-test.sh b/tests/libinput-tool-scripttest/libinput-tool-test.sh new file mode 100644 index 0000000..2e77ad2 --- /dev/null +++ b/tests/libinput-tool-scripttest/libinput-tool-test.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# check libinput is in the path, --help and --version need to work +libinput --help +libinput --version + +# this should fail if the quirks failed to install +libinput quirks validate + +# check the various tools exist +libinput record --help +libinput measure --help +libinput measure fuzz --help +libinput measure touch-size --help +libinput measure touchpad-pressure --help +libinput measure touchpad-tap --help diff --git a/tests/tests.yml b/tests/tests.yml index 93ac841..110111d 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -14,3 +14,30 @@ - classic tests: - libinput-tool + +- hosts: localhost + roles: + - role: standard-test-scripts + tags: + - classic + tests: + - libinput-tool-scripttest/libinput-tool-test.sh + +- hosts: localhost + roles: + - role: standard-test-source + tags: + - always + - role: standard-test-basic + tags: + - classic + required_packages: + - meson + - gcc + - mtdev-devel + - libevdev-devel + - libwacom-devel + - check-devel + - systemd-devel + tests: + - libinput-test-suite From 9e00b5a920eff77c28259cf9ec510420081c614c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Mar 2019 13:12:13 +1000 Subject: [PATCH 193/317] test: comment out the ones we know work --- tests/tests.yml | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 110111d..e850623 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -1,27 +1,27 @@ --- -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - classic - tests: - - libinput-tool-beakerlib - -- hosts: localhost - roles: - - role: standard-test-basic - tags: - - classic - tests: - - libinput-tool - -- hosts: localhost - roles: - - role: standard-test-scripts - tags: - - classic - tests: - - libinput-tool-scripttest/libinput-tool-test.sh +#- hosts: localhost +# roles: +# - role: standard-test-beakerlib +# tags: +# - classic +# tests: +# - libinput-tool-beakerlib +# +#- hosts: localhost +# roles: +# - role: standard-test-basic +# tags: +# - classic +# tests: +# - libinput-tool +# +#- hosts: localhost +# roles: +# - role: standard-test-scripts +# tags: +# - classic +# tests: +# - libinput-tool-scripttest/libinput-tool-test.sh - hosts: localhost roles: From 5fc2f172d5aa524e4f1731c31cb3edccd64d5435 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Mar 2019 13:47:25 +1000 Subject: [PATCH 194/317] tests: libinput needs python3-devel before unpacking the source rpm --- tests/tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/tests.yml b/tests/tests.yml index e850623..f9df1d5 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -25,6 +25,10 @@ - hosts: localhost roles: + - role: standard-test-rpm + subjects: python3-devel # for pathfix during srpm prep + tags: + - always - role: standard-test-source tags: - always From 26830ff92db6b9d5a5cf38d3877504c1dda08fad Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Mar 2019 13:49:04 +1000 Subject: [PATCH 195/317] test: add more debugging printf --- tests/libinput-test-suite/runtest.sh | 6 ++++-- tests/tests.yml | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/libinput-test-suite/runtest.sh b/tests/libinput-test-suite/runtest.sh index 187dbca..e3665d8 100644 --- a/tests/libinput-test-suite/runtest.sh +++ b/tests/libinput-test-suite/runtest.sh @@ -1,12 +1,14 @@ #!/bin/bash export # let's see what's available +pwd ls /dev/input ls /dev/ -ls # let's debug where the actual tarball sits in case the next one fails +set -e +tree # figure out where we are # Can we use the spec file version number here?? -pushd libinput-* +pushd tests/source meson builddir -Ddocumentation=false -Dtests=true -Ddebug-gui=false ninja -C builddir test diff --git a/tests/tests.yml b/tests/tests.yml index f9df1d5..2ed83fd 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -43,5 +43,6 @@ - libwacom-devel - check-devel - systemd-devel + - tree # for debugging tests: - libinput-test-suite From b1adeff6f44c2e6202fc67eab481c798416395d7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Mar 2019 13:57:23 +1000 Subject: [PATCH 196/317] tests: add the tags to the helper roles too because, uhm? --- tests/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/tests.yml b/tests/tests.yml index 2ed83fd..e0c5597 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -29,9 +29,11 @@ subjects: python3-devel # for pathfix during srpm prep tags: - always + - classic - role: standard-test-source tags: - always + - classic - role: standard-test-basic tags: - classic From cb175af766d4104edc2b6f2ac0ce240349f9e9fa Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Mar 2019 14:30:36 +1000 Subject: [PATCH 197/317] test: so, why does this one always fail --- tests/tests.yml | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index e0c5597..7dc2448 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -25,26 +25,25 @@ - hosts: localhost roles: - - role: standard-test-rpm - subjects: python3-devel # for pathfix during srpm prep - tags: - - always - - classic +# - role: standard-test-rpm +# subjects: python3-devel # for pathfix during srpm prep +# tags: +# - always +# - classic - role: standard-test-source tags: - always - - classic - - role: standard-test-basic - tags: - - classic - required_packages: - - meson - - gcc - - mtdev-devel - - libevdev-devel - - libwacom-devel - - check-devel - - systemd-devel - - tree # for debugging - tests: - - libinput-test-suite +# - role: standard-test-basic +# tags: +# - classic +# required_packages: +# - meson +# - gcc +# - mtdev-devel +# - libevdev-devel +# - libwacom-devel +# - check-devel +# - systemd-devel +# - tree # for debugging +# tests: +# - libinput-test-suite From b10e42143d20552657b025a171e5a1bfa4a107b6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Mar 2019 15:12:42 +1000 Subject: [PATCH 198/317] sigh --- tests/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tests.yml b/tests/tests.yml index 7dc2448..1074f5c 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -33,6 +33,7 @@ - role: standard-test-source tags: - always + - classic # - role: standard-test-basic # tags: # - classic From 3519b52402a8f741e23f1ff11cb783295ce96dae Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Mar 2019 15:50:38 +1000 Subject: [PATCH 199/317] maybe this won't hang if we have some other role --- tests/tests.yml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 1074f5c..1c27406 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -1,4 +1,3 @@ ---- #- hosts: localhost # roles: # - role: standard-test-beakerlib @@ -34,17 +33,17 @@ tags: - always - classic -# - role: standard-test-basic -# tags: -# - classic -# required_packages: -# - meson -# - gcc -# - mtdev-devel -# - libevdev-devel -# - libwacom-devel -# - check-devel -# - systemd-devel -# - tree # for debugging -# tests: -# - libinput-test-suite + - role: standard-test-basic + tags: + - classic + required_packages: + - meson + - gcc + - mtdev-devel + - libevdev-devel + - libwacom-devel + - check-devel + - systemd-devel + - tree # for debugging + tests: + - libinput-test-suite From a0c4d91a3c0579b4f464d584e5931482b625bc53 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Mar 2019 15:59:26 +1000 Subject: [PATCH 200/317] another attempt --- tests/libinput-test-suite/runtest.sh | 2 +- tests/tests.yml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/libinput-test-suite/runtest.sh b/tests/libinput-test-suite/runtest.sh index e3665d8..91e2249 100644 --- a/tests/libinput-test-suite/runtest.sh +++ b/tests/libinput-test-suite/runtest.sh @@ -8,7 +8,7 @@ ls /dev/ set -e tree # figure out where we are # Can we use the spec file version number here?? -pushd tests/source +pushd ../source meson builddir -Ddocumentation=false -Dtests=true -Ddebug-gui=false ninja -C builddir test diff --git a/tests/tests.yml b/tests/tests.yml index 1c27406..71b74f8 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -24,12 +24,12 @@ - hosts: localhost roles: -# - role: standard-test-rpm -# subjects: python3-devel # for pathfix during srpm prep -# tags: -# - always -# - classic - - role: standard-test-source + - role: standard-test-rpm + subjects: python3-devel # for pathfix during srpm prep + tags: + - always + - classic + - role: standard-test-source tags: - always - classic From ad6fa2b778760956f6ec5e1304e40d1f39172835 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Mar 2019 16:32:05 +1000 Subject: [PATCH 201/317] more Signed-off-by: Peter Hutterer --- tests/tests.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 71b74f8..2038ba7 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -1,3 +1,4 @@ +--- #- hosts: localhost # roles: # - role: standard-test-beakerlib @@ -25,11 +26,11 @@ - hosts: localhost roles: - role: standard-test-rpm - subjects: python3-devel # for pathfix during srpm prep + subjects: python3-devel # for pathfix during srpm prep tags: - always - classic - - role: standard-test-source + - role: standard-test-source tags: - always - classic @@ -44,6 +45,7 @@ - libwacom-devel - check-devel - systemd-devel - - tree # for debugging + - valgrind + - tree # for debugging tests: - libinput-test-suite From cd9d18ed85c28f8395133042774b1b16dbeaaa71 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Mar 2019 16:52:48 +1000 Subject: [PATCH 202/317] this worked on a local container --- tests/libinput-test-suite/runtest.sh | 12 ++++++------ tests/tests.yml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/libinput-test-suite/runtest.sh b/tests/libinput-test-suite/runtest.sh index 91e2249..ce7b1ff 100644 --- a/tests/libinput-test-suite/runtest.sh +++ b/tests/libinput-test-suite/runtest.sh @@ -1,13 +1,13 @@ #!/bin/bash -export # let's see what's available +export # let's see what's available pwd -ls /dev/input -ls /dev/ - set -e -tree # figure out where we are -# Can we use the spec file version number here?? + +ls /dev/input # if this fails, we don't have a VM +ls /dev/uinput # same as above + +# this is where the standard-test-source extracts to pushd ../source meson builddir -Ddocumentation=false -Dtests=true -Ddebug-gui=false diff --git a/tests/tests.yml b/tests/tests.yml index 2038ba7..6a7af54 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -40,12 +40,12 @@ required_packages: - meson - gcc + - gcc-c++ - mtdev-devel - libevdev-devel - libwacom-devel - check-devel - systemd-devel - valgrind - - tree # for debugging tests: - libinput-test-suite From 5a01545f08d0d1a6846fd1522382d7148178113c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Mar 2019 20:02:43 +1000 Subject: [PATCH 203/317] try taking the classic bits out again because really, I'm just blindly stabbing into the dark here --- tests/tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 6a7af54..5caec17 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -29,11 +29,9 @@ subjects: python3-devel # for pathfix during srpm prep tags: - always - - classic - role: standard-test-source tags: - always - - classic - role: standard-test-basic tags: - classic From 20e91094240ae68479ebda7d713d3a0a29a2f686 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Mar 2019 21:13:10 +1000 Subject: [PATCH 204/317] replace the rpm role with a fake test https://pagure.io/standard-test-roles/issue/307 --- tests/tests.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 5caec17..4a727af 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -25,8 +25,15 @@ - hosts: localhost roles: - - role: standard-test-rpm - subjects: python3-devel # for pathfix during srpm prep + # standard-test-rpm should do this but it's currently broken. So let's add + # a noop test that requires the package we need + - role: standard-test-basic + required_packages: + - python3-devel # for pathfix during srpm prep + tests: + - simple: + dir: . + command: echo "intentional noop" tags: - always - role: standard-test-source From a877c718b0e21f6feb9592dd608271966d70dfbf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Mar 2019 21:40:27 +1000 Subject: [PATCH 205/317] run, not command --- tests/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests.yml b/tests/tests.yml index 4a727af..de3e393 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -33,7 +33,7 @@ tests: - simple: dir: . - command: echo "intentional noop" + run: "echo noop" tags: - always - role: standard-test-source From 12ffd8a00fc06213025b72875e61be92f9b26111 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 11 Mar 2019 10:58:04 +1000 Subject: [PATCH 206/317] tests: test the repo standard role --- tests/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/tests.yml b/tests/tests.yml index de3e393..901d59e 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -25,6 +25,9 @@ - hosts: localhost roles: + - role: standard-test-repo + subjects: https://copr-be.cloud.fedoraproject.org/results/whot/libinput-git/fedora-29-x86_64/ + packages: libinput # standard-test-rpm should do this but it's currently broken. So let's add # a noop test that requires the package we need - role: standard-test-basic From f9a35416ea2d967f7c6c816fda4cbe7d891b8d2a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 11 Mar 2019 12:29:08 +1000 Subject: [PATCH 207/317] test: grasping at straws here This cannot possibly the reason why the required_packages is ignored, but... --- tests/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 901d59e..ff820e6 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -31,14 +31,14 @@ # standard-test-rpm should do this but it's currently broken. So let's add # a noop test that requires the package we need - role: standard-test-basic - required_packages: - - python3-devel # for pathfix during srpm prep tests: - simple: dir: . run: "echo noop" tags: - always + required_packages: + - python3-devel # for pathfix during srpm prep - role: standard-test-source tags: - always From 0b809079670bfb12e62a4237bfe9c46b0de7ec6a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 11 Mar 2019 12:32:34 +1000 Subject: [PATCH 208/317] tests: tag that test with classic --- tests/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tests.yml b/tests/tests.yml index ff820e6..81079a2 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -37,6 +37,7 @@ run: "echo noop" tags: - always + - classic required_packages: - python3-devel # for pathfix during srpm prep - role: standard-test-source From 0d3f247766822f6376f792e7d6df9d940237895b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 11 Mar 2019 12:34:24 +1000 Subject: [PATCH 209/317] tests: make the repo test always and don't have always and classic in the same --- tests/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/tests.yml b/tests/tests.yml index 81079a2..649ab47 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -28,6 +28,8 @@ - role: standard-test-repo subjects: https://copr-be.cloud.fedoraproject.org/results/whot/libinput-git/fedora-29-x86_64/ packages: libinput + tags: + - always # standard-test-rpm should do this but it's currently broken. So let's add # a noop test that requires the package we need - role: standard-test-basic @@ -37,7 +39,6 @@ run: "echo noop" tags: - always - - classic required_packages: - python3-devel # for pathfix during srpm prep - role: standard-test-source From f26839db7a15bc7c7414f1a9f91225fd1c5b212e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 11 Mar 2019 12:54:24 +1000 Subject: [PATCH 210/317] test: always does not mean always, apparently --- tests/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 649ab47..df64e6b 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -29,7 +29,7 @@ subjects: https://copr-be.cloud.fedoraproject.org/results/whot/libinput-git/fedora-29-x86_64/ packages: libinput tags: - - always + - classic # running this with always doesn't do anything # standard-test-rpm should do this but it's currently broken. So let's add # a noop test that requires the package we need - role: standard-test-basic @@ -38,7 +38,7 @@ dir: . run: "echo noop" tags: - - always + - classic # running this with always doesn't do anythign required_packages: - python3-devel # for pathfix during srpm prep - role: standard-test-source From bf49b3f44bcb3e435774acc5616ea2b7da8364cd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 11 Mar 2019 14:12:17 +1000 Subject: [PATCH 211/317] tests: only have one role with required_packages move the python3-devel package to the other role because https://pagure.io/standard-test-roles/issue/311 --- tests/tests.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index df64e6b..195e9cc 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -30,17 +30,6 @@ packages: libinput tags: - classic # running this with always doesn't do anything - # standard-test-rpm should do this but it's currently broken. So let's add - # a noop test that requires the package we need - - role: standard-test-basic - tests: - - simple: - dir: . - run: "echo noop" - tags: - - classic # running this with always doesn't do anythign - required_packages: - - python3-devel # for pathfix during srpm prep - role: standard-test-source tags: - always @@ -57,5 +46,6 @@ - check-devel - systemd-devel - valgrind + - python3-devel # for pathfix during srpm prep tests: - libinput-test-suite From 8baca5646627d641e3a38393a50362e343e3c072 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 11 Mar 2019 14:30:09 +1000 Subject: [PATCH 212/317] test: move the required_packages up because of course we need to install this before the -source role --- tests/tests.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 195e9cc..2565a88 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -30,9 +30,9 @@ packages: libinput tags: - classic # running this with always doesn't do anything - - role: standard-test-source - tags: - - always + # sigh, we need this separately because of + # https://pagure.io/standard-test-roles/issue/307 and + # https://pagure.io/standard-test-roles/issue/311 - role: standard-test-basic tags: - classic @@ -47,5 +47,15 @@ - systemd-devel - valgrind - python3-devel # for pathfix during srpm prep + tests: + - simple: + dir: . + run: "echo noop" + - role: standard-test-source + tags: + - always + - role: standard-test-basic + tags: + - classic tests: - libinput-test-suite From d2fb3d5b28707d4390b2532f575cb31c0c0a0a1c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 11 Mar 2019 15:13:48 +1000 Subject: [PATCH 213/317] drop the -repo role It's broken, see https://pagure.io/standard-test-roles/issue/312, let someone else figure out how much more it's broken. --- tests/tests.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 2565a88..39fd007 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -25,11 +25,6 @@ - hosts: localhost roles: - - role: standard-test-repo - subjects: https://copr-be.cloud.fedoraproject.org/results/whot/libinput-git/fedora-29-x86_64/ - packages: libinput - tags: - - classic # running this with always doesn't do anything # sigh, we need this separately because of # https://pagure.io/standard-test-roles/issue/307 and # https://pagure.io/standard-test-roles/issue/311 From 087fb1210fb65e6a0ba62e5538e3b80a1a13f7b1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 11 Mar 2019 15:33:30 +1000 Subject: [PATCH 214/317] use the same tags everywhere --- tests/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests.yml b/tests/tests.yml index 39fd007..883b832 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -48,7 +48,7 @@ run: "echo noop" - role: standard-test-source tags: - - always + - classic - role: standard-test-basic tags: - classic From 146af17adacd454c7aaf4fd8578edfdc26f95f2f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 11 Mar 2019 16:51:16 +1000 Subject: [PATCH 215/317] test for pathfix.py --- tests/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests.yml b/tests/tests.yml index 883b832..3ad4fb7 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -45,7 +45,7 @@ tests: - simple: dir: . - run: "echo noop" + run: test -f /usr/bin/pathfix.py - role: standard-test-source tags: - classic From 51e150c06bef710d55ddc4c11e59e6b43547926a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 14 Mar 2019 15:59:02 +1000 Subject: [PATCH 216/317] libinput 1.12.901 --- libinput.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libinput.spec b/libinput.spec index 932c907..06acbc7 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.12.6 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.12.901 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -117,6 +117,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-replay.1* %changelog +* Thu Mar 14 2019 Peter Hutterer 1.12.901-1 +- libinput 1.12.901 + * Thu Feb 14 2019 Peter Hutterer 1.12.6-3 - Don't update the hwdb on install, we don't have any hwdb files anymore diff --git a/sources b/sources index c79baaa..86a62b8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.12.6.tar.xz) = 02ad90c77a0c8c27fd96ec34e1546c5f0947ced49bad386372c1ef7c41b3b2157c39020f0766f20aaf2ab3c97128567e169279bea21115ced39499dda325d2ef +SHA512 (libinput-1.12.901.tar.xz) = 98801fc25cf56126d25d17128f7f344371a0edee5b762709dac22e272abcdf134d69d83fa9c014007fbc193079d447cd20b12563ae8a8c6844b3e3d191663f25 From 8bdce90385ff82b50431c4a0cd758653f5e765fd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 14 Mar 2019 18:17:38 +1000 Subject: [PATCH 217/317] Require python3-libevdev for the utils subpackage --- libinput.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 06acbc7..e1b6236 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.12.901 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -47,7 +47,7 @@ developing applications that use %{name}. %package utils Summary: Utilities and tools for debugging %{name} Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: python3-evdev python3-pyudev +Requires: python3-evdev python3-pyudev python3-libevdev %description utils The %{name}-utils package contains tools to debug hardware and analyze @@ -117,6 +117,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-replay.1* %changelog +* Fri Mar 15 2019 Peter Hutterer 1.12.901-2 +- Require python3-libevdev for the utils subpackage + * Thu Mar 14 2019 Peter Hutterer 1.12.901-1 - libinput 1.12.901 From c358832c15d97ca970cfc056286c4da6484c5588 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 21 Mar 2019 11:18:49 +1000 Subject: [PATCH 218/317] Package the tests suite as subpackage --- 0001-meson.build-make-valgrind-optional.patch | 66 +++++++++++++++++++ libinput.spec | 23 ++++++- 2 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 0001-meson.build-make-valgrind-optional.patch diff --git a/0001-meson.build-make-valgrind-optional.patch b/0001-meson.build-make-valgrind-optional.patch new file mode 100644 index 0000000..7fa1ba0 --- /dev/null +++ b/0001-meson.build-make-valgrind-optional.patch @@ -0,0 +1,66 @@ +From b8123db0df7f1d358bcd2a1cc984095f4091fe61 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 15 Mar 2019 10:23:25 +1000 +Subject: [PATCH libinput] meson.build: make valgrind optional + +Now that we're providing the test suite as installed option, distributions +will likely include it as a test package. valgrind is only used for the +meson-specifc test setup. So let's make it optional. + +Signed-off-by: Peter Hutterer +--- + .gitlab-ci.yml | 8 +++++--- + meson.build | 30 +++++++++++++++++------------- + 2 files changed, 22 insertions(+), 16 deletions(-) + +diff --git a/meson.build b/meson.build +index 6e1e5590..cb3218b2 100644 +--- a/meson.build ++++ b/meson.build +@@ -665,7 +665,6 @@ endif + # dependencies + if get_option('tests') + dep_check = dependency('check', version : '>= 0.9.10') +- valgrind = find_program('valgrind') + + leftover_rules = find_program('test/check-leftover-udev-rules.sh') + test('leftover-rules', leftover_rules, is_parallel : false) +@@ -865,18 +864,23 @@ if get_option('tests') + libinput_test_runner, + args: ['--filter-deviceless']) + +- valgrind_env = environment() +- valgrind_env.set('CK_FORK', 'no') +- valgrind_env.set('USING_VALGRIND', '1') +- valgrind_suppressions_file = join_paths(dir_src_test, 'valgrind.suppressions') +- add_test_setup('valgrind', +- exe_wrapper : [ valgrind, +- '--leak-check=full', +- '--gen-suppressions=all', +- '--error-exitcode=3', +- '--suppressions=' + valgrind_suppressions_file ], +- env : valgrind_env, +- timeout_multiplier : 100) ++ valgrind = find_program('valgrind', required : false) ++ if valgrind.found() ++ valgrind_env = environment() ++ valgrind_env.set('CK_FORK', 'no') ++ valgrind_env.set('USING_VALGRIND', '1') ++ valgrind_suppressions_file = join_paths(dir_src_test, 'valgrind.suppressions') ++ add_test_setup('valgrind', ++ exe_wrapper : [ valgrind, ++ '--leak-check=full', ++ '--gen-suppressions=all', ++ '--error-exitcode=3', ++ '--suppressions=' + valgrind_suppressions_file ], ++ env : valgrind_env, ++ timeout_multiplier : 100) ++ else ++ message('valgrind not found, disabling valgrind test suite') ++ endif + configure_file(output : 'litest-config.h', + install : false, + configuration : litest_config_h) +-- +2.20.1 + diff --git a/libinput.spec b/libinput.spec index e1b6236..e1230d1 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.12.901 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-meson.build-make-valgrind-optional.patch + BuildRequires: git-core BuildRequires: gcc gcc-c++ BuildRequires: meson @@ -26,6 +28,7 @@ BuildRequires: pkgconfig(mtdev) >= 1.1.0 BuildRequires: pkgconfig(libevdev) >= 0.4 BuildRequires: pkgconfig(libwacom) >= 0.20 BuildRequires: python3-devel +BuildRequires: check-devel %description libinput is a library that handles input devices for display servers and other @@ -53,6 +56,14 @@ Requires: python3-evdev python3-pyudev python3-libevdev The %{name}-utils package contains tools to debug hardware and analyze %{name}. +%package test +Summary: libinput integration test suite +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description test +The %{name}-test package contains the libinput test suite. It is not +intended to be run by users. + %prep %autosetup -S git # Replace whatever the source uses with the approved call @@ -61,7 +72,8 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %build %meson -Ddebug-gui=false \ -Ddocumentation=false \ - -Dtests=false \ + -Dtests=true \ + -Dinstall-tests=true \ -Dudev-dir=%{udevdir} %meson_build @@ -116,7 +128,14 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-record.1* %{_mandir}/man1/libinput-replay.1* +%files test +%{_libexecdir}/libinput/libinput-test-suite +%{_mandir}/man1/libinput-test-suite.1* + %changelog +* Thu Mar 21 2019 Peter Hutterer 1.12.901-3 +- Package the tests suite as subpackage + * Fri Mar 15 2019 Peter Hutterer 1.12.901-2 - Require python3-libevdev for the utils subpackage From b0b7bd9a11754aa3eec5fd3b5fef2df495196c3b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 21 Mar 2019 17:30:41 +1000 Subject: [PATCH 219/317] libinput 1.12.902 --- 0001-meson.build-make-valgrind-optional.patch | 66 ------------------- libinput.spec | 9 +-- sources | 2 +- 3 files changed, 6 insertions(+), 71 deletions(-) delete mode 100644 0001-meson.build-make-valgrind-optional.patch diff --git a/0001-meson.build-make-valgrind-optional.patch b/0001-meson.build-make-valgrind-optional.patch deleted file mode 100644 index 7fa1ba0..0000000 --- a/0001-meson.build-make-valgrind-optional.patch +++ /dev/null @@ -1,66 +0,0 @@ -From b8123db0df7f1d358bcd2a1cc984095f4091fe61 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 15 Mar 2019 10:23:25 +1000 -Subject: [PATCH libinput] meson.build: make valgrind optional - -Now that we're providing the test suite as installed option, distributions -will likely include it as a test package. valgrind is only used for the -meson-specifc test setup. So let's make it optional. - -Signed-off-by: Peter Hutterer ---- - .gitlab-ci.yml | 8 +++++--- - meson.build | 30 +++++++++++++++++------------- - 2 files changed, 22 insertions(+), 16 deletions(-) - -diff --git a/meson.build b/meson.build -index 6e1e5590..cb3218b2 100644 ---- a/meson.build -+++ b/meson.build -@@ -665,7 +665,6 @@ endif - # dependencies - if get_option('tests') - dep_check = dependency('check', version : '>= 0.9.10') -- valgrind = find_program('valgrind') - - leftover_rules = find_program('test/check-leftover-udev-rules.sh') - test('leftover-rules', leftover_rules, is_parallel : false) -@@ -865,18 +864,23 @@ if get_option('tests') - libinput_test_runner, - args: ['--filter-deviceless']) - -- valgrind_env = environment() -- valgrind_env.set('CK_FORK', 'no') -- valgrind_env.set('USING_VALGRIND', '1') -- valgrind_suppressions_file = join_paths(dir_src_test, 'valgrind.suppressions') -- add_test_setup('valgrind', -- exe_wrapper : [ valgrind, -- '--leak-check=full', -- '--gen-suppressions=all', -- '--error-exitcode=3', -- '--suppressions=' + valgrind_suppressions_file ], -- env : valgrind_env, -- timeout_multiplier : 100) -+ valgrind = find_program('valgrind', required : false) -+ if valgrind.found() -+ valgrind_env = environment() -+ valgrind_env.set('CK_FORK', 'no') -+ valgrind_env.set('USING_VALGRIND', '1') -+ valgrind_suppressions_file = join_paths(dir_src_test, 'valgrind.suppressions') -+ add_test_setup('valgrind', -+ exe_wrapper : [ valgrind, -+ '--leak-check=full', -+ '--gen-suppressions=all', -+ '--error-exitcode=3', -+ '--suppressions=' + valgrind_suppressions_file ], -+ env : valgrind_env, -+ timeout_multiplier : 100) -+ else -+ message('valgrind not found, disabling valgrind test suite') -+ endif - configure_file(output : 'litest-config.h', - install : false, - configuration : litest_config_h) --- -2.20.1 - diff --git a/libinput.spec b/libinput.spec index e1230d1..2c91717 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.12.901 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.12.902 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,8 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-meson.build-make-valgrind-optional.patch - BuildRequires: git-core BuildRequires: gcc gcc-c++ BuildRequires: meson @@ -133,6 +131,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Thu Mar 21 2019 Peter Hutterer 1.12.902-1 +- libinput 1.12.902 + * Thu Mar 21 2019 Peter Hutterer 1.12.901-3 - Package the tests suite as subpackage diff --git a/sources b/sources index 86a62b8..d8649e8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.12.901.tar.xz) = 98801fc25cf56126d25d17128f7f344371a0edee5b762709dac22e272abcdf134d69d83fa9c014007fbc193079d447cd20b12563ae8a8c6844b3e3d191663f25 +SHA512 (libinput-1.12.902.tar.xz) = f87379e95b057312b9c908f4b5948b93bc7d6b7cafae2fa6156e2dadd912361fc9a8f50c44419b9941b24e28765bbaab83e16af10caf7d59fd9dd489644aa075 From 3d762402a92d7635a5ad4f13e6778ae2afebceb0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 22 Mar 2019 10:34:30 +1000 Subject: [PATCH 220/317] Drop the testing bits, accidentally committed to master This was supposed to be a test PR for the test suite, on a private branch. Somehow ended up on master and got accidentally commited with the recent libinput update. Remove it again, this was never supposed to be on master. --- tests/libinput-test-suite/PURPOSE | 5 -- tests/libinput-test-suite/runtest.sh | 16 ------ tests/libinput-tool-beakerlib/PURPOSE | 4 -- tests/libinput-tool-beakerlib/runtest.sh | 34 ----------- .../libinput-tool-test.sh | 16 ------ tests/libinput-tool/PURPOSE | 5 -- tests/libinput-tool/runtest.sh | 16 ------ tests/tests.yml | 56 ------------------- 8 files changed, 152 deletions(-) delete mode 100644 tests/libinput-test-suite/PURPOSE delete mode 100644 tests/libinput-test-suite/runtest.sh delete mode 100644 tests/libinput-tool-beakerlib/PURPOSE delete mode 100644 tests/libinput-tool-beakerlib/runtest.sh delete mode 100644 tests/libinput-tool-scripttest/libinput-tool-test.sh delete mode 100644 tests/libinput-tool/PURPOSE delete mode 100644 tests/libinput-tool/runtest.sh delete mode 100644 tests/tests.yml diff --git a/tests/libinput-test-suite/PURPOSE b/tests/libinput-test-suite/PURPOSE deleted file mode 100644 index 4396bd4..0000000 --- a/tests/libinput-test-suite/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of libinput-test-suite -Description: Full test suite run for libinput -Author: Peter Hutterer - - diff --git a/tests/libinput-test-suite/runtest.sh b/tests/libinput-test-suite/runtest.sh deleted file mode 100644 index ce7b1ff..0000000 --- a/tests/libinput-test-suite/runtest.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -export # let's see what's available -pwd -set -e - -ls /dev/input # if this fails, we don't have a VM -ls /dev/uinput # same as above - -# this is where the standard-test-source extracts to -pushd ../source - -meson builddir -Ddocumentation=false -Dtests=true -Ddebug-gui=false -ninja -C builddir test - -popd > /dev/null diff --git a/tests/libinput-tool-beakerlib/PURPOSE b/tests/libinput-tool-beakerlib/PURPOSE deleted file mode 100644 index 5ba320c..0000000 --- a/tests/libinput-tool-beakerlib/PURPOSE +++ /dev/null @@ -1,4 +0,0 @@ -PURPOSE of libinput-tool-beakerlib -Description: Test for the libinput commandline tool -Author: Peter Hutterer - diff --git a/tests/libinput-tool-beakerlib/runtest.sh b/tests/libinput-tool-beakerlib/runtest.sh deleted file mode 100644 index 486b100..0000000 --- a/tests/libinput-tool-beakerlib/runtest.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# Include rhts environment -. /usr/bin/rhts-environment.sh -. /usr/share/rhts-library/rhtslib.sh - -PACKAGE="libinput" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlAssertRpm $PACKAGE-utils - rlPhaseEnd - - rlPhaseStartTest - rlRun "libinput --help" 0 "libinput help exists cleanly" - rlRun "libinput --version" 0 "libinput version exists cleanly" - rlPhaseEnd - - rlPhaseStartTest - rlRun "libinput quirks validate" 0 "libinput quirks parse " - rlPhaseEnd - - rlPhaseStartTest - rlRun "libinput record --help" 0 "libinput record exists" - rlRun "libinput measure --help" 0 "libinput measure exists" - rlRun "libinput measure fuzz --help" 0 "libinput measure fuzz exists" - rlRun "libinput measure touch-size --help" 0 "libinput measure touch-size exists" - rlRun "libinput measure touchpad-pressure --help" 0 "libinput touchpad-pressure exists" - rlRun "libinput measure touchpad-tap --help" 0 "libinput touchpad-tap exists" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd - diff --git a/tests/libinput-tool-scripttest/libinput-tool-test.sh b/tests/libinput-tool-scripttest/libinput-tool-test.sh deleted file mode 100644 index 2e77ad2..0000000 --- a/tests/libinput-tool-scripttest/libinput-tool-test.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# check libinput is in the path, --help and --version need to work -libinput --help -libinput --version - -# this should fail if the quirks failed to install -libinput quirks validate - -# check the various tools exist -libinput record --help -libinput measure --help -libinput measure fuzz --help -libinput measure touch-size --help -libinput measure touchpad-pressure --help -libinput measure touchpad-tap --help diff --git a/tests/libinput-tool/PURPOSE b/tests/libinput-tool/PURPOSE deleted file mode 100644 index 297a94b..0000000 --- a/tests/libinput-tool/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of libinput-tool -Description: Test for the libinput commandline tool -Author: Peter Hutterer - - diff --git a/tests/libinput-tool/runtest.sh b/tests/libinput-tool/runtest.sh deleted file mode 100644 index 2e77ad2..0000000 --- a/tests/libinput-tool/runtest.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# check libinput is in the path, --help and --version need to work -libinput --help -libinput --version - -# this should fail if the quirks failed to install -libinput quirks validate - -# check the various tools exist -libinput record --help -libinput measure --help -libinput measure fuzz --help -libinput measure touch-size --help -libinput measure touchpad-pressure --help -libinput measure touchpad-tap --help diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 3ad4fb7..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,56 +0,0 @@ ---- -#- hosts: localhost -# roles: -# - role: standard-test-beakerlib -# tags: -# - classic -# tests: -# - libinput-tool-beakerlib -# -#- hosts: localhost -# roles: -# - role: standard-test-basic -# tags: -# - classic -# tests: -# - libinput-tool -# -#- hosts: localhost -# roles: -# - role: standard-test-scripts -# tags: -# - classic -# tests: -# - libinput-tool-scripttest/libinput-tool-test.sh - -- hosts: localhost - roles: - # sigh, we need this separately because of - # https://pagure.io/standard-test-roles/issue/307 and - # https://pagure.io/standard-test-roles/issue/311 - - role: standard-test-basic - tags: - - classic - required_packages: - - meson - - gcc - - gcc-c++ - - mtdev-devel - - libevdev-devel - - libwacom-devel - - check-devel - - systemd-devel - - valgrind - - python3-devel # for pathfix during srpm prep - tests: - - simple: - dir: . - run: test -f /usr/bin/pathfix.py - - role: standard-test-source - tags: - - classic - - role: standard-test-basic - tags: - - classic - tests: - - libinput-test-suite From 2d5c82a8a297157aa9193f54ad529a7141c9c7ed Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 29 Mar 2019 10:28:02 +1000 Subject: [PATCH 221/317] libinput 1.13.0 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 2c91717..d14e1dc 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.12.902 +Version: 1.13.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -131,6 +131,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Fri Mar 29 2019 Peter Hutterer 1.13.0-1 +- libinput 1.13.0 + * Thu Mar 21 2019 Peter Hutterer 1.12.902-1 - libinput 1.12.902 diff --git a/sources b/sources index d8649e8..657351f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.12.902.tar.xz) = f87379e95b057312b9c908f4b5948b93bc7d6b7cafae2fa6156e2dadd912361fc9a8f50c44419b9941b24e28765bbaab83e16af10caf7d59fd9dd489644aa075 +SHA512 (libinput-1.13.0.tar.xz) = 0e3f53acf90fe142ad677b416d1ee830ad7f7f8a83b80023278ea7d3696ff7af5612379b387b1eb5daae6277a8c30d84c21f0086fe3d8b4b6189f239b1eeb4f8 From b3e278f6c01389a0ed414f3e3f5a560da229fb32 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 9 Apr 2019 12:37:15 +1000 Subject: [PATCH 222/317] libinput 1.13.1 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index d14e1dc..4cbe478 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.13.0 +Version: 1.13.1 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -131,6 +131,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Tue Apr 09 2019 Peter Hutterer 1.13.1-1 +- libinput 1.13.1 + * Fri Mar 29 2019 Peter Hutterer 1.13.0-1 - libinput 1.13.0 diff --git a/sources b/sources index 657351f..4f43368 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.13.0.tar.xz) = 0e3f53acf90fe142ad677b416d1ee830ad7f7f8a83b80023278ea7d3696ff7af5612379b387b1eb5daae6277a8c30d84c21f0086fe3d8b4b6189f239b1eeb4f8 +SHA512 (libinput-1.13.1.tar.xz) = a19deec802e704038df0901c103a82a3370f56e0299f4cc1b6aa84c1832a66fb638e6f9d0fa708b51df6c3b939cdc1271e4ff547c645c566be03dce0bc9ff7e0 From 05efae5b0255a3ddb59b7d44200bcbab0e9c73f5 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 16 Apr 2019 11:40:08 -0700 Subject: [PATCH 223/317] Rebuild with Meson fix for #1699099 --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 4cbe478..07a31af 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.13.1 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -131,6 +131,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Tue Apr 16 2019 Adam Williamson - 1.13.1-2 +- Rebuild with Meson fix for #1699099 + * Tue Apr 09 2019 Peter Hutterer 1.13.1-1 - libinput 1.13.1 From 40f47f9381a2c7c3176112c245cfcf4b6a60556f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 9 May 2019 11:20:17 +1000 Subject: [PATCH 224/317] libinput 1.13.2 --- libinput.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libinput.spec b/libinput.spec index 07a31af..539c5f2 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.13.1 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.13.2 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -131,6 +131,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Thu May 09 2019 Peter Hutterer 1.13.2-1 +- libinput 1.13.2 + * Tue Apr 16 2019 Adam Williamson - 1.13.1-2 - Rebuild with Meson fix for #1699099 diff --git a/sources b/sources index 4f43368..b910060 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.13.1.tar.xz) = a19deec802e704038df0901c103a82a3370f56e0299f4cc1b6aa84c1832a66fb638e6f9d0fa708b51df6c3b939cdc1271e4ff547c645c566be03dce0bc9ff7e0 +SHA512 (libinput-1.13.2.tar.xz) = 26f11c5274c26acc38b9b5729195010c0799a9563f1eb0e0cd67e323f8ed73b0fc8db8584ec8fdf1b726417f64c2daeb54832167079832626c8c1190fccf459f From 1a30f78cc4ab15d2f5d4a5ef22a58b4406e71f8b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 24 Jun 2019 15:21:43 +1000 Subject: [PATCH 225/317] libinput 1.13.3 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 539c5f2..377c33c 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.13.2 +Version: 1.13.3 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -131,6 +131,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Mon Jun 24 2019 Peter Hutterer 1.13.3-1 +- libinput 1.13.3 + * Thu May 09 2019 Peter Hutterer 1.13.2-1 - libinput 1.13.2 diff --git a/sources b/sources index b910060..8d4d75f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.13.2.tar.xz) = 26f11c5274c26acc38b9b5729195010c0799a9563f1eb0e0cd67e323f8ed73b0fc8db8584ec8fdf1b726417f64c2daeb54832167079832626c8c1190fccf459f +SHA512 (libinput-1.13.3.tar.xz) = 427ec838975444571770e129ef78fd42e4438a11e89ed0b3fc98793184d00c0ca8ed282eab2045cc6cb345804ad6fce1061af563b4f41d75405cdf2f09cb01e1 From 7f5c82ce7dc7cb797893f03e94e1ab7e8a81d67a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 28 Jun 2019 10:51:38 +1000 Subject: [PATCH 226/317] libinput 1.13.4 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 377c33c..243b188 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.13.3 +Version: 1.13.4 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -131,6 +131,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Fri Jun 28 2019 Peter Hutterer 1.13.4-1 +- libinput 1.13.4 + * Mon Jun 24 2019 Peter Hutterer 1.13.3-1 - libinput 1.13.3 diff --git a/sources b/sources index 8d4d75f..2f0c91c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.13.3.tar.xz) = 427ec838975444571770e129ef78fd42e4438a11e89ed0b3fc98793184d00c0ca8ed282eab2045cc6cb345804ad6fce1061af563b4f41d75405cdf2f09cb01e1 +SHA512 (libinput-1.13.4.tar.xz) = ccfdfc704dab9ea19a503399ecd4ce3a95b8d9480b8dfddeb80be01236c34c6f2f472be0e12e04dddd68092611470d303351e092141bc7491729639bcf7e64d7 From 65b20246baacae31525bae9a6ff8e8856ac74c59 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 13:32:12 +0000 Subject: [PATCH 227/317] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 243b188..7c59f08 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.13.4 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -131,6 +131,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 1.13.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Fri Jun 28 2019 Peter Hutterer 1.13.4-1 - libinput 1.13.4 From d1165ffd8d2c9889abf598e4629b7b6cb9c33566 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 19 Jul 2019 12:30:40 +1000 Subject: [PATCH 228/317] libinput 1.14rc2 --- libinput.spec | 13 ++++++++----- sources | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libinput.spec b/libinput.spec index 7c59f08..2b29558 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.13.4 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.13.902 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -48,7 +48,7 @@ developing applications that use %{name}. %package utils Summary: Utilities and tools for debugging %{name} Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: python3-evdev python3-pyudev python3-libevdev +Requires: python3-pyudev python3-libevdev %description utils The %{name}-utils package contains tools to debug hardware and analyze @@ -88,9 +88,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %doc COPYING %{_libdir}/libinput.so.* %{udevdir}/libinput-device-group -%{udevdir}/libinput-model-quirks +%{udevdir}/libinput-fuzz-override %{udevdir}/rules.d/80-libinput-device-groups.rules -%{udevdir}/rules.d/90-libinput-model-quirks.rules +%{udevdir}/rules.d/90-libinput-fuzz-override.rules %{_bindir}/libinput %dir %{_libexecdir}/libinput/ %{_libexecdir}/libinput/libinput-debug-events @@ -131,6 +131,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Wed Jul 31 2019 Peter Hutterer 1.13.902-1 +- libinput 1.14rc2 + * Thu Jul 25 2019 Fedora Release Engineering - 1.13.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 2f0c91c..9df2ba5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.13.4.tar.xz) = ccfdfc704dab9ea19a503399ecd4ce3a95b8d9480b8dfddeb80be01236c34c6f2f472be0e12e04dddd68092611470d303351e092141bc7491729639bcf7e64d7 +SHA512 (libinput-1.13.902.tar.xz) = d661f90d49ee0b39c87b962f02968f9b6642f1b3dd141c3fa07d40bd4b170e4ba4163d294d66721317972a7a30b589109639829b48c70070004337580c0a2e36 From 303db7dcbb1f3e904c6f434a04290ea10f9f301d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 Aug 2019 15:17:28 +1000 Subject: [PATCH 229/317] libinput 1.14 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 2b29558..6cb0024 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.13.902 +Version: 1.14.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -131,6 +131,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Thu Aug 08 2019 Peter Hutterer 1.14.0-1 +- libinput 1.14 + * Wed Jul 31 2019 Peter Hutterer 1.13.902-1 - libinput 1.14rc2 diff --git a/sources b/sources index 9df2ba5..c8077cd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.13.902.tar.xz) = d661f90d49ee0b39c87b962f02968f9b6642f1b3dd141c3fa07d40bd4b170e4ba4163d294d66721317972a7a30b589109639829b48c70070004337580c0a2e36 +SHA512 (libinput-1.14.0.tar.xz) = e501c5b8a58bb287c175692af0e59ff766a8613eb576aaa0700686dfbb6c6ab63b7a5d3f148fce75397c8170bc49871068861d93c352355ab5d0d9e7f1b059ec From b597484c60dcf60295f3f68f1b4af857a1d980af Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 20 Aug 2019 08:13:49 +1000 Subject: [PATCH 230/317] Fix click+drag on clickpads --- ...llow-gestures-with-a-clickpad-button.patch | 162 ++++++++++++++++++ libinput.spec | 7 +- 2 files changed, 168 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-don-t-allow-gestures-with-a-clickpad-button.patch diff --git a/0001-touchpad-don-t-allow-gestures-with-a-clickpad-button.patch b/0001-touchpad-don-t-allow-gestures-with-a-clickpad-button.patch new file mode 100644 index 0000000..d6543cf --- /dev/null +++ b/0001-touchpad-don-t-allow-gestures-with-a-clickpad-button.patch @@ -0,0 +1,162 @@ +From 73d55cc6c5787ed7a086ecd0e1e797e85b80cb7b Mon Sep 17 00:00:00 2001 +From: Matt Mayfield +Date: Wed, 14 Aug 2019 08:29:07 -0500 +Subject: [PATCH libinput] touchpad: don't allow gestures with a clickpad + button down by a finger + +Allowing gestures when holding a physical click enables tasks like +switching workspaces while dragging an icon, but this should only be +possible with a *thumb* holding down the clickpad, not fingers. This +commit restores the ability to hold down the clickpad with two or three +fingers to right- or middle-drag. + +Fixes #339, #340 + +Signed-off-by: Peter Hutterer +--- + src/evdev-mt-touchpad-gestures.c | 9 ++- + test/test-touchpad-buttons.c | 94 ++++++++++++++++++++++++++++++++ + 2 files changed, 101 insertions(+), 2 deletions(-) + +diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c +index 4a0287c7..fed25c90 100644 +--- a/src/evdev-mt-touchpad-gestures.c ++++ b/src/evdev-mt-touchpad-gestures.c +@@ -717,8 +717,13 @@ tp_gesture_post_events(struct tp_dispatch *tp, uint64_t time) + if (tp->gesture.finger_count == 0) + return; + +- /* When tap-and-dragging, force 1fg mode. */ +- if (tp_tap_dragging(tp)) { ++ /* When tap-and-dragging, force 1fg mode. On clickpads, if the ++ * physical button is down, don't allow gestures unless the button ++ * is held down by a *thumb*, specifically. ++ */ ++ if (tp_tap_dragging(tp) || ++ (tp->buttons.is_clickpad && tp->buttons.state && ++ tp->thumb.state == THUMB_STATE_FINGER)) { + tp_gesture_cancel(tp, time); + tp->gesture.finger_count = 1; + tp->gesture.finger_count_pending = 0; +diff --git a/test/test-touchpad-buttons.c b/test/test-touchpad-buttons.c +index 4759b896..907d12bc 100644 +--- a/test/test-touchpad-buttons.c ++++ b/test/test-touchpad-buttons.c +@@ -958,6 +958,96 @@ START_TEST(touchpad_clickfinger_appletouch_3fg) + } + END_TEST + ++START_TEST(touchpad_clickfinger_click_drag) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput *li = dev->libinput; ++ int nfingers = _i; /* ranged test */ ++ unsigned int button; ++ int nslots = libevdev_get_num_slots(dev->evdev); ++ ++ litest_enable_clickfinger(dev); ++ litest_drain_events(li); ++ ++ litest_touch_down(dev, 0, 40, 50); ++ button = BTN_LEFT; ++ ++ if (nfingers > 1) { ++ if (nslots > 1) { ++ litest_touch_down(dev, 1, 50, 50); ++ } else { ++ litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 1); ++ } ++ button = BTN_RIGHT; ++ } ++ ++ if (nfingers > 2) { ++ if (nslots > 2) { ++ litest_touch_down(dev, 2, 60, 50); ++ } else { ++ litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 0); ++ litest_event(dev, EV_KEY, BTN_TOOL_TRIPLETAP, 1); ++ } ++ button = BTN_MIDDLE; ++ } ++ ++ litest_button_click(dev, BTN_LEFT, true); ++ ++ libinput_dispatch(li); ++ litest_assert_button_event(li, button, ++ LIBINPUT_BUTTON_STATE_PRESSED); ++ ++ for (int i = 0; i < 20; i++) { ++ litest_push_event_frame(dev); ++ switch (nfingers) { ++ case 3: ++ if (nslots >= nfingers) ++ litest_touch_move(dev, 2, 60, 50 + i); ++ /* fallthrough */ ++ case 2: ++ if (nslots >= nfingers) ++ litest_touch_move(dev, 1, 50, 50 + i); ++ /* fallthrough */ ++ case 1: ++ litest_touch_move(dev, 0, 40, 50 + i); ++ break; ++ } ++ litest_pop_event_frame(dev); ++ libinput_dispatch(li); ++ } ++ ++ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); ++ ++ litest_button_click(dev, BTN_LEFT, false); ++ litest_assert_button_event(li, button, ++ LIBINPUT_BUTTON_STATE_RELEASED); ++ ++ if (nfingers > 3) { ++ if (nslots > 3) { ++ litest_touch_up(dev, 2); ++ } else { ++ litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 1); ++ litest_event(dev, EV_KEY, BTN_TOOL_TRIPLETAP, 0); ++ } ++ } ++ ++ if (nfingers > 2) { ++ if (nslots > 2) { ++ litest_touch_up(dev, 1); ++ } else { ++ litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 0); ++ } ++ button = BTN_MIDDLE; ++ } ++ ++ litest_touch_up(dev, 0); ++ ++ ++ libinput_dispatch(li); ++ litest_assert_empty_queue(li); ++} ++END_TEST ++ + START_TEST(touchpad_btn_left) + { + struct litest_device *dev = litest_current_device(); +@@ -2006,6 +2096,8 @@ END_TEST + + TEST_COLLECTION(touchpad_buttons) + { ++ struct range finger_count = {1, 4}; ++ + litest_add("touchpad:button", touchpad_button, LITEST_TOUCHPAD, LITEST_CLICKPAD); + + litest_add("touchpad:clickfinger", touchpad_1fg_clickfinger, LITEST_CLICKPAD, LITEST_ANY); +@@ -2036,6 +2128,8 @@ TEST_COLLECTION(touchpad_buttons) + litest_add_for_device("touchpad:clickfinger", touchpad_clickfinger_appletouch_2fg, LITEST_APPLETOUCH); + litest_add_for_device("touchpad:clickfinger", touchpad_clickfinger_appletouch_3fg, LITEST_APPLETOUCH); + ++ litest_add_ranged("touchpad:clickfinger", touchpad_clickfinger_click_drag, LITEST_CLICKPAD, LITEST_ANY, &finger_count); ++ + litest_add("touchpad:click", touchpad_click_defaults_clickfinger, LITEST_APPLE_CLICKPAD, LITEST_ANY); + litest_add("touchpad:click", touchpad_click_defaults_btnarea, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD); + litest_add("touchpad:click", touchpad_click_defaults_none, LITEST_TOUCHPAD, LITEST_CLICKPAD); +-- +2.21.0 + diff --git a/libinput.spec b/libinput.spec index 6cb0024..a9a139d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.14.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-touchpad-don-t-allow-gestures-with-a-clickpad-button.patch + BuildRequires: git-core BuildRequires: gcc gcc-c++ BuildRequires: meson @@ -131,6 +133,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Tue Aug 20 2019 Peter Hutterer 1.14.0-2 +- Fix click+drag on clickpads + * Thu Aug 08 2019 Peter Hutterer 1.14.0-1 - libinput 1.14 From e2b899cc63e0d29aed7f73f2159d044b816855dc Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 26 Aug 2019 13:03:36 +1000 Subject: [PATCH 231/317] libinput 1.14.1 --- ...llow-gestures-with-a-clickpad-button.patch | 162 ------------------ libinput.spec | 13 +- sources | 2 +- 3 files changed, 9 insertions(+), 168 deletions(-) delete mode 100644 0001-touchpad-don-t-allow-gestures-with-a-clickpad-button.patch diff --git a/0001-touchpad-don-t-allow-gestures-with-a-clickpad-button.patch b/0001-touchpad-don-t-allow-gestures-with-a-clickpad-button.patch deleted file mode 100644 index d6543cf..0000000 --- a/0001-touchpad-don-t-allow-gestures-with-a-clickpad-button.patch +++ /dev/null @@ -1,162 +0,0 @@ -From 73d55cc6c5787ed7a086ecd0e1e797e85b80cb7b Mon Sep 17 00:00:00 2001 -From: Matt Mayfield -Date: Wed, 14 Aug 2019 08:29:07 -0500 -Subject: [PATCH libinput] touchpad: don't allow gestures with a clickpad - button down by a finger - -Allowing gestures when holding a physical click enables tasks like -switching workspaces while dragging an icon, but this should only be -possible with a *thumb* holding down the clickpad, not fingers. This -commit restores the ability to hold down the clickpad with two or three -fingers to right- or middle-drag. - -Fixes #339, #340 - -Signed-off-by: Peter Hutterer ---- - src/evdev-mt-touchpad-gestures.c | 9 ++- - test/test-touchpad-buttons.c | 94 ++++++++++++++++++++++++++++++++ - 2 files changed, 101 insertions(+), 2 deletions(-) - -diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c -index 4a0287c7..fed25c90 100644 ---- a/src/evdev-mt-touchpad-gestures.c -+++ b/src/evdev-mt-touchpad-gestures.c -@@ -717,8 +717,13 @@ tp_gesture_post_events(struct tp_dispatch *tp, uint64_t time) - if (tp->gesture.finger_count == 0) - return; - -- /* When tap-and-dragging, force 1fg mode. */ -- if (tp_tap_dragging(tp)) { -+ /* When tap-and-dragging, force 1fg mode. On clickpads, if the -+ * physical button is down, don't allow gestures unless the button -+ * is held down by a *thumb*, specifically. -+ */ -+ if (tp_tap_dragging(tp) || -+ (tp->buttons.is_clickpad && tp->buttons.state && -+ tp->thumb.state == THUMB_STATE_FINGER)) { - tp_gesture_cancel(tp, time); - tp->gesture.finger_count = 1; - tp->gesture.finger_count_pending = 0; -diff --git a/test/test-touchpad-buttons.c b/test/test-touchpad-buttons.c -index 4759b896..907d12bc 100644 ---- a/test/test-touchpad-buttons.c -+++ b/test/test-touchpad-buttons.c -@@ -958,6 +958,96 @@ START_TEST(touchpad_clickfinger_appletouch_3fg) - } - END_TEST - -+START_TEST(touchpad_clickfinger_click_drag) -+{ -+ struct litest_device *dev = litest_current_device(); -+ struct libinput *li = dev->libinput; -+ int nfingers = _i; /* ranged test */ -+ unsigned int button; -+ int nslots = libevdev_get_num_slots(dev->evdev); -+ -+ litest_enable_clickfinger(dev); -+ litest_drain_events(li); -+ -+ litest_touch_down(dev, 0, 40, 50); -+ button = BTN_LEFT; -+ -+ if (nfingers > 1) { -+ if (nslots > 1) { -+ litest_touch_down(dev, 1, 50, 50); -+ } else { -+ litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 1); -+ } -+ button = BTN_RIGHT; -+ } -+ -+ if (nfingers > 2) { -+ if (nslots > 2) { -+ litest_touch_down(dev, 2, 60, 50); -+ } else { -+ litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 0); -+ litest_event(dev, EV_KEY, BTN_TOOL_TRIPLETAP, 1); -+ } -+ button = BTN_MIDDLE; -+ } -+ -+ litest_button_click(dev, BTN_LEFT, true); -+ -+ libinput_dispatch(li); -+ litest_assert_button_event(li, button, -+ LIBINPUT_BUTTON_STATE_PRESSED); -+ -+ for (int i = 0; i < 20; i++) { -+ litest_push_event_frame(dev); -+ switch (nfingers) { -+ case 3: -+ if (nslots >= nfingers) -+ litest_touch_move(dev, 2, 60, 50 + i); -+ /* fallthrough */ -+ case 2: -+ if (nslots >= nfingers) -+ litest_touch_move(dev, 1, 50, 50 + i); -+ /* fallthrough */ -+ case 1: -+ litest_touch_move(dev, 0, 40, 50 + i); -+ break; -+ } -+ litest_pop_event_frame(dev); -+ libinput_dispatch(li); -+ } -+ -+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); -+ -+ litest_button_click(dev, BTN_LEFT, false); -+ litest_assert_button_event(li, button, -+ LIBINPUT_BUTTON_STATE_RELEASED); -+ -+ if (nfingers > 3) { -+ if (nslots > 3) { -+ litest_touch_up(dev, 2); -+ } else { -+ litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 1); -+ litest_event(dev, EV_KEY, BTN_TOOL_TRIPLETAP, 0); -+ } -+ } -+ -+ if (nfingers > 2) { -+ if (nslots > 2) { -+ litest_touch_up(dev, 1); -+ } else { -+ litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 0); -+ } -+ button = BTN_MIDDLE; -+ } -+ -+ litest_touch_up(dev, 0); -+ -+ -+ libinput_dispatch(li); -+ litest_assert_empty_queue(li); -+} -+END_TEST -+ - START_TEST(touchpad_btn_left) - { - struct litest_device *dev = litest_current_device(); -@@ -2006,6 +2096,8 @@ END_TEST - - TEST_COLLECTION(touchpad_buttons) - { -+ struct range finger_count = {1, 4}; -+ - litest_add("touchpad:button", touchpad_button, LITEST_TOUCHPAD, LITEST_CLICKPAD); - - litest_add("touchpad:clickfinger", touchpad_1fg_clickfinger, LITEST_CLICKPAD, LITEST_ANY); -@@ -2036,6 +2128,8 @@ TEST_COLLECTION(touchpad_buttons) - litest_add_for_device("touchpad:clickfinger", touchpad_clickfinger_appletouch_2fg, LITEST_APPLETOUCH); - litest_add_for_device("touchpad:clickfinger", touchpad_clickfinger_appletouch_3fg, LITEST_APPLETOUCH); - -+ litest_add_ranged("touchpad:clickfinger", touchpad_clickfinger_click_drag, LITEST_CLICKPAD, LITEST_ANY, &finger_count); -+ - litest_add("touchpad:click", touchpad_click_defaults_clickfinger, LITEST_APPLE_CLICKPAD, LITEST_ANY); - litest_add("touchpad:click", touchpad_click_defaults_btnarea, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD); - litest_add("touchpad:click", touchpad_click_defaults_none, LITEST_TOUCHPAD, LITEST_CLICKPAD); --- -2.21.0 - diff --git a/libinput.spec b/libinput.spec index a9a139d..06ccf4d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.14.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.14.1 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,8 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-touchpad-don-t-allow-gestures-with-a-clickpad-button.patch - BuildRequires: git-core BuildRequires: gcc gcc-c++ BuildRequires: meson @@ -99,7 +97,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_libexecdir}/libinput/libinput-list-devices %{_mandir}/man1/libinput.1* %{_datadir}/libinput/*.quirks - +%dir %{_datadir}/zsh +%dir %{_datadir}/zsh/site-functions +%{_datadir}/zsh/site-functions/* %{_mandir}/man1/libinput-list-devices.1* %{_mandir}/man1/libinput-debug-events.1* @@ -133,6 +133,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Mon Aug 26 2019 Peter Hutterer 1.14.1-1 +- libinput 1.14.1 + * Tue Aug 20 2019 Peter Hutterer 1.14.0-2 - Fix click+drag on clickpads diff --git a/sources b/sources index c8077cd..bfcbfe3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.14.0.tar.xz) = e501c5b8a58bb287c175692af0e59ff766a8613eb576aaa0700686dfbb6c6ab63b7a5d3f148fce75397c8170bc49871068861d93c352355ab5d0d9e7f1b059ec +SHA512 (libinput-1.14.1.tar.xz) = 8416bab51ba1aab924fa1b41360bc2ad101fb60d3a82c73584bb1e2454554524716673e3eac7f08c18bd6a1ecdfa52ea3cfe09c7a866c59fcd47d75960e82d4c From 7085d627b958fcca683b56004701c5dcdeb584d7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 17 Oct 2019 11:33:22 +1000 Subject: [PATCH 232/317] libinput 1.14.2 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 06ccf4d..89a3d78 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.14.1 +Version: 1.14.2 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -133,6 +133,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Thu Oct 17 2019 Peter Hutterer 1.14.2-1 +- libinput 1.14.2 + * Mon Aug 26 2019 Peter Hutterer 1.14.1-1 - libinput 1.14.1 diff --git a/sources b/sources index bfcbfe3..5c2b7ee 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.14.1.tar.xz) = 8416bab51ba1aab924fa1b41360bc2ad101fb60d3a82c73584bb1e2454554524716673e3eac7f08c18bd6a1ecdfa52ea3cfe09c7a866c59fcd47d75960e82d4c +SHA512 (libinput-1.14.2.tar.xz) = 932949a78bf95a7a05f50170cfc7dc109c99e1e3e70e63797566c0c3a3003632cad56e9b9ca2a180880f5e2ec1060613066d068b384096f37785fe70ac30c1eb From 874bc0eb108b966ef9f073735f2e974272c13e44 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 28 Oct 2019 14:38:07 +1000 Subject: [PATCH 233/317] libinput 1.14.3 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 89a3d78..c01ce22 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.14.2 +Version: 1.14.3 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -133,6 +133,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Mon Oct 28 2019 Peter Hutterer 1.14.3-1 +- libinput 1.14.3 + * Thu Oct 17 2019 Peter Hutterer 1.14.2-1 - libinput 1.14.2 diff --git a/sources b/sources index 5c2b7ee..5455924 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.14.2.tar.xz) = 932949a78bf95a7a05f50170cfc7dc109c99e1e3e70e63797566c0c3a3003632cad56e9b9ca2a180880f5e2ec1060613066d068b384096f37785fe70ac30c1eb +SHA512 (libinput-1.14.3.tar.xz) = f01d1bd1b25b8060519575644597d35f0c89de5386d298441f440128ceee3e57549921a058adec31adc8b33dbdedf4c0bd12c76905a69f752859d3136e26336d From aa4d46a793257191ee07639200cf95e01499e7df Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 19 Nov 2019 09:39:28 +1000 Subject: [PATCH 234/317] Point users to the libinput-utils package for missing tools. --- ...s-to-the-libinput-utils-package-for-.patch | 28 +++++++++++++++++++ libinput.spec | 7 ++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 0001-tools-point-users-to-the-libinput-utils-package-for-.patch diff --git a/0001-tools-point-users-to-the-libinput-utils-package-for-.patch b/0001-tools-point-users-to-the-libinput-utils-package-for-.patch new file mode 100644 index 0000000..d0fdf5f --- /dev/null +++ b/0001-tools-point-users-to-the-libinput-utils-package-for-.patch @@ -0,0 +1,28 @@ +From 579e58d5413c96e2e8499354273d5a6604a17627 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Tue, 19 Nov 2019 09:38:18 +1000 +Subject: [PATCH] tools: point users to the libinput-utils package for missing + commands + +Signed-off-by: Peter Hutterer +--- + tools/shared.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tools/shared.c b/tools/shared.c +index 02c09dd..1367a16 100644 +--- a/tools/shared.c ++++ b/tools/shared.c +@@ -542,7 +542,8 @@ tools_exec_command(const char *prefix, int real_argc, char **real_argv) + if (errno == ENOENT) { + fprintf(stderr, + "libinput: %s is not a libinput command or not installed. " +- "See 'libinput --help'\n", ++ "See 'libinput --help'\n" ++ "\nThis command may be provided by the libinput-utils package.\n", + command); + return EXIT_INVALID_USAGE; + } else { +-- +2.23.0 + diff --git a/libinput.spec b/libinput.spec index c01ce22..62dc391 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.14.3 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch01: 0001-tools-point-users-to-the-libinput-utils-package-for-.patch + BuildRequires: git-core BuildRequires: gcc gcc-c++ BuildRequires: meson @@ -133,6 +135,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Tue Nov 19 2019 Peter Hutterer 1.14.3-2 +- Point users to the libinput-utils package for missing tools. + * Mon Oct 28 2019 Peter Hutterer 1.14.3-1 - libinput 1.14.3 From 01a6ac088be0db99d5da2a57cff5bc9d2c415673 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 5 Dec 2019 15:37:00 +1000 Subject: [PATCH 235/317] libinput 1.15rc1 --- libinput.spec | 12 +++++++++--- sources | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/libinput.spec b/libinput.spec index 62dc391..c5c085d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.14.3 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.14.901 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -90,7 +90,8 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %doc COPYING %{_libdir}/libinput.so.* %{udevdir}/libinput-device-group -%{udevdir}/libinput-fuzz-override +%{udevdir}/libinput-fuzz-to-zero +%{udevdir}/libinput-fuzz-extract %{udevdir}/rules.d/80-libinput-device-groups.rules %{udevdir}/rules.d/90-libinput-fuzz-override.rules %{_bindir}/libinput @@ -111,6 +112,7 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_libdir}/pkgconfig/libinput.pc %files utils +%{_libexecdir}/libinput/libinput-debug-tablet %{_libexecdir}/libinput/libinput-measure %{_libexecdir}/libinput/libinput-measure-fuzz %{_libexecdir}/libinput/libinput-measure-touchpad-tap @@ -119,6 +121,7 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_libexecdir}/libinput/libinput-quirks %{_libexecdir}/libinput/libinput-record %{_libexecdir}/libinput/libinput-replay +%{_mandir}/man1/libinput-debug-tablet.1* %{_mandir}/man1/libinput-measure.1* %{_mandir}/man1/libinput-measure-fuzz.1* %{_mandir}/man1/libinput-measure-touchpad-tap.1* @@ -135,6 +138,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Thu Dec 05 2019 Peter Hutterer 1.14.901-1 +- libinput 1.15rc1 + * Tue Nov 19 2019 Peter Hutterer 1.14.3-2 - Point users to the libinput-utils package for missing tools. diff --git a/sources b/sources index 5455924..9a4309c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.14.3.tar.xz) = f01d1bd1b25b8060519575644597d35f0c89de5386d298441f440128ceee3e57549921a058adec31adc8b33dbdedf4c0bd12c76905a69f752859d3136e26336d +SHA512 (libinput-1.14.901.tar.xz) = 93d97cefa49f640b7b29ac3f54497d57cd1499cb0945504d4522ed564b2414fda55ece09d9212ca2cc3c911375ce0b6906ae62912fbc501aea5238afad3ad4bc From 210b459dcf20269a7a22de706facbde4341085fa Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 3 Jan 2020 20:35:21 +1000 Subject: [PATCH 236/317] libinput 1.15 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index c5c085d..209b252 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.14.901 +Version: 1.15.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -138,6 +138,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Fri Jan 03 2020 Peter Hutterer 1.15.0-1 +- libinput 1.15 + * Thu Dec 05 2019 Peter Hutterer 1.14.901-1 - libinput 1.15rc1 diff --git a/sources b/sources index 9a4309c..188b229 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.14.901.tar.xz) = 93d97cefa49f640b7b29ac3f54497d57cd1499cb0945504d4522ed564b2414fda55ece09d9212ca2cc3c911375ce0b6906ae62912fbc501aea5238afad3ad4bc +SHA512 (libinput-1.15.0.tar.xz) = 5dab48e1b4c9c0deb5b01ebc3ccb4cc28d614be25d87daaf42f51fbd2d955266f3fdba73029bc0094caa55060dad8967751b72d8f45f19a40b542f0c9118c1b6 From a32688fb116b5020f7e112a08644f61ece8b7d57 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 09:25:32 +0000 Subject: [PATCH 237/317] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 209b252..9c5a68d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.15.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -138,6 +138,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 1.15.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Fri Jan 03 2020 Peter Hutterer 1.15.0-1 - libinput 1.15 From a8333a44766c9112331392ee3303da511494b3e4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 3 Feb 2020 15:36:47 +1000 Subject: [PATCH 238/317] libinput 1.15.1 --- libinput.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libinput.spec b/libinput.spec index 9c5a68d..199fab3 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.15.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.15.1 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -138,6 +138,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Mon Feb 03 2020 Peter Hutterer 1.15.1-1 +- libinput 1.15.1 + * Wed Jan 29 2020 Fedora Release Engineering - 1.15.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index 188b229..e41d96d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.15.0.tar.xz) = 5dab48e1b4c9c0deb5b01ebc3ccb4cc28d614be25d87daaf42f51fbd2d955266f3fdba73029bc0094caa55060dad8967751b72d8f45f19a40b542f0c9118c1b6 +SHA512 (libinput-1.15.1.tar.xz) = 634810359bc4d86f2c4c75f472bee5eaed04ed93af3c91c4bc46a596402323941f9cc90173e278bfa7e5cbda6b7a20adc59bd09520dd4152fc961302b7e57904 From 8f00dbe27c20f27eee7ca7f9e364ea9623593222 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 20 Feb 2020 14:08:58 +1000 Subject: [PATCH 239/317] libinput 1.15.2 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 199fab3..1c7c629 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.15.1 +Version: 1.15.2 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -138,6 +138,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Thu Feb 20 2020 Peter Hutterer 1.15.2-1 +- libinput 1.15.2 + * Mon Feb 03 2020 Peter Hutterer 1.15.1-1 - libinput 1.15.1 diff --git a/sources b/sources index e41d96d..7bc03c8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.15.1.tar.xz) = 634810359bc4d86f2c4c75f472bee5eaed04ed93af3c91c4bc46a596402323941f9cc90173e278bfa7e5cbda6b7a20adc59bd09520dd4152fc961302b7e57904 +SHA512 (libinput-1.15.2.tar.xz) = f6b50dbdf6ee6b65f88e020c4292c94c3178125d58629f27c2e52f92b658ccd67e0c5604fbf0b303621ff0386637ce1e291daaa991761d4145e8bcda4dd128a2 From 8fa94fe0232b468fcc9c73f328575d82c9a1d8ae Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 6 Mar 2020 14:52:29 +1000 Subject: [PATCH 240/317] libinput 1.15.3 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 1c7c629..dd2c269 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.15.2 +Version: 1.15.3 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -138,6 +138,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Fri Mar 06 2020 Peter Hutterer 1.15.3-1 +- libinput 1.15.3 + * Thu Feb 20 2020 Peter Hutterer 1.15.2-1 - libinput 1.15.2 diff --git a/sources b/sources index 7bc03c8..d7236bb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.15.2.tar.xz) = f6b50dbdf6ee6b65f88e020c4292c94c3178125d58629f27c2e52f92b658ccd67e0c5604fbf0b303621ff0386637ce1e291daaa991761d4145e8bcda4dd128a2 +SHA512 (libinput-1.15.3.tar.xz) = 6636fd618e2b9cfa5ee44701207dc98f2639adc53eb3ef135509d936fb19b2cedf5184eab58e887798d9cf8ee65f35bc9062f7e3630080bcbe45a90a8b631ef2 From c525038f71e95bedacf3449eda738b61855bd891 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 9 Mar 2020 10:29:45 +1000 Subject: [PATCH 241/317] fix libinput record's dmi modalias recording --- 0001-tools-record-fix-dmi-recording.patch | 97 +++++++++++++++++++++++ libinput.spec | 6 +- 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 0001-tools-record-fix-dmi-recording.patch diff --git a/0001-tools-record-fix-dmi-recording.patch b/0001-tools-record-fix-dmi-recording.patch new file mode 100644 index 0000000..fe82403 --- /dev/null +++ b/0001-tools-record-fix-dmi-recording.patch @@ -0,0 +1,97 @@ +From 850925910f7f6db16f0aa645892d9121760de7b2 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 9 Mar 2020 10:16:04 +1000 +Subject: [PATCH libinput] tools: record: fix dmi recording + +Processing os-release in the same buffer that the dmi modalias used caused the +dmi to be recorded as 'dmi: "VERSION_ID=31"'. The cause for that was simply +that the dmi modalias was read but not printed until after the os-release +information was processed. + +Fix this two-fold: rearrange that each part now reads and prints in +one go, and rename the buffers so we don't re-use them. + +Signed-off-by: Peter Hutterer +--- + tools/libinput-record.c | 46 ++++++++++++++++++++++------------------- + 1 file changed, 25 insertions(+), 21 deletions(-) + +diff --git a/tools/libinput-record.c b/tools/libinput-record.c +index 0b10d8bf..6d45efc5 100644 +--- a/tools/libinput-record.c ++++ b/tools/libinput-record.c +@@ -1430,37 +1430,26 @@ print_system_header(struct record_context *ctx) + struct utsname u; + const char *kernel = "unknown"; + FILE *dmi, *osrelease; +- char buf[2048] = "unknown"; +- +- if (uname(&u) != -1) +- kernel = u.release; +- +- dmi = fopen("/sys/class/dmi/id/modalias", "r"); +- if (dmi) { +- if (fgets(buf, sizeof(buf), dmi)) { +- buf[strlen(buf) - 1] = '\0'; /* linebreak */ +- } else { +- sprintf(buf, "unknown"); +- } +- fclose(dmi); +- } ++ char dmistr[2048] = "unknown"; + + iprintf(ctx, "system:\n"); + indent_push(ctx); + ++ /* /etc/os-release version and distribution name */ + osrelease = fopen("/etc/os-release", "r"); + if (!osrelease) + osrelease = fopen("/usr/lib/os-release", "r"); + if (osrelease) { + char *distro = NULL, *version = NULL; ++ char osrstr[256] = "unknown"; + +- while (fgets(buf, sizeof(buf), osrelease)) { +- buf[strlen(buf) - 1] = '\0'; /* linebreak */ ++ while (fgets(osrstr, sizeof(osrstr), osrelease)) { ++ osrstr[strlen(osrstr) - 1] = '\0'; /* linebreak */ + +- if (!distro && strneq(buf, "ID=", 3)) +- distro = safe_strdup(&buf[3]); +- else if (!version && strneq(buf, "VERSION_ID=", 11)) +- version = safe_strdup(&buf[11]); ++ if (!distro && strneq(osrstr, "ID=", 3)) ++ distro = safe_strdup(&osrstr[3]); ++ else if (!version && strneq(osrstr, "VERSION_ID=", 11)) ++ version = safe_strdup(&osrstr[11]); + + if (distro && version) { + iprintf(ctx, "os: \"%s:%s\"\n", distro, version); +@@ -1471,8 +1460,23 @@ print_system_header(struct record_context *ctx) + free(version); + fclose(osrelease); + } ++ ++ /* kernel version */ ++ if (uname(&u) != -1) ++ kernel = u.release; + iprintf(ctx, "kernel: \"%s\"\n", kernel); +- iprintf(ctx, "dmi: \"%s\"\n", buf); ++ ++ /* dmi modalias */ ++ dmi = fopen("/sys/class/dmi/id/modalias", "r"); ++ if (dmi) { ++ if (fgets(dmistr, sizeof(dmistr), dmi)) { ++ dmistr[strlen(dmistr) - 1] = '\0'; /* linebreak */ ++ } else { ++ sprintf(dmistr, "unknown"); ++ } ++ fclose(dmi); ++ } ++ iprintf(ctx, "dmi: \"%s\"\n", dmistr); + indent_pop(ctx); + } + +-- +2.24.1 + diff --git a/libinput.spec b/libinput.spec index dd2c269..5d2eebb 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.15.3 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -19,6 +19,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} %endif Patch01: 0001-tools-point-users-to-the-libinput-utils-package-for-.patch +Patch02: 0001-tools-record-fix-dmi-recording.patch BuildRequires: git-core BuildRequires: gcc gcc-c++ @@ -138,6 +139,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Mon Mar 09 2020 Peter Hutterer 1.15.3-2 +- fix libinput record's dmi modalias recording + * Fri Mar 06 2020 Peter Hutterer 1.15.3-1 - libinput 1.15.3 From 3a6c0aec2bb2ee0760f0a660fa80b6630b975ad1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 18 Mar 2020 15:41:58 +1000 Subject: [PATCH 242/317] libinput 1.15.4 --- 0001-tools-record-fix-dmi-recording.patch | 97 ----------------------- libinput.spec | 8 +- sources | 2 +- 3 files changed, 6 insertions(+), 101 deletions(-) delete mode 100644 0001-tools-record-fix-dmi-recording.patch diff --git a/0001-tools-record-fix-dmi-recording.patch b/0001-tools-record-fix-dmi-recording.patch deleted file mode 100644 index fe82403..0000000 --- a/0001-tools-record-fix-dmi-recording.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 850925910f7f6db16f0aa645892d9121760de7b2 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 9 Mar 2020 10:16:04 +1000 -Subject: [PATCH libinput] tools: record: fix dmi recording - -Processing os-release in the same buffer that the dmi modalias used caused the -dmi to be recorded as 'dmi: "VERSION_ID=31"'. The cause for that was simply -that the dmi modalias was read but not printed until after the os-release -information was processed. - -Fix this two-fold: rearrange that each part now reads and prints in -one go, and rename the buffers so we don't re-use them. - -Signed-off-by: Peter Hutterer ---- - tools/libinput-record.c | 46 ++++++++++++++++++++++------------------- - 1 file changed, 25 insertions(+), 21 deletions(-) - -diff --git a/tools/libinput-record.c b/tools/libinput-record.c -index 0b10d8bf..6d45efc5 100644 ---- a/tools/libinput-record.c -+++ b/tools/libinput-record.c -@@ -1430,37 +1430,26 @@ print_system_header(struct record_context *ctx) - struct utsname u; - const char *kernel = "unknown"; - FILE *dmi, *osrelease; -- char buf[2048] = "unknown"; -- -- if (uname(&u) != -1) -- kernel = u.release; -- -- dmi = fopen("/sys/class/dmi/id/modalias", "r"); -- if (dmi) { -- if (fgets(buf, sizeof(buf), dmi)) { -- buf[strlen(buf) - 1] = '\0'; /* linebreak */ -- } else { -- sprintf(buf, "unknown"); -- } -- fclose(dmi); -- } -+ char dmistr[2048] = "unknown"; - - iprintf(ctx, "system:\n"); - indent_push(ctx); - -+ /* /etc/os-release version and distribution name */ - osrelease = fopen("/etc/os-release", "r"); - if (!osrelease) - osrelease = fopen("/usr/lib/os-release", "r"); - if (osrelease) { - char *distro = NULL, *version = NULL; -+ char osrstr[256] = "unknown"; - -- while (fgets(buf, sizeof(buf), osrelease)) { -- buf[strlen(buf) - 1] = '\0'; /* linebreak */ -+ while (fgets(osrstr, sizeof(osrstr), osrelease)) { -+ osrstr[strlen(osrstr) - 1] = '\0'; /* linebreak */ - -- if (!distro && strneq(buf, "ID=", 3)) -- distro = safe_strdup(&buf[3]); -- else if (!version && strneq(buf, "VERSION_ID=", 11)) -- version = safe_strdup(&buf[11]); -+ if (!distro && strneq(osrstr, "ID=", 3)) -+ distro = safe_strdup(&osrstr[3]); -+ else if (!version && strneq(osrstr, "VERSION_ID=", 11)) -+ version = safe_strdup(&osrstr[11]); - - if (distro && version) { - iprintf(ctx, "os: \"%s:%s\"\n", distro, version); -@@ -1471,8 +1460,23 @@ print_system_header(struct record_context *ctx) - free(version); - fclose(osrelease); - } -+ -+ /* kernel version */ -+ if (uname(&u) != -1) -+ kernel = u.release; - iprintf(ctx, "kernel: \"%s\"\n", kernel); -- iprintf(ctx, "dmi: \"%s\"\n", buf); -+ -+ /* dmi modalias */ -+ dmi = fopen("/sys/class/dmi/id/modalias", "r"); -+ if (dmi) { -+ if (fgets(dmistr, sizeof(dmistr), dmi)) { -+ dmistr[strlen(dmistr) - 1] = '\0'; /* linebreak */ -+ } else { -+ sprintf(dmistr, "unknown"); -+ } -+ fclose(dmi); -+ } -+ iprintf(ctx, "dmi: \"%s\"\n", dmistr); - indent_pop(ctx); - } - --- -2.24.1 - diff --git a/libinput.spec b/libinput.spec index 5d2eebb..4cf328d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.15.3 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.15.4 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -19,7 +19,6 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} %endif Patch01: 0001-tools-point-users-to-the-libinput-utils-package-for-.patch -Patch02: 0001-tools-record-fix-dmi-recording.patch BuildRequires: git-core BuildRequires: gcc gcc-c++ @@ -139,6 +138,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Wed Mar 18 2020 Peter Hutterer 1.15.4-1 +- libinput 1.15.4 + * Mon Mar 09 2020 Peter Hutterer 1.15.3-2 - fix libinput record's dmi modalias recording diff --git a/sources b/sources index d7236bb..33841b4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.15.3.tar.xz) = 6636fd618e2b9cfa5ee44701207dc98f2639adc53eb3ef135509d936fb19b2cedf5184eab58e887798d9cf8ee65f35bc9062f7e3630080bcbe45a90a8b631ef2 +SHA512 (libinput-1.15.4.tar.xz) = 4659818952dc729cd5bdb78ebe21edbbacbf8a66a592b13ba30f3bb4c4e264208ec94440a253cfa4edc8b2ef904954eecea6be0f8d63cf239e3858d3abb64a80 From ce957f5811cdedd123db985092ca17578ffa97dc Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 11 Apr 2020 10:33:14 +1000 Subject: [PATCH 243/317] libinput 1.15.5 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 4cf328d..b82cded 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.15.4 +Version: 1.15.5 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -138,6 +138,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Sat Apr 11 2020 Peter Hutterer 1.15.5-1 +- libinput 1.15.5 + * Wed Mar 18 2020 Peter Hutterer 1.15.4-1 - libinput 1.15.4 diff --git a/sources b/sources index 33841b4..50edfa6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.15.4.tar.xz) = 4659818952dc729cd5bdb78ebe21edbbacbf8a66a592b13ba30f3bb4c4e264208ec94440a253cfa4edc8b2ef904954eecea6be0f8d63cf239e3858d3abb64a80 +SHA512 (libinput-1.15.5.tar.xz) = a0a3a325048841fc017e19d3bc5f5490605972ab9e2730dc5678bda7efb7a5b1fa6f531f3c8abd8393899ec383d8d2bcfd586eacee04fc1fbda0e02ba2af956a From bb818539729d7986acc24f31cba07d95512c796e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 19 Jun 2020 10:08:00 +1000 Subject: [PATCH 244/317] libinput 1.15.6 --- libinput.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libinput.spec b/libinput.spec index b82cded..b050d67 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.15.5 +Version: 1.15.6 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -138,6 +138,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Fri Jun 19 2020 Peter Hutterer 1.15.6-1 +- libinput 1.15.6 + * Sat Apr 11 2020 Peter Hutterer 1.15.5-1 - libinput 1.15.5 @@ -732,7 +735,7 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') * Fri May 29 2015 Peter Hutterer 0.15.0-4 - Add tap-to-end-drag patch (#1225998) - + * Wed May 27 2015 Peter Hutterer 0.15.0-3 - Refine disable-while-typing (#1209753) diff --git a/sources b/sources index 50edfa6..9b033d6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.15.5.tar.xz) = a0a3a325048841fc017e19d3bc5f5490605972ab9e2730dc5678bda7efb7a5b1fa6f531f3c8abd8393899ec383d8d2bcfd586eacee04fc1fbda0e02ba2af956a +SHA512 (libinput-1.15.6.tar.xz) = 90459e5a1f22fd42ffcbab157b461e4514c30803bcebdaced76c65c05cccfa6f259640a50497055fe7ed0b376a6979f6d1d01227ae447fe60ba88fa81142b969 From ec6c8d00862d61211bae790a301061b57ef445c7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 15 Jul 2020 12:01:40 +1000 Subject: [PATCH 245/317] libinput 1.16rc1 --- ...s-to-the-libinput-utils-package-for-.patch | 28 ------------------- libinput.spec | 13 +++++++-- sources | 2 +- 3 files changed, 11 insertions(+), 32 deletions(-) delete mode 100644 0001-tools-point-users-to-the-libinput-utils-package-for-.patch diff --git a/0001-tools-point-users-to-the-libinput-utils-package-for-.patch b/0001-tools-point-users-to-the-libinput-utils-package-for-.patch deleted file mode 100644 index d0fdf5f..0000000 --- a/0001-tools-point-users-to-the-libinput-utils-package-for-.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 579e58d5413c96e2e8499354273d5a6604a17627 Mon Sep 17 00:00:00 2001 -From: rpm-build -Date: Tue, 19 Nov 2019 09:38:18 +1000 -Subject: [PATCH] tools: point users to the libinput-utils package for missing - commands - -Signed-off-by: Peter Hutterer ---- - tools/shared.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/tools/shared.c b/tools/shared.c -index 02c09dd..1367a16 100644 ---- a/tools/shared.c -+++ b/tools/shared.c -@@ -542,7 +542,8 @@ tools_exec_command(const char *prefix, int real_argc, char **real_argv) - if (errno == ENOENT) { - fprintf(stderr, - "libinput: %s is not a libinput command or not installed. " -- "See 'libinput --help'\n", -+ "See 'libinput --help'\n" -+ "\nThis command may be provided by the libinput-utils package.\n", - command); - return EXIT_INVALID_USAGE; - } else { --- -2.23.0 - diff --git a/libinput.spec b/libinput.spec index b050d67..59dcabe 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.15.6 +Version: 1.15.901 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -18,8 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch01: 0001-tools-point-users-to-the-libinput-utils-package-for-.patch - BuildRequires: git-core BuildRequires: gcc gcc-c++ BuildRequires: meson @@ -112,21 +110,27 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_libdir}/pkgconfig/libinput.pc %files utils +%{_libexecdir}/libinput/libinput-analyze +%{_libexecdir}/libinput/libinput-analyze-per-slot-delta %{_libexecdir}/libinput/libinput-debug-tablet %{_libexecdir}/libinput/libinput-measure %{_libexecdir}/libinput/libinput-measure-fuzz %{_libexecdir}/libinput/libinput-measure-touchpad-tap %{_libexecdir}/libinput/libinput-measure-touchpad-pressure +%{_libexecdir}/libinput/libinput-measure-touchpad-size %{_libexecdir}/libinput/libinput-measure-touch-size %{_libexecdir}/libinput/libinput-quirks %{_libexecdir}/libinput/libinput-record %{_libexecdir}/libinput/libinput-replay +%{_mandir}/man1/libinput-analyze.1* +%{_mandir}/man1/libinput-analyze-per-slot-delta.1* %{_mandir}/man1/libinput-debug-tablet.1* %{_mandir}/man1/libinput-measure.1* %{_mandir}/man1/libinput-measure-fuzz.1* %{_mandir}/man1/libinput-measure-touchpad-tap.1* %{_mandir}/man1/libinput-measure-touch-size.1* %{_mandir}/man1/libinput-measure-touchpad-pressure.1* +%{_mandir}/man1/libinput-measure-touchpad-size.1* %{_mandir}/man1/libinput-quirks.1* %{_mandir}/man1/libinput-quirks-list.1* %{_mandir}/man1/libinput-quirks-validate.1* @@ -138,6 +142,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Wed Jul 15 2020 Peter Hutterer 1.15.901-1 +- libinput 1.16rc1 + * Fri Jun 19 2020 Peter Hutterer 1.15.6-1 - libinput 1.15.6 diff --git a/sources b/sources index 9b033d6..3e9eec2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.15.6.tar.xz) = 90459e5a1f22fd42ffcbab157b461e4514c30803bcebdaced76c65c05cccfa6f259640a50497055fe7ed0b376a6979f6d1d01227ae447fe60ba88fa81142b969 +SHA512 (libinput-1.15.901.tar.xz) = 0273e15d54ef0cec730fb7e4e1d7c2223e59f617068dc2fed7ebceba933c055d5f4aef27917c4646f56915ebccf26b31c8174bc56da7360da1164920ea6a6f6a From ea1468df9169a9a026e5155ebe7f33e73dd50706 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 27 Jul 2020 16:24:30 +1000 Subject: [PATCH 246/317] libinput 1.16rc2 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 59dcabe..8ad83b3 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.15.901 +Version: 1.15.902 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -142,6 +142,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Mon Jul 27 2020 Peter Hutterer 1.15.902-1 +- libinput 1.16rc2 + * Wed Jul 15 2020 Peter Hutterer 1.15.901-1 - libinput 1.16rc1 diff --git a/sources b/sources index 3e9eec2..4da6fb2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.15.901.tar.xz) = 0273e15d54ef0cec730fb7e4e1d7c2223e59f617068dc2fed7ebceba933c055d5f4aef27917c4646f56915ebccf26b31c8174bc56da7360da1164920ea6a6f6a +SHA512 (libinput-1.15.902.tar.xz) = b0e597f36809cf3f9109fa75aee7fbe224b411a807d568eac6e5e1743e41c21d86b60ed2e66a7281d13217c3a774f8e859663c9569e92efdca6784717b663266 From 4e8c92d1a6a403c5dba24b20c46d7649a48a963d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 04:53:11 +0000 Subject: [PATCH 247/317] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 8ad83b3..cac247a 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.15.902 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -142,6 +142,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 1.15.902-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Mon Jul 27 2020 Peter Hutterer 1.15.902-1 - libinput 1.16rc2 From cd3d119db90cdf1158b3c4da3b7089786cbffcfd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 3 Aug 2020 16:43:01 +1000 Subject: [PATCH 248/317] libinput 1.16.0 --- libinput.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libinput.spec b/libinput.spec index cac247a..c1a5c3f 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.15.902 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.16.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -142,6 +142,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Mon Aug 03 2020 Peter Hutterer 1.16.0-1 +- libinput 1.16.0 + * Tue Jul 28 2020 Fedora Release Engineering - 1.15.902-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 4da6fb2..8abadad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.15.902.tar.xz) = b0e597f36809cf3f9109fa75aee7fbe224b411a807d568eac6e5e1743e41c21d86b60ed2e66a7281d13217c3a774f8e859663c9569e92efdca6784717b663266 +SHA512 (libinput-1.16.0.tar.xz) = 0c932a88f2a1d23ebef0d58c0cdbfb558e9e3d990fca15b21f5b9011bdd1bc2da81aad374fcdb8f4590f6ee2fc45e668e0583371ceb354437e585240e687aac6 From 0afce9e8f7ccf736996dc6414b764af237d66664 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 13 Aug 2020 14:01:36 +1000 Subject: [PATCH 249/317] libinput 1.1.6.1 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index c1a5c3f..bdfacb5 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.16.0 +Version: 1.16.1 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -142,6 +142,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Thu Aug 13 2020 Peter Hutterer 1.16.1-1 +- libinput 1.1.6.1 + * Mon Aug 03 2020 Peter Hutterer 1.16.0-1 - libinput 1.16.0 diff --git a/sources b/sources index 8abadad..30c7b87 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.16.0.tar.xz) = 0c932a88f2a1d23ebef0d58c0cdbfb558e9e3d990fca15b21f5b9011bdd1bc2da81aad374fcdb8f4590f6ee2fc45e668e0583371ceb354437e585240e687aac6 +SHA512 (libinput-1.16.1.tar.xz) = 86b2d563c2cff2b3d3cae3acdd399030cc785cc9859a06357a99565ef51f95122a8427c8c0883121fb0760613460a29c8cd8c7a7e3ac68115c10330b3b75cbe0 From 63642f0c692e1ad07461d0688320f059dc66fb4f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 22 Sep 2020 17:30:48 +1000 Subject: [PATCH 250/317] Drop gcc-c++ from the BuildRequires, it's no longer needed --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index bdfacb5..73c949c 100644 --- a/libinput.spec +++ b/libinput.spec @@ -19,7 +19,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} %endif BuildRequires: git-core -BuildRequires: gcc gcc-c++ +BuildRequires: gcc BuildRequires: meson BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(mtdev) >= 1.1.0 @@ -142,6 +142,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Tue Sep 22 2020 Peter Hutterer +- Drop gcc-c++ from the BuildRequires, it's no longer needed + * Thu Aug 13 2020 Peter Hutterer 1.16.1-1 - libinput 1.1.6.1 From 5b7b9e64dd8716e57ec733f44e26e36822109f82 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 3 Nov 2020 14:44:37 +1000 Subject: [PATCH 251/317] libinput 1.16.3 --- libinput.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libinput.spec b/libinput.spec index 73c949c..38888b1 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.16.1 +Version: 1.16.3 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -142,11 +142,14 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Tue Nov 03 2020 Peter Hutterer 1.16.3-1 +- libinput 1.16.3 + * Tue Sep 22 2020 Peter Hutterer - Drop gcc-c++ from the BuildRequires, it's no longer needed * Thu Aug 13 2020 Peter Hutterer 1.16.1-1 -- libinput 1.1.6.1 +- libinput 1.16.1 * Mon Aug 03 2020 Peter Hutterer 1.16.0-1 - libinput 1.16.0 diff --git a/sources b/sources index 30c7b87..bf9fdd4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.16.1.tar.xz) = 86b2d563c2cff2b3d3cae3acdd399030cc785cc9859a06357a99565ef51f95122a8427c8c0883121fb0760613460a29c8cd8c7a7e3ac68115c10330b3b75cbe0 +SHA512 (libinput-1.16.3.tar.xz) = cdf87988b24dc0a44b7b6ed3e15e70c7702bf65f1cfe257924967677c7a1f1485011a9e30254ba8962c83885de78f824e7955cedb07322676332d42532ec4a39 From 42029feb7514271c897164a8dd0fe6eff22c5c1c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 27 Nov 2020 11:41:22 +1000 Subject: [PATCH 252/317] libinput 1.16.4 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 38888b1..aa0942e 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.16.3 +Version: 1.16.4 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -142,6 +142,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Fri Nov 27 2020 Peter Hutterer 1.16.4-1 +- libinput 1.16.4 + * Tue Nov 03 2020 Peter Hutterer 1.16.3-1 - libinput 1.16.3 diff --git a/sources b/sources index bf9fdd4..363e45a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.16.3.tar.xz) = cdf87988b24dc0a44b7b6ed3e15e70c7702bf65f1cfe257924967677c7a1f1485011a9e30254ba8962c83885de78f824e7955cedb07322676332d42532ec4a39 +SHA512 (libinput-1.16.4.tar.xz) = a95a3bcf58a9298946d15f4f2fd93dc5807d3042f8797950a1ffd96d3c979b55a764f035a9f7680d0ea400b033698c322eb61a4387dbc280db6110ffd3e137ee From 3cd4043771c212226d95a958e41160d2cbfc45d5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 17:18:09 +0000 Subject: [PATCH 253/317] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index aa0942e..645e495 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.16.4 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -142,6 +142,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 1.16.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Fri Nov 27 2020 Peter Hutterer 1.16.4-1 - libinput 1.16.4 From 5f9c5d76299ad4a93228c6a373a9017b7321a2e4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Feb 2021 13:56:26 +1000 Subject: [PATCH 254/317] libinput 1.16.902 --- libinput.spec | 9 +++++++-- sources | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libinput.spec b/libinput.spec index 645e495..9d79611 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.16.4 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.16.902 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -112,6 +112,7 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %files utils %{_libexecdir}/libinput/libinput-analyze %{_libexecdir}/libinput/libinput-analyze-per-slot-delta +%{_libexecdir}/libinput/libinput-analyze-touch-down-state %{_libexecdir}/libinput/libinput-debug-tablet %{_libexecdir}/libinput/libinput-measure %{_libexecdir}/libinput/libinput-measure-fuzz @@ -124,6 +125,7 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_libexecdir}/libinput/libinput-replay %{_mandir}/man1/libinput-analyze.1* %{_mandir}/man1/libinput-analyze-per-slot-delta.1* +%{_mandir}/man1/libinput-analyze-touch-down-state.1* %{_mandir}/man1/libinput-debug-tablet.1* %{_mandir}/man1/libinput-measure.1* %{_mandir}/man1/libinput-measure-fuzz.1* @@ -142,6 +144,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Tue Feb 16 2021 Peter Hutterer 1.16.902-1 +- libinput 1.16.902 + * Tue Jan 26 2021 Fedora Release Engineering - 1.16.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 363e45a..cc5a7bf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.16.4.tar.xz) = a95a3bcf58a9298946d15f4f2fd93dc5807d3042f8797950a1ffd96d3c979b55a764f035a9f7680d0ea400b033698c322eb61a4387dbc280db6110ffd3e137ee +SHA512 (libinput-1.16.902.tar.xz) = 2610b49a4d7ef796e0947f344a462e52a49f72c22b4088a43c3e9ad9810ea3ebd0f329da90b804f2d3f635b488eac73fcfd16fa8a3383de77ffb7b3ae3716771 From 95cf40150294483012631650ea6cfe3405e98722 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 23 Feb 2021 19:38:50 +1000 Subject: [PATCH 255/317] libinput 1.17.0 --- libinput.spec | 7 ++++++- sources | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 9d79611..2d40f39 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.16.902 +Version: 1.17.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -112,6 +112,7 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %files utils %{_libexecdir}/libinput/libinput-analyze %{_libexecdir}/libinput/libinput-analyze-per-slot-delta +%{_libexecdir}/libinput/libinput-analyze-recording %{_libexecdir}/libinput/libinput-analyze-touch-down-state %{_libexecdir}/libinput/libinput-debug-tablet %{_libexecdir}/libinput/libinput-measure @@ -125,6 +126,7 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_libexecdir}/libinput/libinput-replay %{_mandir}/man1/libinput-analyze.1* %{_mandir}/man1/libinput-analyze-per-slot-delta.1* +%{_mandir}/man1/libinput-analyze-recording.1* %{_mandir}/man1/libinput-analyze-touch-down-state.1* %{_mandir}/man1/libinput-debug-tablet.1* %{_mandir}/man1/libinput-measure.1* @@ -144,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Tue Feb 23 2021 Peter Hutterer 1.17.0-1 +- libinput 1.17.0 + * Tue Feb 16 2021 Peter Hutterer 1.16.902-1 - libinput 1.16.902 diff --git a/sources b/sources index cc5a7bf..664b9cf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.16.902.tar.xz) = 2610b49a4d7ef796e0947f344a462e52a49f72c22b4088a43c3e9ad9810ea3ebd0f329da90b804f2d3f635b488eac73fcfd16fa8a3383de77ffb7b3ae3716771 +SHA512 (libinput-1.17.0.tar.xz) = 490c7e59cbaa43e4190dbc421582dca887b6ae92304c4f8f3ea9df515bd76de41ca9a376e6f1cfe7b235dd2d5d8d8ef5982f5ddcf958e3b31b981e9440bb0888 From 261c6e30a9ccfa854b9af2159ce505f69a574475 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 24 Mar 2021 15:28:28 +1000 Subject: [PATCH 256/317] libinput 1.17.1 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 2d40f39..ec28528 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.17.0 +Version: 1.17.1 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -146,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Wed Mar 24 2021 Peter Hutterer 1.17.1-1 +- libinput 1.17.1 + * Tue Feb 23 2021 Peter Hutterer 1.17.0-1 - libinput 1.17.0 diff --git a/sources b/sources index 664b9cf..017501c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.17.0.tar.xz) = 490c7e59cbaa43e4190dbc421582dca887b6ae92304c4f8f3ea9df515bd76de41ca9a376e6f1cfe7b235dd2d5d8d8ef5982f5ddcf958e3b31b981e9440bb0888 +SHA512 (libinput-1.17.1.tar.xz) = 2e7baa198fed9c673d28453efb066f9371f2b575a844e41cde455c636bbe1cc68faae7129026944a502cd5d7bfcc72272066b9e3cda5c959f7b464483f9dd860 From 10c346e8ef2d00583b47e1c589b0f5987fd7889d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 30 Apr 2021 14:27:47 +1000 Subject: [PATCH 257/317] libinput 1.17.2 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index ec28528..5030fba 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.17.1 +Version: 1.17.2 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -146,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Fri Apr 30 2021 Peter Hutterer 1.17.2-1 +- libinput 1.17.2 + * Wed Mar 24 2021 Peter Hutterer 1.17.1-1 - libinput 1.17.1 diff --git a/sources b/sources index 017501c..775a7c5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.17.1.tar.xz) = 2e7baa198fed9c673d28453efb066f9371f2b575a844e41cde455c636bbe1cc68faae7129026944a502cd5d7bfcc72272066b9e3cda5c959f7b464483f9dd860 +SHA512 (libinput-1.17.2.tar.xz) = b8953ad483648d5629d56c4dc226d4906693b15da5ba4027627a51ec35ea65b0603c09056b52ed2025df1f7a877669a5b7482c025e0b37003fc676563bd05263 From 9209f851700d1c45a84209185981362453fad0c5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 26 May 2021 12:49:48 +1000 Subject: [PATCH 258/317] libinput 1.17.3 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 5030fba..4623bf4 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.17.2 +Version: 1.17.3 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -146,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Wed May 26 2021 Peter Hutterer 1.17.3-1 +- libinput 1.17.3 + * Fri Apr 30 2021 Peter Hutterer 1.17.2-1 - libinput 1.17.2 diff --git a/sources b/sources index 775a7c5..026820f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.17.2.tar.xz) = b8953ad483648d5629d56c4dc226d4906693b15da5ba4027627a51ec35ea65b0603c09056b52ed2025df1f7a877669a5b7482c025e0b37003fc676563bd05263 +SHA512 (libinput-1.17.3.tar.xz) = 3d1ab4362ede886996795d700a938d20e04cd922e8f9598fe9346f9f93e149119526fb324a096787b4b8a47bf3e5613130bcd874f10df86761031710d2acc792 From f5209a1aa36ddbc5d98a848c6c5a5a99737a9601 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 26 May 2021 13:31:36 +1000 Subject: [PATCH 259/317] libinput 1.17.901 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 4623bf4..759a09d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.17.3 +Version: 1.17.901 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -146,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Wed May 26 2021 Peter Hutterer 1.17.901-1 +- libinput 1.17.901 + * Wed May 26 2021 Peter Hutterer 1.17.3-1 - libinput 1.17.3 diff --git a/sources b/sources index 026820f..026cfe4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.17.3.tar.xz) = 3d1ab4362ede886996795d700a938d20e04cd922e8f9598fe9346f9f93e149119526fb324a096787b4b8a47bf3e5613130bcd874f10df86761031710d2acc792 +SHA512 (libinput-1.17.901.tar.xz) = 7d6fa4377eea2714b3a26ec3a26618b22fc257a9811a1f17672ffc409f991d966bb36f4a9cd0619f6ac3e70585b980baabf87b3b388cbeb7e674926b5d83969c From 43e178c21d5a68c481c49784c65678a37ccaa49d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 2 Jun 2021 13:44:23 +1000 Subject: [PATCH 260/317] libinput 1.18.0 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 759a09d..11b11f1 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.17.901 +Version: 1.18.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -146,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Wed Jun 02 2021 Peter Hutterer 1.18.0-1 +- libinput 1.18.0 + * Wed May 26 2021 Peter Hutterer 1.17.901-1 - libinput 1.17.901 diff --git a/sources b/sources index 026cfe4..c149312 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.17.901.tar.xz) = 7d6fa4377eea2714b3a26ec3a26618b22fc257a9811a1f17672ffc409f991d966bb36f4a9cd0619f6ac3e70585b980baabf87b3b388cbeb7e674926b5d83969c +SHA512 (libinput-1.18.0.tar.xz) = 9a834f075d7a1f892416bb6b241eb052f749d3aa883c4b39c0f1c9616c115d6b9a541b587508646fddaf0d3fe57af92fe4629b522d1d51196499e7b523e0aa90 From 3bb4699393c027e7d93d1e4d4dc0e047a3ae9222 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 21 Jun 2021 08:55:06 +1000 Subject: [PATCH 261/317] Add quirk for the Huawai Matebook 2020 (#1972370) --- ...rk-for-the-Huawei-Matebook-2020-touc.patch | 32 +++++++++++++++++++ libinput.spec | 7 +++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 0001-quirks-add-a-quirk-for-the-Huawei-Matebook-2020-touc.patch diff --git a/0001-quirks-add-a-quirk-for-the-Huawei-Matebook-2020-touc.patch b/0001-quirks-add-a-quirk-for-the-Huawei-Matebook-2020-touc.patch new file mode 100644 index 0000000..789550e --- /dev/null +++ b/0001-quirks-add-a-quirk-for-the-Huawei-Matebook-2020-touc.patch @@ -0,0 +1,32 @@ +From 17783c24df991e6283c693050d6b0304b7307d3e Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 21 Jun 2021 08:51:04 +1000 +Subject: [PATCH libinput] quirks: add a quirk for the Huawei Matebook 2020 + touchpad + +Clickpad that announces BTN_RIGHT + +https://bugzilla.redhat.com/show_bug.cgi?id=1972370 + +Signed-off-by: Peter Hutterer +--- + quirks/50-system-huawei.quirks | 7 +++++++ + 1 file changed, 7 insertions(+) + create mode 100644 quirks/50-system-huawei.quirks + +diff --git a/quirks/50-system-huawei.quirks b/quirks/50-system-huawei.quirks +new file mode 100644 +index 00000000..43ccb075 +--- /dev/null ++++ b/quirks/50-system-huawei.quirks +@@ -0,0 +1,7 @@ ++# Clickpad that announces BTN_RIGHT ++# https://bugzilla.redhat.com/show_bug.cgi?id=1972370 ++[Huawei MateBook 2020 Touchpad] ++MatchName=ELAN2604:00 04F3:3114 Touchpad ++MatchUdevType=touchpad ++MatchDMIModalias=dmi:*svnHUAWEI:*pvrM1010* ++AttrEventCodeDisable=BTN_RIGHT +-- +2.31.1 + diff --git a/libinput.spec b/libinput.spec index 11b11f1..1048b9e 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.18.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,8 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Patch001: 0001-quirks-add-a-quirk-for-the-Huawei-Matebook-2020-touc.patch + BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -146,6 +148,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Mon Jun 21 2021 Peter Hutterer 1.18.0-2 +- Add quirk for the Huawai Matebook 2020 (#1972370) + * Wed Jun 02 2021 Peter Hutterer 1.18.0-1 - libinput 1.18.0 From 1e06039d1ea362232a7b99c66c74b7f7dc473406 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 11:37:29 +0000 Subject: [PATCH 262/317] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 1048b9e..5ed84f8 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.18.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -148,6 +148,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 1.18.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Mon Jun 21 2021 Peter Hutterer 1.18.0-2 - Add quirk for the Huawai Matebook 2020 (#1972370) From 37d524a1498c425ecc719a4eccb2533089a0748c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 3 Aug 2021 13:35:16 +1000 Subject: [PATCH 263/317] libinput 1.18.1 --- ...rk-for-the-Huawei-Matebook-2020-touc.patch | 32 ------------------- libinput.spec | 9 +++--- sources | 2 +- 3 files changed, 6 insertions(+), 37 deletions(-) delete mode 100644 0001-quirks-add-a-quirk-for-the-Huawei-Matebook-2020-touc.patch diff --git a/0001-quirks-add-a-quirk-for-the-Huawei-Matebook-2020-touc.patch b/0001-quirks-add-a-quirk-for-the-Huawei-Matebook-2020-touc.patch deleted file mode 100644 index 789550e..0000000 --- a/0001-quirks-add-a-quirk-for-the-Huawei-Matebook-2020-touc.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 17783c24df991e6283c693050d6b0304b7307d3e Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 21 Jun 2021 08:51:04 +1000 -Subject: [PATCH libinput] quirks: add a quirk for the Huawei Matebook 2020 - touchpad - -Clickpad that announces BTN_RIGHT - -https://bugzilla.redhat.com/show_bug.cgi?id=1972370 - -Signed-off-by: Peter Hutterer ---- - quirks/50-system-huawei.quirks | 7 +++++++ - 1 file changed, 7 insertions(+) - create mode 100644 quirks/50-system-huawei.quirks - -diff --git a/quirks/50-system-huawei.quirks b/quirks/50-system-huawei.quirks -new file mode 100644 -index 00000000..43ccb075 ---- /dev/null -+++ b/quirks/50-system-huawei.quirks -@@ -0,0 +1,7 @@ -+# Clickpad that announces BTN_RIGHT -+# https://bugzilla.redhat.com/show_bug.cgi?id=1972370 -+[Huawei MateBook 2020 Touchpad] -+MatchName=ELAN2604:00 04F3:3114 Touchpad -+MatchUdevType=touchpad -+MatchDMIModalias=dmi:*svnHUAWEI:*pvrM1010* -+AttrEventCodeDisable=BTN_RIGHT --- -2.31.1 - diff --git a/libinput.spec b/libinput.spec index 5ed84f8..7efc43a 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.18.0 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.18.1 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,8 +18,6 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif -Patch001: 0001-quirks-add-a-quirk-for-the-Huawei-Matebook-2020-touc.patch - BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -148,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Tue Aug 03 2021 Peter Hutterer - 1.18.1-1 +- libinput 1.18.1 + * Thu Jul 22 2021 Fedora Release Engineering - 1.18.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index c149312..882e173 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.18.0.tar.xz) = 9a834f075d7a1f892416bb6b241eb052f749d3aa883c4b39c0f1c9616c115d6b9a541b587508646fddaf0d3fe57af92fe4629b522d1d51196499e7b523e0aa90 +SHA512 (libinput-1.18.1.tar.xz) = 450e38c0f8245aa0165a8047d25aebee646332f0f2ed442bb2d1bd3e723c2082b6d00d6e3bda308981ece8e29b5cddbd56eab900d2b7497705a45fc27b281828 From dea0b6e457ab1301198002a5d4f3e71e34cb3f44 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 1 Sep 2021 15:05:20 +1000 Subject: [PATCH 264/317] libinput 1.18.901 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 7efc43a..9abca2d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.18.1 +Version: 1.18.901 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -146,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Wed Sep 01 2021 Peter Hutterer - 1.18.901-1 +- libinput 1.18.901 + * Tue Aug 03 2021 Peter Hutterer - 1.18.1-1 - libinput 1.18.1 diff --git a/sources b/sources index 882e173..8de2d73 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.18.1.tar.xz) = 450e38c0f8245aa0165a8047d25aebee646332f0f2ed442bb2d1bd3e723c2082b6d00d6e3bda308981ece8e29b5cddbd56eab900d2b7497705a45fc27b281828 +SHA512 (libinput-1.18.901.tar.xz) = 383ffc85eaa74c58860600617878bfc60ae2dd9a29b975f2a393575901f76abeb3721194c00e62054218ffdf8cf479dd9deba58a906e4e7ef17df561fe1f5207 From d06b493b1be61d136dbb6e63839a9bd8c0ace4d2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 15 Sep 2021 09:22:34 +1000 Subject: [PATCH 265/317] libinput 1.19.0 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 9abca2d..ba5a86b 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.18.901 +Version: 1.19.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -146,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Wed Sep 15 2021 Peter Hutterer - 1.19.0-1 +- libinput 1.19.0 + * Wed Sep 01 2021 Peter Hutterer - 1.18.901-1 - libinput 1.18.901 diff --git a/sources b/sources index 8de2d73..6c08389 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.18.901.tar.xz) = 383ffc85eaa74c58860600617878bfc60ae2dd9a29b975f2a393575901f76abeb3721194c00e62054218ffdf8cf479dd9deba58a906e4e7ef17df561fe1f5207 +SHA512 (libinput-1.19.0.tar.xz) = daf42ce797f2b5aef8d6f7a5c0d967590581e6ac12c26fa6bde5fbc619d75319e39ca55d65d5347e554dd6a48b91f5fed4d3167eabef8ad1ebc43bc0c3e8e220 From f3b0ff9c2cc415310f4f160058886444072bf22a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 29 Sep 2021 07:43:14 +1000 Subject: [PATCH 266/317] libinput 1.19.1 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index ba5a86b..45d1e1e 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.19.0 +Version: 1.19.1 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -146,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Wed Sep 29 2021 Peter Hutterer - 1.19.1-1 +- libinput 1.19.1 + * Wed Sep 15 2021 Peter Hutterer - 1.19.0-1 - libinput 1.19.0 diff --git a/sources b/sources index 6c08389..513a2de 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.19.0.tar.xz) = daf42ce797f2b5aef8d6f7a5c0d967590581e6ac12c26fa6bde5fbc619d75319e39ca55d65d5347e554dd6a48b91f5fed4d3167eabef8ad1ebc43bc0c3e8e220 +SHA512 (libinput-1.19.1.tar.xz) = 63084f5e081ee4918fee8584d99e6feb84ce9b771015c556c930843e0097abb9b93b6f9731c488b8493eac18fa4086f4822a2ed00f3cb3258346341ad0061c36 From 6ab4b03fb491378aa1a12a0954f8b752d3c7e1b5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 21 Oct 2021 14:39:47 +1000 Subject: [PATCH 267/317] libinput 1.19.2 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 45d1e1e..e56bfff 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.19.1 +Version: 1.19.2 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -146,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Thu Oct 21 2021 Peter Hutterer - 1.19.2-1 +- libinput 1.19.2 + * Wed Sep 29 2021 Peter Hutterer - 1.19.1-1 - libinput 1.19.1 diff --git a/sources b/sources index 513a2de..e0c036f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.19.1.tar.xz) = 63084f5e081ee4918fee8584d99e6feb84ce9b771015c556c930843e0097abb9b93b6f9731c488b8493eac18fa4086f4822a2ed00f3cb3258346341ad0061c36 +SHA512 (libinput-1.19.2.tar.xz) = fc5244dc90ceb710f7b5bb76a3cafc7dd5a8d5fa05c51122412615bfc3a99435d6a1017b79c3ce73561139fc2f5959acaf16cb9500796ea2f3eb6cb95d1a1acb From a957d5eea76d106bc633437b8e3ea73b6ba20ef6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 13 Dec 2021 13:49:22 +1000 Subject: [PATCH 268/317] libinput 1.19.3 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index e56bfff..df8cbf5 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.19.2 +Version: 1.19.3 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -146,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Mon Dec 13 2021 Peter Hutterer - 1.19.3-1 +- libinput 1.19.3 + * Thu Oct 21 2021 Peter Hutterer - 1.19.2-1 - libinput 1.19.2 diff --git a/sources b/sources index e0c036f..065725c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.19.2.tar.xz) = fc5244dc90ceb710f7b5bb76a3cafc7dd5a8d5fa05c51122412615bfc3a99435d6a1017b79c3ce73561139fc2f5959acaf16cb9500796ea2f3eb6cb95d1a1acb +SHA512 (libinput-1.19.3.tar.xz) = f4b776d0da78c687ba21b430a04941ac6b43f68970c82ec9f7360358fdea5ed6a873948ce66a25bcdd64d4b95fa4bf705cc24dbc25c7c0f5fd2d0efbd763f298 From 6da83b37006b2daa0e85155efb77ca09a3320943 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 13 Dec 2021 14:32:27 +1000 Subject: [PATCH 269/317] Rebuild for libwacom soname bump --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index df8cbf5..31a2ccf 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.19.3 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -146,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Mon Dec 13 2021 Peter Hutterer - 1.19.3-2 +- Rebuild for libwacom soname bump + * Mon Dec 13 2021 Peter Hutterer - 1.19.3-1 - libinput 1.19.3 From c1528d9c4acb292d91dc476c544b7e72eb5f3a8b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 16:28:38 +0000 Subject: [PATCH 270/317] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 31a2ccf..c250214 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.19.3 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -146,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 1.19.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Mon Dec 13 2021 Peter Hutterer - 1.19.3-2 - Rebuild for libwacom soname bump From 79623357bad61d701cafb3f2106c1664af8b202e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 7 Feb 2022 13:10:04 +1000 Subject: [PATCH 271/317] libinput 1.20rc1 --- .gitignore | 2 +- libinput.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 9a06e56..edf6ae0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/libinput-*.tar.xz +/libinput-*.tar.bz2 diff --git a/libinput.spec b/libinput.spec index c250214..8545280 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.19.3 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.19.901 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -15,7 +15,7 @@ Source0: %{name}-%{gitdate}.tar.xz Source1: make-git-snapshot.sh Source2: commitid %else -Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz +Source0: https://gitlab.freedesktop.org/libinput/libinput/-/archive/%{version}/libinput-%{version}.tar.bz2 %endif BuildRequires: git-core @@ -146,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Mon Feb 07 2022 Peter Hutterer - 1.19.901-1 +- libinput 1.20rc1 + * Thu Jan 20 2022 Fedora Release Engineering - 1.19.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 065725c..cc74840 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.19.3.tar.xz) = f4b776d0da78c687ba21b430a04941ac6b43f68970c82ec9f7360358fdea5ed6a873948ce66a25bcdd64d4b95fa4bf705cc24dbc25c7c0f5fd2d0efbd763f298 +SHA512 (libinput-1.19.901.tar.bz2) = d2f6827d3efe4cdd2ae9aa3ebc886bcbef7e1986d7dc8b38874da2cc21a6ed3151e08951ac4a95ff0ae0d26a85e50f00e979dcb2db919c9b511453b70599f336 From c99e2cd00df0537a083d508bc5711e8e1469a468 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 21 Feb 2022 08:25:28 +1000 Subject: [PATCH 272/317] libinput 1.20 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 8545280..cb20da1 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.19.901 +Version: 1.20.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -146,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Mon Feb 21 2022 Peter Hutterer - 1.20.0-1 +- libinput 1.20 + * Mon Feb 07 2022 Peter Hutterer - 1.19.901-1 - libinput 1.20rc1 diff --git a/sources b/sources index cc74840..74bd834 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.19.901.tar.bz2) = d2f6827d3efe4cdd2ae9aa3ebc886bcbef7e1986d7dc8b38874da2cc21a6ed3151e08951ac4a95ff0ae0d26a85e50f00e979dcb2db919c9b511453b70599f336 +SHA512 (libinput-1.20.0.tar.bz2) = 145b0e0760929137ab442b2030b4b42f6df54a3ae61c47c929e1a74857a170f0f2a56bb7522b7d1d9c0943028ac54c7728cf8d66a0c384f6118f31d6625ab44c From d19bc244c8e43252cfeb6a543e5fe03253add13a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 20 Apr 2022 15:42:26 +1000 Subject: [PATCH 273/317] libinput 1.20.1 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index cb20da1..7f942ce 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.20.0 +Version: 1.20.1 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -146,6 +146,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-test-suite.1* %changelog +* Wed Apr 20 2022 Peter Hutterer - 1.20.1-1 +- libinput 1.20.1 + * Mon Feb 21 2022 Peter Hutterer - 1.20.0-1 - libinput 1.20 diff --git a/sources b/sources index 74bd834..1d6175e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.20.0.tar.bz2) = 145b0e0760929137ab442b2030b4b42f6df54a3ae61c47c929e1a74857a170f0f2a56bb7522b7d1d9c0943028ac54c7728cf8d66a0c384f6118f31d6625ab44c +SHA512 (libinput-1.20.1.tar.bz2) = d981bf90980c2f609393da998926bc4018599dddbb86c272dfb77bab1b2d5f35c6070f96bcfe5ef0032bd6c957b13f64ed32025d9f04fb413268571b2ee79cd1 From a56a13bff0566120c5f5e3564cfc36f7c7754ce0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 14 Jun 2022 13:32:38 +1000 Subject: [PATCH 274/317] libinput 1.21.0 --- libinput.spec | 9 ++++++++- sources | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 7f942ce..a1f7e16 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.20.1 +Version: 1.21.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -142,10 +142,17 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %{_mandir}/man1/libinput-replay.1* %files test +%{_libexecdir}/libinput/libinput-test %{_libexecdir}/libinput/libinput-test-suite +%{_libexecdir}/libinput/libinput-test-utils +%{_mandir}/man1/libinput-test.1* %{_mandir}/man1/libinput-test-suite.1* + %changelog +* Mon Jun 13 2022 Peter Hutterer - 1.21.0-1 +- libinput 1.21.0 + * Wed Apr 20 2022 Peter Hutterer - 1.20.1-1 - libinput 1.20.1 diff --git a/sources b/sources index 1d6175e..819c0c5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.20.1.tar.bz2) = d981bf90980c2f609393da998926bc4018599dddbb86c272dfb77bab1b2d5f35c6070f96bcfe5ef0032bd6c957b13f64ed32025d9f04fb413268571b2ee79cd1 +SHA512 (libinput-1.21.0.tar.bz2) = 537f2dc40d6e21e267f157b08540b41176c3de68a2867d52d7acdcbb5616dc563dc0b6247f6efee75848ce64f76a3633f335cfd3bbf51c93d240fb16c06c2a4d From e0608553e98b39315ea0dde9e618aec99273dab8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 18:06:15 +0000 Subject: [PATCH 275/317] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index a1f7e16..93846ab 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.21.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -150,6 +150,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 1.21.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Jun 13 2022 Peter Hutterer - 1.21.0-1 - libinput 1.21.0 From 16e60efc5390042951ef63b1d061a6ab141fcb6f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 31 Aug 2022 14:00:55 +1000 Subject: [PATCH 276/317] Add udev to BuildRequires for udevdir to resolve againt --- libinput.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 93846ab..127db75 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.21.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -25,6 +25,7 @@ BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(mtdev) >= 1.1.0 BuildRequires: pkgconfig(libevdev) >= 0.4 BuildRequires: pkgconfig(libwacom) >= 0.20 +BuildRequires: pkgconfig(udev) BuildRequires: python3-devel BuildRequires: check-devel @@ -150,6 +151,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %changelog +* Wed Aug 31 2022 Peter Hutterer - 1.21.0-3 +- Add udev to BuildRequires for udevdir to resolve againt + * Thu Jul 21 2022 Fedora Release Engineering - 1.21.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 0a4f789b30e995f8b185561b66d484ed628779f2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 21 Nov 2022 10:03:47 +1000 Subject: [PATCH 277/317] libinput 1.22.0 --- libinput.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libinput.spec b/libinput.spec index 127db75..0d54c5c 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.21.0 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.22.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -151,6 +151,9 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') %changelog +* Mon Nov 21 2022 Peter Hutterer - 1.22.0-1git58abea394} +- libinput 1.22.0 + * Wed Aug 31 2022 Peter Hutterer - 1.21.0-3 - Add udev to BuildRequires for udevdir to resolve againt diff --git a/sources b/sources index 819c0c5..35daed0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.21.0.tar.bz2) = 537f2dc40d6e21e267f157b08540b41176c3de68a2867d52d7acdcbb5616dc563dc0b6247f6efee75848ce64f76a3633f335cfd3bbf51c93d240fb16c06c2a4d +SHA512 (libinput-1.22.0.tar.bz2) = 62cc36845daa7bc4b8477dd71abe629309683a93de753382a90e8466915e2b96b9c6914b431747d3462c15d8ab42bc70ee755800eec60c4ad7e9f3b4f7dba76d From ad65e5bf75358bdbad38d0aca491365c800f7e8b Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Tue, 1 Nov 2022 07:09:14 +0100 Subject: [PATCH 278/317] Use %py3_shebang_fix instead of direct call of pathfix.py For more info see https://fedoraproject.org/wiki/Changes/Python3.12#pathfix.py_tool_will_be_removed --- libinput.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 0d54c5c..a1525f5 100644 --- a/libinput.spec +++ b/libinput.spec @@ -66,7 +66,7 @@ intended to be run by users. %prep %autosetup -S git # Replace whatever the source uses with the approved call -pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3') +%py3_shebang_fix $(git grep -l '#!/usr/bin/.*python3') %build %meson -Ddebug-gui=false \ From 111d95f603537dc8fbeecf9c8da5af2d0023e5cd Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Sat, 26 Nov 2022 10:53:35 -0800 Subject: [PATCH 279/317] Backport upstream patch to add Apple MTP touchpad quirk for Apple M2 laptops --- ...-quirks-Add-Apple-MTP-touchpad-quirk.patch | 41 +++++++++++++++++++ libinput.spec | 9 +++- 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 0001-quirks-Add-Apple-MTP-touchpad-quirk.patch diff --git a/0001-quirks-Add-Apple-MTP-touchpad-quirk.patch b/0001-quirks-Add-Apple-MTP-touchpad-quirk.patch new file mode 100644 index 0000000..a912006 --- /dev/null +++ b/0001-quirks-Add-Apple-MTP-touchpad-quirk.patch @@ -0,0 +1,41 @@ +From 6f417fec0071fa2814d4449cc78db8da8f009d99 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 22 Nov 2022 13:52:24 +0900 +Subject: [PATCH] quirks: Add Apple MTP touchpad quirk + +Apple M2 (and presumably newer) laptops now embed the touchpad +controller into the main SoC, and use a new internal communications +protocol between it and the main CPU. This isn't really a "bus" like +SPI or I2C, so the downstream kernel driver currently uses the (not +well supported) HOST bus type. MatchBus can't match on that, so let's +just use a name match (plus the vendor ID, which is still valid and +the usual Apple one). + +Signed-off-by: Hector Martin +--- + quirks/50-system-apple.quirks | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/quirks/50-system-apple.quirks b/quirks/50-system-apple.quirks +index 7f7a81cd36d5..a6d6eea91d5a 100644 +--- a/quirks/50-system-apple.quirks ++++ b/quirks/50-system-apple.quirks +@@ -105,6 +105,15 @@ AttrSizeHint=104x75 + AttrTouchSizeRange=150:130 + AttrPalmSizeThreshold=1600 + ++[Apple Laptop Touchpad (MTP)] ++MatchUdevType=touchpad ++MatchName=Apple*MTP* ++MatchVendor=0x5AC ++ModelAppleTouchpad=1 ++AttrSizeHint=104x75 ++AttrTouchSizeRange=150:130 ++AttrPalmSizeThreshold=1600 ++ + # The Linux applespi driver currently uses the Synaptics vendor for some reason + [Apple Laptop Touchpad (SPI)] + MatchUdevType=touchpad +-- +2.38.1 + diff --git a/libinput.spec b/libinput.spec index a1525f5..633a577 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.22.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -17,6 +17,8 @@ Source2: commitid %else Source0: https://gitlab.freedesktop.org/libinput/libinput/-/archive/%{version}/libinput-%{version}.tar.bz2 %endif +# Apple MTP touchpad quirk for Apple M2 laptops +Patch0: 0001-quirks-Add-Apple-MTP-touchpad-quirk.patch BuildRequires: git-core BuildRequires: gcc @@ -64,7 +66,7 @@ The %{name}-test package contains the libinput test suite. It is not intended to be run by users. %prep -%autosetup -S git +%autosetup -S git -p1 # Replace whatever the source uses with the approved call %py3_shebang_fix $(git grep -l '#!/usr/bin/.*python3') @@ -151,6 +153,9 @@ intended to be run by users. %changelog +* Sat Nov 26 2022 Davide Cavalca 1.22.0-2 +- Backport upstream patch to add Apple MTP touchpad quirk for Apple M2 laptops + * Mon Nov 21 2022 Peter Hutterer - 1.22.0-1git58abea394} - libinput 1.22.0 From 924963edebc3f060e23a9549e6012fe5be1d34c9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 16 Jan 2023 17:35:29 +1000 Subject: [PATCH 280/317] libinput 1.22.1 --- ...-quirks-Add-Apple-MTP-touchpad-quirk.patch | 41 ------------------- libinput.spec | 9 ++-- sources | 2 +- 3 files changed, 6 insertions(+), 46 deletions(-) delete mode 100644 0001-quirks-Add-Apple-MTP-touchpad-quirk.patch diff --git a/0001-quirks-Add-Apple-MTP-touchpad-quirk.patch b/0001-quirks-Add-Apple-MTP-touchpad-quirk.patch deleted file mode 100644 index a912006..0000000 --- a/0001-quirks-Add-Apple-MTP-touchpad-quirk.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 6f417fec0071fa2814d4449cc78db8da8f009d99 Mon Sep 17 00:00:00 2001 -From: Hector Martin -Date: Tue, 22 Nov 2022 13:52:24 +0900 -Subject: [PATCH] quirks: Add Apple MTP touchpad quirk - -Apple M2 (and presumably newer) laptops now embed the touchpad -controller into the main SoC, and use a new internal communications -protocol between it and the main CPU. This isn't really a "bus" like -SPI or I2C, so the downstream kernel driver currently uses the (not -well supported) HOST bus type. MatchBus can't match on that, so let's -just use a name match (plus the vendor ID, which is still valid and -the usual Apple one). - -Signed-off-by: Hector Martin ---- - quirks/50-system-apple.quirks | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/quirks/50-system-apple.quirks b/quirks/50-system-apple.quirks -index 7f7a81cd36d5..a6d6eea91d5a 100644 ---- a/quirks/50-system-apple.quirks -+++ b/quirks/50-system-apple.quirks -@@ -105,6 +105,15 @@ AttrSizeHint=104x75 - AttrTouchSizeRange=150:130 - AttrPalmSizeThreshold=1600 - -+[Apple Laptop Touchpad (MTP)] -+MatchUdevType=touchpad -+MatchName=Apple*MTP* -+MatchVendor=0x5AC -+ModelAppleTouchpad=1 -+AttrSizeHint=104x75 -+AttrTouchSizeRange=150:130 -+AttrPalmSizeThreshold=1600 -+ - # The Linux applespi driver currently uses the Synaptics vendor for some reason - [Apple Laptop Touchpad (SPI)] - MatchUdevType=touchpad --- -2.38.1 - diff --git a/libinput.spec b/libinput.spec index 633a577..5cb8125 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.22.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.22.1 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -17,8 +17,6 @@ Source2: commitid %else Source0: https://gitlab.freedesktop.org/libinput/libinput/-/archive/%{version}/libinput-%{version}.tar.bz2 %endif -# Apple MTP touchpad quirk for Apple M2 laptops -Patch0: 0001-quirks-Add-Apple-MTP-touchpad-quirk.patch BuildRequires: git-core BuildRequires: gcc @@ -153,6 +151,9 @@ intended to be run by users. %changelog +* Mon Jan 16 2023 Peter Hutterer - 1.22.1-1 +- libinput 1.22.1 + * Sat Nov 26 2022 Davide Cavalca 1.22.0-2 - Backport upstream patch to add Apple MTP touchpad quirk for Apple M2 laptops diff --git a/sources b/sources index 35daed0..7b353c0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.22.0.tar.bz2) = 62cc36845daa7bc4b8477dd71abe629309683a93de753382a90e8466915e2b96b9c6914b431747d3462c15d8ab42bc70ee755800eec60c4ad7e9f3b4f7dba76d +SHA512 (libinput-1.22.1.tar.bz2) = 9d1985bc03ae304643fcd3acb762afc53305942e39071a062e7f8950be4929c72bdfeff06039c77f70e53233885df1e2e1a1dc538caeefd2b46f35826d290e9e From 065e79f93d1aa48a942c059eb17a5e9e27c88c49 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 16:36:37 +0000 Subject: [PATCH 281/317] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 5cb8125..cc91fe9 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.22.1 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -151,6 +151,9 @@ intended to be run by users. %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 1.22.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Mon Jan 16 2023 Peter Hutterer - 1.22.1-1 - libinput 1.22.1 From a6cac42be582f6554d9354e4fd9f14644bcabe17 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 27 Mar 2023 16:00:54 +1000 Subject: [PATCH 282/317] libinput 1.23.0 --- libinput.spec | 9 +++++++-- sources | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libinput.spec b/libinput.spec index cc91fe9..d27f639 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.22.1 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.23.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -116,6 +116,7 @@ intended to be run by users. %{_libexecdir}/libinput/libinput-analyze-recording %{_libexecdir}/libinput/libinput-analyze-touch-down-state %{_libexecdir}/libinput/libinput-debug-tablet +%{_libexecdir}/libinput/libinput-list-kernel-devices %{_libexecdir}/libinput/libinput-measure %{_libexecdir}/libinput/libinput-measure-fuzz %{_libexecdir}/libinput/libinput-measure-touchpad-tap @@ -130,6 +131,7 @@ intended to be run by users. %{_mandir}/man1/libinput-analyze-recording.1* %{_mandir}/man1/libinput-analyze-touch-down-state.1* %{_mandir}/man1/libinput-debug-tablet.1* +%{_mandir}/man1/libinput-list-kernel-devices.1* %{_mandir}/man1/libinput-measure.1* %{_mandir}/man1/libinput-measure-fuzz.1* %{_mandir}/man1/libinput-measure-touchpad-tap.1* @@ -151,6 +153,9 @@ intended to be run by users. %changelog +* Mon Mar 27 2023 Peter Hutterer - 1.23.0-1 +- libinput 1.23.0 + * Thu Jan 19 2023 Fedora Release Engineering - 1.22.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index 7b353c0..49cd3ab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.22.1.tar.bz2) = 9d1985bc03ae304643fcd3acb762afc53305942e39071a062e7f8950be4929c72bdfeff06039c77f70e53233885df1e2e1a1dc538caeefd2b46f35826d290e9e +SHA512 (libinput-1.23.0.tar.bz2) = cb752d8611d70d9ea26d875aba9db8d0e319e60697aedef1b16295e8180761ce4c8c9635b1aaeb3cfc32d8c5fbe4abfd9a5a4fd29c4b964b25c853c90e816a43 From 37e9aa1136eaefe9e15f894d3dc436d2f4d6c3c9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 11 Apr 2023 10:20:03 +1000 Subject: [PATCH 283/317] Add two patches for better Apple touchpad behavior (see libinput MR 834 and 897) --- ...atural-scrolling-by-default-on-Apple.patch | 102 ++++++++++++++++++ ...-edge-palm-detection-Apple-touchpads.patch | 50 +++++++++ libinput.spec | 9 +- 3 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 0001-evdev-Enable-natural-scrolling-by-default-on-Apple.patch create mode 100644 0001-touchpad-Disable-edge-palm-detection-Apple-touchpads.patch diff --git a/0001-evdev-Enable-natural-scrolling-by-default-on-Apple.patch b/0001-evdev-Enable-natural-scrolling-by-default-on-Apple.patch new file mode 100644 index 0000000..b5e8341 --- /dev/null +++ b/0001-evdev-Enable-natural-scrolling-by-default-on-Apple.patch @@ -0,0 +1,102 @@ +From d61d385951c5678ad18d495358abe952ce359ac9 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Sat, 10 Dec 2022 19:40:07 +0900 +Subject: [PATCH] evdev: Enable natural scrolling by default on Apple + +As suggested by the comment itself. I think most users expect this. + +Signed-off-by: Hector Martin +Signed-off-by: Peter Hutterer +--- + src/evdev-mt-touchpad.c | 12 ++++++++++++ + src/evdev.c | 3 +-- + test/litest.h | 4 ++++ + test/test-touchpad.c | 6 ++++-- + 4 files changed, 21 insertions(+), 4 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index b29a5c56..e2ecdea7 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -3137,12 +3137,24 @@ tp_scroll_config_scroll_method_get_default_method(struct libinput_device *device + return tp_scroll_get_default_method(tp); + } + ++static int ++tp_scroll_config_natural_get_default(struct libinput_device *device) ++{ ++ struct evdev_device *dev = evdev_device(device); ++ ++ return (evdev_device_has_model_quirk(dev, QUIRK_MODEL_APPLE_TOUCHPAD) || ++ evdev_device_has_model_quirk(dev, QUIRK_MODEL_APPLE_TOUCHPAD_ONEBUTTON)); ++} ++ + static void + tp_init_scroll(struct tp_dispatch *tp, struct evdev_device *device) + { + tp_edge_scroll_init(tp, device); + + evdev_init_natural_scroll(device); ++ /* Override natural scroll config for Apple touchpads */ ++ device->scroll.config_natural.get_default_enabled = tp_scroll_config_natural_get_default; ++ device->scroll.natural_scrolling_enabled = tp_scroll_config_natural_get_default(&device->base); + + tp->scroll.config_method.get_methods = tp_scroll_config_scroll_method_get_methods; + tp->scroll.config_method.set_method = tp_scroll_config_scroll_method_set_method; +diff --git a/src/evdev.c b/src/evdev.c +index 524ae9a1..33b3f514 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -957,8 +957,7 @@ evdev_scroll_config_natural_get(struct libinput_device *device) + static int + evdev_scroll_config_natural_get_default(struct libinput_device *device) + { +- /* could enable this on Apple touchpads. could do that, could +- * very well do that... */ ++ /* Overridden in evdev-mt-touchpad.c for Apple touchpads. */ + return 0; + } + +diff --git a/test/litest.h b/test/litest.h +index baba5cbb..95150831 100644 +--- a/test/litest.h ++++ b/test/litest.h +@@ -1064,6 +1064,8 @@ litest_enable_2fg_scroll(struct litest_device *dev) + + expected = LIBINPUT_CONFIG_STATUS_SUCCESS; + litest_assert_int_eq(status, expected); ++ ++ libinput_device_config_scroll_set_natural_scroll_enabled(device, 0); + } + + static inline void +@@ -1077,6 +1079,8 @@ litest_enable_edge_scroll(struct litest_device *dev) + + expected = LIBINPUT_CONFIG_STATUS_SUCCESS; + litest_assert_int_eq(status, expected); ++ ++ libinput_device_config_scroll_set_natural_scroll_enabled(device, 0); + } + + static inline bool +diff --git a/test/test-touchpad.c b/test/test-touchpad.c +index c02cb01c..d72ae0fa 100644 +--- a/test/test-touchpad.c ++++ b/test/test-touchpad.c +@@ -611,9 +611,11 @@ START_TEST(touchpad_scroll_natural_defaults) + { + struct litest_device *dev = litest_current_device(); + ++ int enabled = libevdev_get_id_vendor(dev->evdev) == VENDOR_ID_APPLE; ++ + ck_assert_int_ge(libinput_device_config_scroll_has_natural_scroll(dev->libinput_device), 1); +- ck_assert_int_eq(libinput_device_config_scroll_get_natural_scroll_enabled(dev->libinput_device), 0); +- ck_assert_int_eq(libinput_device_config_scroll_get_default_natural_scroll_enabled(dev->libinput_device), 0); ++ ck_assert_int_eq(libinput_device_config_scroll_get_natural_scroll_enabled(dev->libinput_device), enabled); ++ ck_assert_int_eq(libinput_device_config_scroll_get_default_natural_scroll_enabled(dev->libinput_device), enabled); + } + END_TEST + +-- +2.40.0 + diff --git a/0001-touchpad-Disable-edge-palm-detection-Apple-touchpads.patch b/0001-touchpad-Disable-edge-palm-detection-Apple-touchpads.patch new file mode 100644 index 0000000..b36c371 --- /dev/null +++ b/0001-touchpad-Disable-edge-palm-detection-Apple-touchpads.patch @@ -0,0 +1,50 @@ +From 4a8b5e6ec445b507fc0b1ef9842a60bf13c58772 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Thu, 6 Apr 2023 15:33:42 +0900 +Subject: [PATCH] touchpad: Disable edge palm detection Apple touchpads + +This hurts more than it helps, and users complain of dead trackpad +edges. Apple touchpads have fairly sophisticated internal palm rejection +algorithms going back many years, so let's just disable this one on +everything Apple. + +Related to: #433 (need to figure out what other hardware may need this) + +Signed-off-by: Hector Martin +Signed-off-by: Peter Hutterer +--- + src/evdev-mt-touchpad.c | 4 ++++ + test/litest.h | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index e2ecdea7..5b040ce5 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -3350,6 +3350,10 @@ tp_init_palmdetect_edge(struct tp_dispatch *tp, + !tp_is_tpkb_combo_below(device)) + return; + ++ /* Edge palm detection hurts more than it helps on Apple touchpads. */ ++ if (evdev_device_has_model_quirk(device, QUIRK_MODEL_APPLE_TOUCHPAD)) ++ return; ++ + evdev_device_get_size(device, &width, &height); + + /* Enable edge palm detection on touchpads >= 70 mm. Anything +diff --git a/test/litest.h b/test/litest.h +index 95150831..457790b3 100644 +--- a/test/litest.h ++++ b/test/litest.h +@@ -1287,7 +1287,7 @@ litest_has_palm_detect_size(struct litest_device *dev) + if (bustype == BUS_BLUETOOTH) + return 0; + if (vendor == VENDOR_ID_APPLE) +- return 1; ++ return 0; + + rc = libinput_device_get_size(dev->libinput_device, &width, &height); + +-- +2.40.0 + diff --git a/libinput.spec b/libinput.spec index d27f639..b0879e1 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.23.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,6 +18,9 @@ Source2: commitid Source0: https://gitlab.freedesktop.org/libinput/libinput/-/archive/%{version}/libinput-%{version}.tar.bz2 %endif +Patch0001: 0001-evdev-Enable-natural-scrolling-by-default-on-Apple.patch +Patch0002: 0001-touchpad-Disable-edge-palm-detection-Apple-touchpads.patch + BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -153,6 +156,10 @@ intended to be run by users. %changelog +* Tue Apr 11 2023 Peter Hutterer - 1.23.0-2 +- Add two patches for better Apple touchpad behavior (see libinput MR + 834 and 897) + * Mon Mar 27 2023 Peter Hutterer - 1.23.0-1 - libinput 1.23.0 From e7bd82577e48cc240e9babe5a4c904c540322371 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 20 Jul 2023 15:11:12 +1000 Subject: [PATCH 284/317] BuildRequires python3-rpm-macros for pathfix.py --- libinput.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index b0879e1..d83d3c3 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.23.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -29,7 +29,7 @@ BuildRequires: pkgconfig(mtdev) >= 1.1.0 BuildRequires: pkgconfig(libevdev) >= 0.4 BuildRequires: pkgconfig(libwacom) >= 0.20 BuildRequires: pkgconfig(udev) -BuildRequires: python3-devel +BuildRequires: python3-rpm-macros BuildRequires: check-devel %description @@ -156,6 +156,9 @@ intended to be run by users. %changelog +* Thu Jul 20 2023 Peter Hutterer - 1.23.0-3 +- BuildRequires python3-rpm-macros for pathfix.py + * Tue Apr 11 2023 Peter Hutterer - 1.23.0-2 - Add two patches for better Apple touchpad behavior (see libinput MR 834 and 897) From 0dc838f17637edfcf7f62ea0136531202bda05de Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Aug 2023 13:19:19 +1000 Subject: [PATCH 285/317] libinput 1.24.0 --- ...atural-scrolling-by-default-on-Apple.patch | 102 ------------------ ...-edge-palm-detection-Apple-touchpads.patch | 50 --------- libinput.spec | 10 +- sources | 2 +- 4 files changed, 6 insertions(+), 158 deletions(-) delete mode 100644 0001-evdev-Enable-natural-scrolling-by-default-on-Apple.patch delete mode 100644 0001-touchpad-Disable-edge-palm-detection-Apple-touchpads.patch diff --git a/0001-evdev-Enable-natural-scrolling-by-default-on-Apple.patch b/0001-evdev-Enable-natural-scrolling-by-default-on-Apple.patch deleted file mode 100644 index b5e8341..0000000 --- a/0001-evdev-Enable-natural-scrolling-by-default-on-Apple.patch +++ /dev/null @@ -1,102 +0,0 @@ -From d61d385951c5678ad18d495358abe952ce359ac9 Mon Sep 17 00:00:00 2001 -From: Hector Martin -Date: Sat, 10 Dec 2022 19:40:07 +0900 -Subject: [PATCH] evdev: Enable natural scrolling by default on Apple - -As suggested by the comment itself. I think most users expect this. - -Signed-off-by: Hector Martin -Signed-off-by: Peter Hutterer ---- - src/evdev-mt-touchpad.c | 12 ++++++++++++ - src/evdev.c | 3 +-- - test/litest.h | 4 ++++ - test/test-touchpad.c | 6 ++++-- - 4 files changed, 21 insertions(+), 4 deletions(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index b29a5c56..e2ecdea7 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -3137,12 +3137,24 @@ tp_scroll_config_scroll_method_get_default_method(struct libinput_device *device - return tp_scroll_get_default_method(tp); - } - -+static int -+tp_scroll_config_natural_get_default(struct libinput_device *device) -+{ -+ struct evdev_device *dev = evdev_device(device); -+ -+ return (evdev_device_has_model_quirk(dev, QUIRK_MODEL_APPLE_TOUCHPAD) || -+ evdev_device_has_model_quirk(dev, QUIRK_MODEL_APPLE_TOUCHPAD_ONEBUTTON)); -+} -+ - static void - tp_init_scroll(struct tp_dispatch *tp, struct evdev_device *device) - { - tp_edge_scroll_init(tp, device); - - evdev_init_natural_scroll(device); -+ /* Override natural scroll config for Apple touchpads */ -+ device->scroll.config_natural.get_default_enabled = tp_scroll_config_natural_get_default; -+ device->scroll.natural_scrolling_enabled = tp_scroll_config_natural_get_default(&device->base); - - tp->scroll.config_method.get_methods = tp_scroll_config_scroll_method_get_methods; - tp->scroll.config_method.set_method = tp_scroll_config_scroll_method_set_method; -diff --git a/src/evdev.c b/src/evdev.c -index 524ae9a1..33b3f514 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -957,8 +957,7 @@ evdev_scroll_config_natural_get(struct libinput_device *device) - static int - evdev_scroll_config_natural_get_default(struct libinput_device *device) - { -- /* could enable this on Apple touchpads. could do that, could -- * very well do that... */ -+ /* Overridden in evdev-mt-touchpad.c for Apple touchpads. */ - return 0; - } - -diff --git a/test/litest.h b/test/litest.h -index baba5cbb..95150831 100644 ---- a/test/litest.h -+++ b/test/litest.h -@@ -1064,6 +1064,8 @@ litest_enable_2fg_scroll(struct litest_device *dev) - - expected = LIBINPUT_CONFIG_STATUS_SUCCESS; - litest_assert_int_eq(status, expected); -+ -+ libinput_device_config_scroll_set_natural_scroll_enabled(device, 0); - } - - static inline void -@@ -1077,6 +1079,8 @@ litest_enable_edge_scroll(struct litest_device *dev) - - expected = LIBINPUT_CONFIG_STATUS_SUCCESS; - litest_assert_int_eq(status, expected); -+ -+ libinput_device_config_scroll_set_natural_scroll_enabled(device, 0); - } - - static inline bool -diff --git a/test/test-touchpad.c b/test/test-touchpad.c -index c02cb01c..d72ae0fa 100644 ---- a/test/test-touchpad.c -+++ b/test/test-touchpad.c -@@ -611,9 +611,11 @@ START_TEST(touchpad_scroll_natural_defaults) - { - struct litest_device *dev = litest_current_device(); - -+ int enabled = libevdev_get_id_vendor(dev->evdev) == VENDOR_ID_APPLE; -+ - ck_assert_int_ge(libinput_device_config_scroll_has_natural_scroll(dev->libinput_device), 1); -- ck_assert_int_eq(libinput_device_config_scroll_get_natural_scroll_enabled(dev->libinput_device), 0); -- ck_assert_int_eq(libinput_device_config_scroll_get_default_natural_scroll_enabled(dev->libinput_device), 0); -+ ck_assert_int_eq(libinput_device_config_scroll_get_natural_scroll_enabled(dev->libinput_device), enabled); -+ ck_assert_int_eq(libinput_device_config_scroll_get_default_natural_scroll_enabled(dev->libinput_device), enabled); - } - END_TEST - --- -2.40.0 - diff --git a/0001-touchpad-Disable-edge-palm-detection-Apple-touchpads.patch b/0001-touchpad-Disable-edge-palm-detection-Apple-touchpads.patch deleted file mode 100644 index b36c371..0000000 --- a/0001-touchpad-Disable-edge-palm-detection-Apple-touchpads.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 4a8b5e6ec445b507fc0b1ef9842a60bf13c58772 Mon Sep 17 00:00:00 2001 -From: Hector Martin -Date: Thu, 6 Apr 2023 15:33:42 +0900 -Subject: [PATCH] touchpad: Disable edge palm detection Apple touchpads - -This hurts more than it helps, and users complain of dead trackpad -edges. Apple touchpads have fairly sophisticated internal palm rejection -algorithms going back many years, so let's just disable this one on -everything Apple. - -Related to: #433 (need to figure out what other hardware may need this) - -Signed-off-by: Hector Martin -Signed-off-by: Peter Hutterer ---- - src/evdev-mt-touchpad.c | 4 ++++ - test/litest.h | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c -index e2ecdea7..5b040ce5 100644 ---- a/src/evdev-mt-touchpad.c -+++ b/src/evdev-mt-touchpad.c -@@ -3350,6 +3350,10 @@ tp_init_palmdetect_edge(struct tp_dispatch *tp, - !tp_is_tpkb_combo_below(device)) - return; - -+ /* Edge palm detection hurts more than it helps on Apple touchpads. */ -+ if (evdev_device_has_model_quirk(device, QUIRK_MODEL_APPLE_TOUCHPAD)) -+ return; -+ - evdev_device_get_size(device, &width, &height); - - /* Enable edge palm detection on touchpads >= 70 mm. Anything -diff --git a/test/litest.h b/test/litest.h -index 95150831..457790b3 100644 ---- a/test/litest.h -+++ b/test/litest.h -@@ -1287,7 +1287,7 @@ litest_has_palm_detect_size(struct litest_device *dev) - if (bustype == BUS_BLUETOOTH) - return 0; - if (vendor == VENDOR_ID_APPLE) -- return 1; -+ return 0; - - rc = libinput_device_get_size(dev->libinput_device, &width, &height); - --- -2.40.0 - diff --git a/libinput.spec b/libinput.spec index d83d3c3..acc589b 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.23.0 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.24.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,9 +18,6 @@ Source2: commitid Source0: https://gitlab.freedesktop.org/libinput/libinput/-/archive/%{version}/libinput-%{version}.tar.bz2 %endif -Patch0001: 0001-evdev-Enable-natural-scrolling-by-default-on-Apple.patch -Patch0002: 0001-touchpad-Disable-edge-palm-detection-Apple-touchpads.patch - BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -156,6 +153,9 @@ intended to be run by users. %changelog +* Fri Aug 25 2023 Peter Hutterer - 1.24.0-1 +- libinput 1.24.0 + * Thu Jul 20 2023 Peter Hutterer - 1.23.0-3 - BuildRequires python3-rpm-macros for pathfix.py diff --git a/sources b/sources index 49cd3ab..2146c09 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.23.0.tar.bz2) = cb752d8611d70d9ea26d875aba9db8d0e319e60697aedef1b16295e8180761ce4c8c9635b1aaeb3cfc32d8c5fbe4abfd9a5a4fd29c4b964b25c853c90e816a43 +SHA512 (libinput-1.24.0.tar.bz2) = 924554d62d232f99851db51386653e67083b8f3b8203b5d848294c08880e1ba153f80699900210d1b5b31566a2ef6bd4aa0662f107a2dcaed1fe0f7e1fb784db From acbe31e980a0d61903c4ec2bd5ac1cd9f48c8555 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 5 Sep 2023 11:47:05 +1000 Subject: [PATCH 286/317] SPDX migration: license is already SPDX compatible --- libinput.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libinput.spec b/libinput.spec index acc589b..957a634 100644 --- a/libinput.spec +++ b/libinput.spec @@ -8,6 +8,7 @@ Version: 1.24.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library +# SPDX License: MIT URL: http://www.freedesktop.org/wiki/Software/libinput/ %if 0%{?gitdate} @@ -153,6 +154,9 @@ intended to be run by users. %changelog +* Tue Sep 05 2023 Peter Hutterer +- SPDX migration: license is already SPDX compatible + * Fri Aug 25 2023 Peter Hutterer - 1.24.0-1 - libinput 1.24.0 From e549107e60ce50537cdcf3169f501e6028a726be Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 15 Jan 2024 20:07:26 +1000 Subject: [PATCH 287/317] libinput 1.25 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 957a634..d337c35 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.24.0 +Version: 1.25.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -154,6 +154,9 @@ intended to be run by users. %changelog +* Mon Jan 15 2024 Peter Hutterer - 1.25.0-1 +- libinput 1.25 + * Tue Sep 05 2023 Peter Hutterer - SPDX migration: license is already SPDX compatible diff --git a/sources b/sources index 2146c09..afcd41a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.24.0.tar.bz2) = 924554d62d232f99851db51386653e67083b8f3b8203b5d848294c08880e1ba153f80699900210d1b5b31566a2ef6bd4aa0662f107a2dcaed1fe0f7e1fb784db +SHA512 (libinput-1.25.0.tar.bz2) = b9dc3f3b5f34c82399dfb7ccb5f65d19a596c415f0198b39e3f360f5b87c42124a5355c8d9f6f42cc9ae2d4f9a90fe5da6260136fa83d278048392f93381a84b From af8c3247b4ef4e965eee81b85cea99d6966fc4bb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 04:22:37 +0000 Subject: [PATCH 288/317] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index d337c35..52ddd50 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.25.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -154,6 +154,9 @@ intended to be run by users. %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 1.25.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Jan 15 2024 Peter Hutterer - 1.25.0-1 - libinput 1.25 From ebf686410106782c7263bc7ea94e372881401c3d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 02:31:52 +0000 Subject: [PATCH 289/317] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 52ddd50..b232971 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.25.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -154,6 +154,9 @@ intended to be run by users. %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 1.25.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 1.25.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From ba22c6ea905af77d3bb1cdeff1d2f9b69075a1b7 Mon Sep 17 00:00:00 2001 From: Arthur Bols Date: Wed, 27 Mar 2024 15:38:15 +0100 Subject: [PATCH 290/317] Add quirk for Framework 16 to recognize keyboard as internal https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/974 --- ...work-16-keyboard-modules-as-internal.patch | 27 +++++++++++++++++++ libinput.spec | 8 +++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 0001-Recognizing-framework-16-keyboard-modules-as-internal.patch diff --git a/0001-Recognizing-framework-16-keyboard-modules-as-internal.patch b/0001-Recognizing-framework-16-keyboard-modules-as-internal.patch new file mode 100644 index 0000000..f98bd34 --- /dev/null +++ b/0001-Recognizing-framework-16-keyboard-modules-as-internal.patch @@ -0,0 +1,27 @@ +From 566857bd98131009699c9ab6efc7af37afd43fd0 Mon Sep 17 00:00:00 2001 +From: Josip Medved +Date: Fri, 16 Feb 2024 23:48:43 -0800 +Subject: [PATCH] Recognizing Framework 16 keyboard modules as internal + keyboards + +--- + quirks/50-system-framework.quirks | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/quirks/50-system-framework.quirks b/quirks/50-system-framework.quirks +index d42fe370e..3f4408eca 100644 +--- a/quirks/50-system-framework.quirks ++++ b/quirks/50-system-framework.quirks +@@ -3,3 +3,9 @@ MatchName=PIXA3854:00 093A:0274 Touchpad + MatchUdevType=touchpad + MatchDMIModalias=dmi:*svnFramework:pnLaptop* + AttrEventCode=-BTN_RIGHT ++ ++[Framework Laptop 16 Keyboard Module] ++MatchName=Framework Laptop 16 Keyboard Module* ++MatchUdevType=keyboard ++MatchDMIModalias=dmi:*svnFramework:pnLaptop16* ++AttrKeyboardIntegration=internal +-- +GitLab + diff --git a/libinput.spec b/libinput.spec index b232971..6a498c5 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.25.0 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -19,6 +19,9 @@ Source2: commitid Source0: https://gitlab.freedesktop.org/libinput/libinput/-/archive/%{version}/libinput-%{version}.tar.bz2 %endif +# https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/974 +Patch0001: 0001-Recognizing-framework-16-keyboard-modules-as-internal.patch + BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -154,6 +157,9 @@ intended to be run by users. %changelog +* Wed Mar 27 2024 Arthur Bols - 1.25.0-4 +- Add quirk for Framework 16 to recognize keyboard as internal + * Thu Jan 25 2024 Fedora Release Engineering - 1.25.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 966f3a4acad55823d084d4404160947decddd665 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 31 May 2024 13:52:29 +1000 Subject: [PATCH 291/317] Mark datadir/libinput as owned by us (#2283754) --- libinput.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 6a498c5..97c3c96 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.25.0 -Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 5%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -102,6 +102,7 @@ intended to be run by users. %{_libexecdir}/libinput/libinput-debug-events %{_libexecdir}/libinput/libinput-list-devices %{_mandir}/man1/libinput.1* +%dir %{_datadir}/libinput %{_datadir}/libinput/*.quirks %dir %{_datadir}/zsh %dir %{_datadir}/zsh/site-functions @@ -157,6 +158,9 @@ intended to be run by users. %changelog +* Fri May 31 2024 Peter Hutterer - 1.25.0-5 +- Mark datadir/libinput as owned by us (#2283754) + * Wed Mar 27 2024 Arthur Bols - 1.25.0-4 - Add quirk for Framework 16 to recognize keyboard as internal From 815d9fb80a6a70248c0ad1531626b3b2c1655de6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 6 Jun 2024 16:04:21 +1000 Subject: [PATCH 292/317] libinput 1.26.0 --- ...work-16-keyboard-modules-as-internal.patch | 27 ------------------- libinput.spec | 10 +++---- sources | 2 +- 3 files changed, 6 insertions(+), 33 deletions(-) delete mode 100644 0001-Recognizing-framework-16-keyboard-modules-as-internal.patch diff --git a/0001-Recognizing-framework-16-keyboard-modules-as-internal.patch b/0001-Recognizing-framework-16-keyboard-modules-as-internal.patch deleted file mode 100644 index f98bd34..0000000 --- a/0001-Recognizing-framework-16-keyboard-modules-as-internal.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 566857bd98131009699c9ab6efc7af37afd43fd0 Mon Sep 17 00:00:00 2001 -From: Josip Medved -Date: Fri, 16 Feb 2024 23:48:43 -0800 -Subject: [PATCH] Recognizing Framework 16 keyboard modules as internal - keyboards - ---- - quirks/50-system-framework.quirks | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/quirks/50-system-framework.quirks b/quirks/50-system-framework.quirks -index d42fe370e..3f4408eca 100644 ---- a/quirks/50-system-framework.quirks -+++ b/quirks/50-system-framework.quirks -@@ -3,3 +3,9 @@ MatchName=PIXA3854:00 093A:0274 Touchpad - MatchUdevType=touchpad - MatchDMIModalias=dmi:*svnFramework:pnLaptop* - AttrEventCode=-BTN_RIGHT -+ -+[Framework Laptop 16 Keyboard Module] -+MatchName=Framework Laptop 16 Keyboard Module* -+MatchUdevType=keyboard -+MatchDMIModalias=dmi:*svnFramework:pnLaptop16* -+AttrKeyboardIntegration=internal --- -GitLab - diff --git a/libinput.spec b/libinput.spec index 97c3c96..0c50354 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.25.0 -Release: 5%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.26.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -19,9 +19,6 @@ Source2: commitid Source0: https://gitlab.freedesktop.org/libinput/libinput/-/archive/%{version}/libinput-%{version}.tar.bz2 %endif -# https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/974 -Patch0001: 0001-Recognizing-framework-16-keyboard-modules-as-internal.patch - BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -158,6 +155,9 @@ intended to be run by users. %changelog +* Thu Jun 06 2024 Peter Hutterer 1.26.0-1 +- libinput 1.26.0 + * Fri May 31 2024 Peter Hutterer - 1.25.0-5 - Mark datadir/libinput as owned by us (#2283754) diff --git a/sources b/sources index afcd41a..ea0117f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.25.0.tar.bz2) = b9dc3f3b5f34c82399dfb7ccb5f65d19a596c415f0198b39e3f360f5b87c42124a5355c8d9f6f42cc9ae2d4f9a90fe5da6260136fa83d278048392f93381a84b +SHA512 (libinput-1.26.0.tar.bz2) = 7cd6a46ff6f43eab4cc7558b77804005aa94d75b9b07b8d954c57b8521b2dfb182018043bebaf5f3ab7ec8b56fc7313cbd193b4670c065ccc51c719d518b7c98 From cc59a153ec8114e8536d33a3c83741718d11f9da Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 27 Jun 2024 13:19:12 +1000 Subject: [PATCH 293/317] libinput 1.26.1 --- libinput.spec | 7 ++++++- sources | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 0c50354..0695f54 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.26.0 +Version: 1.26.1 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -114,6 +114,7 @@ intended to be run by users. %files utils %{_libexecdir}/libinput/libinput-analyze +%{_libexecdir}/libinput/libinput-analyze-buttons %{_libexecdir}/libinput/libinput-analyze-per-slot-delta %{_libexecdir}/libinput/libinput-analyze-recording %{_libexecdir}/libinput/libinput-analyze-touch-down-state @@ -129,6 +130,7 @@ intended to be run by users. %{_libexecdir}/libinput/libinput-record %{_libexecdir}/libinput/libinput-replay %{_mandir}/man1/libinput-analyze.1* +%{_mandir}/man1/libinput-analyze-buttons.1* %{_mandir}/man1/libinput-analyze-per-slot-delta.1* %{_mandir}/man1/libinput-analyze-recording.1* %{_mandir}/man1/libinput-analyze-touch-down-state.1* @@ -155,6 +157,9 @@ intended to be run by users. %changelog +* Thu Jun 27 2024 Peter Hutterer - 1.26.1-1 +- libinput 1.26.1 + * Thu Jun 06 2024 Peter Hutterer 1.26.0-1 - libinput 1.26.0 diff --git a/sources b/sources index ea0117f..f1d177e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.26.0.tar.bz2) = 7cd6a46ff6f43eab4cc7558b77804005aa94d75b9b07b8d954c57b8521b2dfb182018043bebaf5f3ab7ec8b56fc7313cbd193b4670c065ccc51c719d518b7c98 +SHA512 (libinput-1.26.1.tar.bz2) = d4611fc75ee6091f3139134f348db79d710560c27a936c7a8c0dc50657d6e1bdbdb1b44fb4c2c668a5b45934d91d3aef336d4096806807354472b25e298cdab6 From 11038cabe3d4769806a4ff7ad5b5804fd1aef66e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 14:09:53 +0000 Subject: [PATCH 294/317] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 0695f54..8e80375 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.26.1 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -157,6 +157,9 @@ intended to be run by users. %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 1.26.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Jun 27 2024 Peter Hutterer - 1.26.1-1 - libinput 1.26.1 From aadcd7507d2f53fde62eb0395969df9fea6d5a67 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 19 Aug 2024 10:14:38 +1000 Subject: [PATCH 295/317] libinput 1.26.2 --- libinput.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libinput.spec b/libinput.spec index 8e80375..c1b293d 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.26.1 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.26.2 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -157,6 +157,9 @@ intended to be run by users. %changelog +* Mon Aug 19 2024 Peter Hutterer - 1.26.2-1 +- libinput 1.26.2 + * Thu Jul 18 2024 Fedora Release Engineering - 1.26.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index f1d177e..e4e44bb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.26.1.tar.bz2) = d4611fc75ee6091f3139134f348db79d710560c27a936c7a8c0dc50657d6e1bdbdb1b44fb4c2c668a5b45934d91d3aef336d4096806807354472b25e298cdab6 +SHA512 (libinput-1.26.2.tar.bz2) = 51fab62e1bfb6007287e1219bf458a351806ce685e6e7ba5360062c863f0811da75acc6ec92aef7f9e0556dac0413fbe43a4744885f7449e38036130112907a6 From a03c423de4a50646de5c3f756ab9b51718945533 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 19 Nov 2024 14:40:02 +1000 Subject: [PATCH 296/317] libinput 1.27.0 drop the check-devel dependency, no longer needed libinput 1.27.0 drop the check-devel dependency, no longer needed libinput 1.27.0 drop the check-devel dependency, no longer needed libinput 1.27.0 drop the check-devel dependency, no longer needed --- libinput.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index c1b293d..84bae06 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.26.2 +Version: 1.27.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -28,7 +28,6 @@ BuildRequires: pkgconfig(libevdev) >= 0.4 BuildRequires: pkgconfig(libwacom) >= 0.20 BuildRequires: pkgconfig(udev) BuildRequires: python3-rpm-macros -BuildRequires: check-devel %description libinput is a library that handles input devices for display servers and other @@ -157,6 +156,10 @@ intended to be run by users. %changelog +* Tue Nov 19 2024 Peter Hutterer - 1.27.0-1 +- libinput 1.27.0 +- drop the check-devel dependency, no longer needed + * Mon Aug 19 2024 Peter Hutterer - 1.26.2-1 - libinput 1.26.2 From 225720c01fd88e9935b8511e8617e6b8638a003b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 22 Nov 2024 16:03:08 +1000 Subject: [PATCH 297/317] libinput 1.27.0, with sources libinput 1.27.0, with sources libinput 1.27.0, with sources libinput 1.27.0, with sources --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 84bae06..8cfd767 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.27.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -156,6 +156,9 @@ intended to be run by users. %changelog +* Fri Nov 22 2024 Peter Hutterer - 1.27.0-2 +- libinput 1.27.0, with sources + * Tue Nov 19 2024 Peter Hutterer - 1.27.0-1 - libinput 1.27.0 - drop the check-devel dependency, no longer needed diff --git a/sources b/sources index e4e44bb..acaa1f8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.26.2.tar.bz2) = 51fab62e1bfb6007287e1219bf458a351806ce685e6e7ba5360062c863f0811da75acc6ec92aef7f9e0556dac0413fbe43a4744885f7449e38036130112907a6 +SHA512 (libinput-1.27.0.tar.bz2) = ddfb4a16cbd40f8e55a536f8e18e77bb26113690bd4188d2e6ea04c1a906d8392d4df340d4e24f20c5152b3ef7d727702229a86fc27ad50c5ea9a85a58d3e24a From fb85b1c89c65e20da087b7ac16532494b306085b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 6 Jan 2025 15:12:47 +1000 Subject: [PATCH 298/317] libinput 1.27.1 --- libinput.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libinput.spec b/libinput.spec index 8cfd767..185d9aa 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.27.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.27.1 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -156,6 +156,9 @@ intended to be run by users. %changelog +* Mon Jan 06 2025 Peter Hutterer - 1.27.1-1 +- libinput 1.27.1 + * Fri Nov 22 2024 Peter Hutterer - 1.27.0-2 - libinput 1.27.0, with sources diff --git a/sources b/sources index acaa1f8..b95a138 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.27.0.tar.bz2) = ddfb4a16cbd40f8e55a536f8e18e77bb26113690bd4188d2e6ea04c1a906d8392d4df340d4e24f20c5152b3ef7d727702229a86fc27ad50c5ea9a85a58d3e24a +SHA512 (libinput-1.27.1.tar.bz2) = c8312000d7ce8c6f209b233177358c53dc830769cf2a80bd23ceebb408a0371de668846a5d1321b6ef803b3c17af5c0aba941ce5a2dc1fac6a0d5d791a13088b From fb6760cd6c0a3de3dca0046a8413b372d7a0af6d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 11:34:21 +0000 Subject: [PATCH 299/317] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 185d9aa..6976ea0 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.27.1 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -156,6 +156,9 @@ intended to be run by users. %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 1.27.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Mon Jan 06 2025 Peter Hutterer - 1.27.1-1 - libinput 1.27.1 From 21d9865a917208e2d8e6e70cc5f00f24c4766463 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 24 Mar 2025 14:45:13 +1000 Subject: [PATCH 300/317] libinput 1.28.0 --- libinput.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libinput.spec b/libinput.spec index 6976ea0..3ff5adc 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.27.1 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.28.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -156,6 +156,9 @@ intended to be run by users. %changelog +* Mon Mar 24 2025 Peter Hutterer - 1.28.0-1 +- libinput 1.28.0 + * Fri Jan 17 2025 Fedora Release Engineering - 1.27.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index b95a138..1bd4f55 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.27.1.tar.bz2) = c8312000d7ce8c6f209b233177358c53dc830769cf2a80bd23ceebb408a0371de668846a5d1321b6ef803b3c17af5c0aba941ce5a2dc1fac6a0d5d791a13088b +SHA512 (libinput-1.28.0.tar.bz2) = 2665fbfbf47f8ef329e387841ff9542b6191925d2fb46a19be64ef0b2e274db3b9ce8b42652ccdeb18c66e3a3c748ff576b313ecb8f7f6b4a01102bfb3e999e3 From 46fb06c0842380cc6bbc9849fd240b7d873df746 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 1 Apr 2025 12:56:30 +1000 Subject: [PATCH 301/317] libinput 1.28.1 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 3ff5adc..19e746f 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.28.0 +Version: 1.28.1 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -156,6 +156,9 @@ intended to be run by users. %changelog +* Tue Apr 01 2025 Peter Hutterer - 1.28.1-1 +- libinput 1.28.1 + * Mon Mar 24 2025 Peter Hutterer - 1.28.0-1 - libinput 1.28.0 diff --git a/sources b/sources index 1bd4f55..ed63a20 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.28.0.tar.bz2) = 2665fbfbf47f8ef329e387841ff9542b6191925d2fb46a19be64ef0b2e274db3b9ce8b42652ccdeb18c66e3a3c748ff576b313ecb8f7f6b4a01102bfb3e999e3 +SHA512 (libinput-1.28.1.tar.bz2) = 354a91f2239da5e5bbb12bb7473bd1fb7adf69e6243e8da786ace9e80eda6c8f733620b5f1e20411c732fcfa4dedf5ccd2e722a78693e564a24771e80f1c72aa From d06960eaa23474e41015d707b9b2546bb1db6af0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 10 Jul 2025 16:02:14 +1000 Subject: [PATCH 302/317] libinput 1.28.901 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 19e746f..9da7823 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.28.1 +Version: 1.28.901 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -156,6 +156,9 @@ intended to be run by users. %changelog +* Thu Jul 10 2025 Peter Hutterer - 1.28.901-1 +- libinput 1.28.901 + * Tue Apr 01 2025 Peter Hutterer - 1.28.1-1 - libinput 1.28.1 diff --git a/sources b/sources index ed63a20..38e9b8a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.28.1.tar.bz2) = 354a91f2239da5e5bbb12bb7473bd1fb7adf69e6243e8da786ace9e80eda6c8f733620b5f1e20411c732fcfa4dedf5ccd2e722a78693e564a24771e80f1c72aa +SHA512 (libinput-1.28.901.tar.bz2) = b314517a96bff9674256dd095b11559a9c5a005c6c213fef188e4afdd433d9a3fc6557c7b565342e13a0f93a90679fb4d694076616eabe8d13506cda068be487 From 31bbe71e25e2d88c8c6d6f1f225c74b012e3f372 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 15 Jul 2025 09:11:05 +1000 Subject: [PATCH 303/317] Fix broken mouse wheel on non-high-resolution devices (#2379768) --- ...ugin-to-emulate-high-resolution-whee.patch | 208 ++++++++++++++++++ libinput.spec | 7 +- 2 files changed, 214 insertions(+), 1 deletion(-) create mode 100644 0001-plugins-add-a-plugin-to-emulate-high-resolution-whee.patch diff --git a/0001-plugins-add-a-plugin-to-emulate-high-resolution-whee.patch b/0001-plugins-add-a-plugin-to-emulate-high-resolution-whee.patch new file mode 100644 index 0000000..7bd61e8 --- /dev/null +++ b/0001-plugins-add-a-plugin-to-emulate-high-resolution-whee.patch @@ -0,0 +1,208 @@ +From 5f44eebff87b13977f0eeca5356cf00228f285b6 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 14 Jul 2025 10:05:22 +1000 +Subject: [PATCH] plugins: add a plugin to emulate high-resolution wheel events + +Fixes a regression causing missing scroll events on devices where the +kernel only sets REL_WHEEL/REL_HWHEEL but not the corresponding +hires events. On those devices we would get the legacy axis events but +no longer the new ones. + +The mouse wheel plugin will correctly emulate missing hires events +but it doesn't attach to devices where the hires bit is never set. + +This plugin can be very simple - since we know we enabled the code on +this device we don't need to keep any extra state around. If our frame +handler is called for this device we want to add the hi-res events. + +Theoretically this breaks if the device has only one hi-res axis enabled +but not the other one (i.e. REL_WHEEL_HI_RES but only REL_HWHEEL) but +that's too theoretical to worry about. + +Closes #1156 + +Fixes: 31854a829a21 ("plugin: only register the wheel plugin on devices that have a wheel") +Signed-off-by: Peter Hutterer +--- + meson.build | 1 + + src/libinput-plugin-mouse-wheel-lowres.c | 97 ++++++++++++++++++++++++ + src/libinput-plugin-mouse-wheel-lowres.h | 30 ++++++++ + src/libinput-plugin.c | 2 + + 4 files changed, 130 insertions(+) + create mode 100644 src/libinput-plugin-mouse-wheel-lowres.c + create mode 100644 src/libinput-plugin-mouse-wheel-lowres.h + +diff --git a/meson.build b/meson.build +index e5932754bc9f..e51357885ae9 100644 +--- a/meson.build ++++ b/meson.build +@@ -384,6 +384,7 @@ src_libinput = src_libfilter + [ + 'src/libinput-plugin.c', + 'src/libinput-plugin-button-debounce.c', + 'src/libinput-plugin-mouse-wheel.c', ++ 'src/libinput-plugin-mouse-wheel-lowres.c', + 'src/libinput-plugin-tablet-double-tool.c', + 'src/libinput-plugin-tablet-eraser-button.c', + 'src/libinput-plugin-tablet-forced-tool.c', +diff --git a/src/libinput-plugin-mouse-wheel-lowres.c b/src/libinput-plugin-mouse-wheel-lowres.c +new file mode 100644 +index 000000000000..ce3847e2e002 +--- /dev/null ++++ b/src/libinput-plugin-mouse-wheel-lowres.c +@@ -0,0 +1,97 @@ ++/* ++ * Copyright © 2025 Red Hat, Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the next ++ * paragraph) shall be included in all copies or substantial portions of the ++ * Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ++ * DEALINGS IN THE SOFTWARE. ++ */ ++ ++#include "config.h" ++ ++#include ++ ++#include "evdev.h" ++#include "libinput-plugin-mouse-wheel-lowres.h" ++#include "libinput-plugin.h" ++#include "src/evdev-frame.h" ++ ++static void ++wheel_plugin_device_new(struct libinput_plugin *libinput_plugin, ++ struct libinput_device *device, ++ struct libevdev *libevdev, ++ struct udev_device *udev_device) ++{ ++ struct evdev_device *evdev = evdev_device(device); ++ ++ if (libevdev_has_event_code(libevdev, EV_REL, REL_WHEEL_HI_RES) || ++ libevdev_has_event_code(libevdev, EV_REL, REL_HWHEEL_HI_RES)) ++ return; ++ ++ if (libevdev_has_event_code(libevdev, EV_REL, REL_WHEEL) || ++ libevdev_has_event_code(libevdev, EV_REL, REL_HWHEEL)) ++ evdev_log_info(evdev, ++ "emulating high-resolution scroll wheel events.\n"); ++ ++ if (libevdev_has_event_code(libevdev, EV_REL, REL_WHEEL)) ++ libevdev_enable_event_code(libevdev, EV_REL, REL_WHEEL_HI_RES, NULL); ++ ++ if (libevdev_has_event_code(libevdev, EV_REL, REL_HWHEEL)) ++ libevdev_enable_event_code(libevdev, EV_REL, REL_HWHEEL_HI_RES, NULL); ++ ++ libinput_plugin_enable_device_event_frame(libinput_plugin, device, true); ++} ++ ++static void ++wheel_plugin_evdev_frame(struct libinput_plugin *libinput_plugin, ++ struct libinput_device *device, ++ struct evdev_frame *frame) ++{ ++ size_t nevents; ++ struct evdev_event *events = evdev_frame_get_events(frame, &nevents); ++ ++ for (size_t i = 0; i < nevents; i++) { ++ struct evdev_event *e = &events[i]; ++ switch (evdev_usage_enum(e->usage)) { ++ case EVDEV_REL_WHEEL: ++ evdev_frame_append_one(frame, ++ evdev_usage_from(EVDEV_REL_WHEEL_HI_RES), ++ e->value * 120); ++ break; ++ case EVDEV_REL_HWHEEL: ++ evdev_frame_append_one( ++ frame, ++ evdev_usage_from(EVDEV_REL_HWHEEL_HI_RES), ++ e->value * 120); ++ break; ++ default: ++ break; ++ } ++ } ++} ++ ++static const struct libinput_plugin_interface interface = { ++ .device_new = wheel_plugin_device_new, ++ .evdev_frame = wheel_plugin_evdev_frame, ++}; ++ ++void ++libinput_mouse_plugin_wheel_lowres(struct libinput *libinput) ++{ ++ _unref_(libinput_plugin) *p = ++ libinput_plugin_new(libinput, "mouse-wheel-lowres", &interface, NULL); ++} +diff --git a/src/libinput-plugin-mouse-wheel-lowres.h b/src/libinput-plugin-mouse-wheel-lowres.h +new file mode 100644 +index 000000000000..9fee3ec3cb1c +--- /dev/null ++++ b/src/libinput-plugin-mouse-wheel-lowres.h +@@ -0,0 +1,30 @@ ++/* ++ * Copyright © 2025 Red Hat, Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the next ++ * paragraph) shall be included in all copies or substantial portions of the ++ * Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ++ * DEALINGS IN THE SOFTWARE. ++ */ ++ ++#include "config.h" ++ ++#include "libinput-plugin.h" ++#include "libinput.h" ++ ++void ++libinput_mouse_plugin_wheel_lowres(struct libinput *libinput); +diff --git a/src/libinput-plugin.c b/src/libinput-plugin.c +index c14ae33751d4..6e0f068cd45c 100644 +--- a/src/libinput-plugin.c ++++ b/src/libinput-plugin.c +@@ -30,6 +30,7 @@ + + #include "evdev-plugin.h" + #include "libinput-plugin-button-debounce.h" ++#include "libinput-plugin-mouse-wheel-lowres.h" + #include "libinput-plugin-mouse-wheel.h" + #include "libinput-plugin-mtdev.h" + #include "libinput-plugin-private.h" +@@ -390,6 +391,7 @@ libinput_plugin_system_load_internal_plugins(struct libinput *libinput, + libinput_tablet_plugin_proximity_timer(libinput); + libinput_tablet_plugin_eraser_button(libinput); + libinput_debounce_plugin(libinput); ++ libinput_mouse_plugin_wheel_lowres(libinput); + libinput_mouse_plugin_wheel(libinput); + + /* Our own event dispatch is implemented as mini-plugin, +-- +2.50.0 + diff --git a/libinput.spec b/libinput.spec index 9da7823..a8b3dd2 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.28.901 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -19,6 +19,8 @@ Source2: commitid Source0: https://gitlab.freedesktop.org/libinput/libinput/-/archive/%{version}/libinput-%{version}.tar.bz2 %endif +Patch0001: 0001-plugins-add-a-plugin-to-emulate-high-resolution-whee.patch + BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -156,6 +158,9 @@ intended to be run by users. %changelog +* Tue Jul 15 2025 Peter Hutterer - 1.28.901-2 +- Fix broken mouse wheel on non-high-resolution devices (#2379768) + * Thu Jul 10 2025 Peter Hutterer - 1.28.901-1 - libinput 1.28.901 From 879df748c4a6500296582ad46962d1f9dce9e97e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 16 Jul 2025 09:50:40 +1000 Subject: [PATCH 304/317] Fix Alt+PrintScreen not working (#2379912) --- ...SYSRQ-frames-and-pass-them-even-as-r.patch | 152 ++++++++++++++++++ libinput.spec | 6 +- 2 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 0002-evdev-track-KEY_SYSRQ-frames-and-pass-them-even-as-r.patch diff --git a/0002-evdev-track-KEY_SYSRQ-frames-and-pass-them-even-as-r.patch b/0002-evdev-track-KEY_SYSRQ-frames-and-pass-them-even-as-r.patch new file mode 100644 index 0000000..6a4d875 --- /dev/null +++ b/0002-evdev-track-KEY_SYSRQ-frames-and-pass-them-even-as-r.patch @@ -0,0 +1,152 @@ +From 25f40a788d6c2fdefb373761e318abb29c5c6f60 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 15 Jul 2025 21:29:43 +1000 +Subject: [PATCH] evdev: track KEY_SYSRQ frames and pass them even as repeat + frames + +Alt+Printscreen aka KEY_LEFTALT + KEY_SYSRQ is emulated by the kernel +and always posted with SYN_REPORT 1, see +drivers/tty/sysrq.c:sysrq_reinject_alt_sysrq() + +The actual sequence when pressing Alt + Printscreen is to release Alt +first, then press it again: +- evdev: + - [ 10, 674010, 1, 56, 0] # EV_KEY / KEY_LEFTALT 0 + - [ 10, 674010, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +2861ms + - evdev: + - [ 10, 674030, 1, 56, 1] # EV_KEY / KEY_LEFTALT 1 + - [ 10, 674030, 1, 99, 1] # EV_KEY / KEY_SYSRQ 1 + - [ 10, 674030, 0, 0, 1] # ------------ SYN_REPORT (1) ---------- +0ms + - evdev: + - [ 10, 674031, 1, 99, 0] # EV_KEY / KEY_SYSRQ 0 + - [ 10, 674031, 1, 56, 0] # EV_KEY / KEY_LEFTALT 0 + - [ 10, 674031, 0, 0, 1] # ------------ SYN_REPORT (1) ---------- +0ms + +Handle that special case so we get our printscreen key to work as +expected anymore. + +Fixes: 9a9466b6a92c ("evdev: discard any frame with EV_SYN SYN_REPORT 1") +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 13 +++++++++- + test/test-keyboard.c | 57 ++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 69 insertions(+), 1 deletion(-) + +diff --git a/src/evdev.c b/src/evdev.c +index 5e52f4fc69e2..d0ef1c252fb3 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1043,6 +1043,7 @@ evdev_device_dispatch(void *data) + struct input_event ev; + int rc; + bool once = false; ++ bool had_sysrq = false; + _unref_(evdev_frame) *frame = evdev_frame_new(64); + + /* If the compositor is repainting, this function is called only once +@@ -1083,17 +1084,27 @@ evdev_device_dispatch(void *data) + device, + "event frame overflow, discarding events.\n"); + } ++ /* Alt+Printscreen is always a repeat frame, see ++ * drivers/tty/sysrq.c:sysrq_reinject_alt_sysrq() in the ++ * kernel ++ */ ++ if (ev.type == EV_KEY && ev.code == KEY_SYSRQ) ++ had_sysrq = true; ++ + if (ev.type == EV_SYN && ev.code == SYN_REPORT) { + /* A SYN_REPORT 1 event is a kernel-inserted + * auto-repeat. Nothing in libinput cares about kernel + * repeats and the inserted frame causes issues with + * timestamp deltas (see e.g. #1145) ++ * ++ * (well, except Alt+Printscreen (KEY_SYSRQ)) + */ +- if (ev.value != 1) ++ if (ev.value != 1 || had_sysrq) + evdev_device_dispatch_frame(libinput, + device, + frame); + evdev_frame_reset(frame); ++ had_sysrq = false; + } + } else if (rc == -ENODEV) { + evdev_device_remove(device); +diff --git a/test/test-keyboard.c b/test/test-keyboard.c +index 4e1baf7f0d41..380727b25f40 100644 +--- a/test/test-keyboard.c ++++ b/test/test-keyboard.c +@@ -468,6 +468,61 @@ START_TEST(keyboard_no_scroll) + } + END_TEST + ++START_TEST(keyboard_alt_printscreen) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput *li = dev->libinput; ++ ++ litest_drain_events(li); ++ ++ /* repeat frame, ignored */ ++ litest_event(dev, EV_KEY, KEY_A, 1); ++ litest_event(dev, EV_SYN, SYN_REPORT, 1); ++ litest_dispatch(li); ++ litest_assert_empty_queue(li); ++ ++ /* not a repeat frame */ ++ litest_event(dev, EV_KEY, KEY_LEFTALT, 1); ++ litest_event(dev, EV_SYN, SYN_REPORT, 0); ++ litest_dispatch(li); ++ litest_assert_key_event(li, KEY_LEFTALT, LIBINPUT_KEY_STATE_PRESSED); ++ ++ /* normal repeat frame, ignored */ ++ litest_event(dev, EV_KEY, KEY_LEFTALT, 2); ++ litest_event(dev, EV_SYN, SYN_REPORT, 1); ++ litest_dispatch(li); ++ litest_assert_empty_queue(li); ++ ++ /* not repeat frame */ ++ litest_event(dev, EV_KEY, KEY_LEFTALT, 0); ++ litest_event(dev, EV_SYN, SYN_REPORT, 0); ++ litest_dispatch(li); ++ litest_assert_key_event(li, KEY_LEFTALT, LIBINPUT_KEY_STATE_RELEASED); ++ ++ /* special alt+printscreen repeat frame, *not* ignored */ ++ litest_event(dev, EV_KEY, KEY_LEFTALT, 1); ++ litest_event(dev, EV_KEY, KEY_SYSRQ, 1); ++ litest_event(dev, EV_SYN, SYN_REPORT, 1); ++ litest_dispatch(li); ++ ++ /* special alt+printscreen repeat frame, *not* ignored */ ++ litest_event(dev, EV_KEY, KEY_LEFTALT, 0); ++ litest_event(dev, EV_KEY, KEY_SYSRQ, 0); ++ litest_event(dev, EV_SYN, SYN_REPORT, 1); ++ litest_dispatch(li); ++ ++ /* Note: the kernel doesn't release the key combo until both keys are released ++ * and the order is reshuffled so we have alt down, sysrq down, sysrq up, alt up ++ */ ++ litest_assert_key_event(li, KEY_LEFTALT, LIBINPUT_KEY_STATE_PRESSED); ++ litest_assert_key_event(li, KEY_SYSRQ, LIBINPUT_KEY_STATE_PRESSED); ++ litest_assert_key_event(li, KEY_SYSRQ, LIBINPUT_KEY_STATE_RELEASED); ++ litest_assert_key_event(li, KEY_LEFTALT, LIBINPUT_KEY_STATE_RELEASED); ++ ++ litest_assert_empty_queue(li); ++} ++END_TEST ++ + TEST_COLLECTION(keyboard) + { + /* clang-format off */ +@@ -484,5 +539,7 @@ TEST_COLLECTION(keyboard) + litest_add(keyboard_leds, LITEST_ANY, LITEST_ANY); + + litest_add(keyboard_no_scroll, LITEST_KEYS, LITEST_WHEEL); ++ ++ litest_add_for_device(keyboard_alt_printscreen, LITEST_KEYBOARD); + /* clang-format on */ + } +-- +2.50.1 + diff --git a/libinput.spec b/libinput.spec index a8b3dd2..a9f0162 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.28.901 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -20,6 +20,7 @@ Source0: https://gitlab.freedesktop.org/libinput/libinput/-/archive/%{ver %endif Patch0001: 0001-plugins-add-a-plugin-to-emulate-high-resolution-whee.patch +Patch0002: 0002-evdev-track-KEY_SYSRQ-frames-and-pass-them-even-as-r.patch BuildRequires: git-core BuildRequires: gcc @@ -158,6 +159,9 @@ intended to be run by users. %changelog +* Wed Jul 16 2025 Peter Hutterer - 1.28.901-3 +- Fix Alt+PrintScreen not working (#2379912) + * Tue Jul 15 2025 Peter Hutterer - 1.28.901-2 - Fix broken mouse wheel on non-high-resolution devices (#2379768) From 86954d38cdd8a36b033aafa68ebe00e0ed7d8d40 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 17 Jul 2025 13:09:24 +1000 Subject: [PATCH 305/317] libinput 1.28.902 --- ...ugin-to-emulate-high-resolution-whee.patch | 208 ------------------ ...SYSRQ-frames-and-pass-them-even-as-r.patch | 152 ------------- libinput.spec | 10 +- sources | 2 +- 4 files changed, 6 insertions(+), 366 deletions(-) delete mode 100644 0001-plugins-add-a-plugin-to-emulate-high-resolution-whee.patch delete mode 100644 0002-evdev-track-KEY_SYSRQ-frames-and-pass-them-even-as-r.patch diff --git a/0001-plugins-add-a-plugin-to-emulate-high-resolution-whee.patch b/0001-plugins-add-a-plugin-to-emulate-high-resolution-whee.patch deleted file mode 100644 index 7bd61e8..0000000 --- a/0001-plugins-add-a-plugin-to-emulate-high-resolution-whee.patch +++ /dev/null @@ -1,208 +0,0 @@ -From 5f44eebff87b13977f0eeca5356cf00228f285b6 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 14 Jul 2025 10:05:22 +1000 -Subject: [PATCH] plugins: add a plugin to emulate high-resolution wheel events - -Fixes a regression causing missing scroll events on devices where the -kernel only sets REL_WHEEL/REL_HWHEEL but not the corresponding -hires events. On those devices we would get the legacy axis events but -no longer the new ones. - -The mouse wheel plugin will correctly emulate missing hires events -but it doesn't attach to devices where the hires bit is never set. - -This plugin can be very simple - since we know we enabled the code on -this device we don't need to keep any extra state around. If our frame -handler is called for this device we want to add the hi-res events. - -Theoretically this breaks if the device has only one hi-res axis enabled -but not the other one (i.e. REL_WHEEL_HI_RES but only REL_HWHEEL) but -that's too theoretical to worry about. - -Closes #1156 - -Fixes: 31854a829a21 ("plugin: only register the wheel plugin on devices that have a wheel") -Signed-off-by: Peter Hutterer ---- - meson.build | 1 + - src/libinput-plugin-mouse-wheel-lowres.c | 97 ++++++++++++++++++++++++ - src/libinput-plugin-mouse-wheel-lowres.h | 30 ++++++++ - src/libinput-plugin.c | 2 + - 4 files changed, 130 insertions(+) - create mode 100644 src/libinput-plugin-mouse-wheel-lowres.c - create mode 100644 src/libinput-plugin-mouse-wheel-lowres.h - -diff --git a/meson.build b/meson.build -index e5932754bc9f..e51357885ae9 100644 ---- a/meson.build -+++ b/meson.build -@@ -384,6 +384,7 @@ src_libinput = src_libfilter + [ - 'src/libinput-plugin.c', - 'src/libinput-plugin-button-debounce.c', - 'src/libinput-plugin-mouse-wheel.c', -+ 'src/libinput-plugin-mouse-wheel-lowres.c', - 'src/libinput-plugin-tablet-double-tool.c', - 'src/libinput-plugin-tablet-eraser-button.c', - 'src/libinput-plugin-tablet-forced-tool.c', -diff --git a/src/libinput-plugin-mouse-wheel-lowres.c b/src/libinput-plugin-mouse-wheel-lowres.c -new file mode 100644 -index 000000000000..ce3847e2e002 ---- /dev/null -+++ b/src/libinput-plugin-mouse-wheel-lowres.c -@@ -0,0 +1,97 @@ -+/* -+ * Copyright © 2025 Red Hat, Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the next -+ * paragraph) shall be included in all copies or substantial portions of the -+ * Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+ * DEALINGS IN THE SOFTWARE. -+ */ -+ -+#include "config.h" -+ -+#include -+ -+#include "evdev.h" -+#include "libinput-plugin-mouse-wheel-lowres.h" -+#include "libinput-plugin.h" -+#include "src/evdev-frame.h" -+ -+static void -+wheel_plugin_device_new(struct libinput_plugin *libinput_plugin, -+ struct libinput_device *device, -+ struct libevdev *libevdev, -+ struct udev_device *udev_device) -+{ -+ struct evdev_device *evdev = evdev_device(device); -+ -+ if (libevdev_has_event_code(libevdev, EV_REL, REL_WHEEL_HI_RES) || -+ libevdev_has_event_code(libevdev, EV_REL, REL_HWHEEL_HI_RES)) -+ return; -+ -+ if (libevdev_has_event_code(libevdev, EV_REL, REL_WHEEL) || -+ libevdev_has_event_code(libevdev, EV_REL, REL_HWHEEL)) -+ evdev_log_info(evdev, -+ "emulating high-resolution scroll wheel events.\n"); -+ -+ if (libevdev_has_event_code(libevdev, EV_REL, REL_WHEEL)) -+ libevdev_enable_event_code(libevdev, EV_REL, REL_WHEEL_HI_RES, NULL); -+ -+ if (libevdev_has_event_code(libevdev, EV_REL, REL_HWHEEL)) -+ libevdev_enable_event_code(libevdev, EV_REL, REL_HWHEEL_HI_RES, NULL); -+ -+ libinput_plugin_enable_device_event_frame(libinput_plugin, device, true); -+} -+ -+static void -+wheel_plugin_evdev_frame(struct libinput_plugin *libinput_plugin, -+ struct libinput_device *device, -+ struct evdev_frame *frame) -+{ -+ size_t nevents; -+ struct evdev_event *events = evdev_frame_get_events(frame, &nevents); -+ -+ for (size_t i = 0; i < nevents; i++) { -+ struct evdev_event *e = &events[i]; -+ switch (evdev_usage_enum(e->usage)) { -+ case EVDEV_REL_WHEEL: -+ evdev_frame_append_one(frame, -+ evdev_usage_from(EVDEV_REL_WHEEL_HI_RES), -+ e->value * 120); -+ break; -+ case EVDEV_REL_HWHEEL: -+ evdev_frame_append_one( -+ frame, -+ evdev_usage_from(EVDEV_REL_HWHEEL_HI_RES), -+ e->value * 120); -+ break; -+ default: -+ break; -+ } -+ } -+} -+ -+static const struct libinput_plugin_interface interface = { -+ .device_new = wheel_plugin_device_new, -+ .evdev_frame = wheel_plugin_evdev_frame, -+}; -+ -+void -+libinput_mouse_plugin_wheel_lowres(struct libinput *libinput) -+{ -+ _unref_(libinput_plugin) *p = -+ libinput_plugin_new(libinput, "mouse-wheel-lowres", &interface, NULL); -+} -diff --git a/src/libinput-plugin-mouse-wheel-lowres.h b/src/libinput-plugin-mouse-wheel-lowres.h -new file mode 100644 -index 000000000000..9fee3ec3cb1c ---- /dev/null -+++ b/src/libinput-plugin-mouse-wheel-lowres.h -@@ -0,0 +1,30 @@ -+/* -+ * Copyright © 2025 Red Hat, Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the next -+ * paragraph) shall be included in all copies or substantial portions of the -+ * Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+ * DEALINGS IN THE SOFTWARE. -+ */ -+ -+#include "config.h" -+ -+#include "libinput-plugin.h" -+#include "libinput.h" -+ -+void -+libinput_mouse_plugin_wheel_lowres(struct libinput *libinput); -diff --git a/src/libinput-plugin.c b/src/libinput-plugin.c -index c14ae33751d4..6e0f068cd45c 100644 ---- a/src/libinput-plugin.c -+++ b/src/libinput-plugin.c -@@ -30,6 +30,7 @@ - - #include "evdev-plugin.h" - #include "libinput-plugin-button-debounce.h" -+#include "libinput-plugin-mouse-wheel-lowres.h" - #include "libinput-plugin-mouse-wheel.h" - #include "libinput-plugin-mtdev.h" - #include "libinput-plugin-private.h" -@@ -390,6 +391,7 @@ libinput_plugin_system_load_internal_plugins(struct libinput *libinput, - libinput_tablet_plugin_proximity_timer(libinput); - libinput_tablet_plugin_eraser_button(libinput); - libinput_debounce_plugin(libinput); -+ libinput_mouse_plugin_wheel_lowres(libinput); - libinput_mouse_plugin_wheel(libinput); - - /* Our own event dispatch is implemented as mini-plugin, --- -2.50.0 - diff --git a/0002-evdev-track-KEY_SYSRQ-frames-and-pass-them-even-as-r.patch b/0002-evdev-track-KEY_SYSRQ-frames-and-pass-them-even-as-r.patch deleted file mode 100644 index 6a4d875..0000000 --- a/0002-evdev-track-KEY_SYSRQ-frames-and-pass-them-even-as-r.patch +++ /dev/null @@ -1,152 +0,0 @@ -From 25f40a788d6c2fdefb373761e318abb29c5c6f60 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 15 Jul 2025 21:29:43 +1000 -Subject: [PATCH] evdev: track KEY_SYSRQ frames and pass them even as repeat - frames - -Alt+Printscreen aka KEY_LEFTALT + KEY_SYSRQ is emulated by the kernel -and always posted with SYN_REPORT 1, see -drivers/tty/sysrq.c:sysrq_reinject_alt_sysrq() - -The actual sequence when pressing Alt + Printscreen is to release Alt -first, then press it again: -- evdev: - - [ 10, 674010, 1, 56, 0] # EV_KEY / KEY_LEFTALT 0 - - [ 10, 674010, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +2861ms - - evdev: - - [ 10, 674030, 1, 56, 1] # EV_KEY / KEY_LEFTALT 1 - - [ 10, 674030, 1, 99, 1] # EV_KEY / KEY_SYSRQ 1 - - [ 10, 674030, 0, 0, 1] # ------------ SYN_REPORT (1) ---------- +0ms - - evdev: - - [ 10, 674031, 1, 99, 0] # EV_KEY / KEY_SYSRQ 0 - - [ 10, 674031, 1, 56, 0] # EV_KEY / KEY_LEFTALT 0 - - [ 10, 674031, 0, 0, 1] # ------------ SYN_REPORT (1) ---------- +0ms - -Handle that special case so we get our printscreen key to work as -expected anymore. - -Fixes: 9a9466b6a92c ("evdev: discard any frame with EV_SYN SYN_REPORT 1") -Signed-off-by: Peter Hutterer ---- - src/evdev.c | 13 +++++++++- - test/test-keyboard.c | 57 ++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 69 insertions(+), 1 deletion(-) - -diff --git a/src/evdev.c b/src/evdev.c -index 5e52f4fc69e2..d0ef1c252fb3 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1043,6 +1043,7 @@ evdev_device_dispatch(void *data) - struct input_event ev; - int rc; - bool once = false; -+ bool had_sysrq = false; - _unref_(evdev_frame) *frame = evdev_frame_new(64); - - /* If the compositor is repainting, this function is called only once -@@ -1083,17 +1084,27 @@ evdev_device_dispatch(void *data) - device, - "event frame overflow, discarding events.\n"); - } -+ /* Alt+Printscreen is always a repeat frame, see -+ * drivers/tty/sysrq.c:sysrq_reinject_alt_sysrq() in the -+ * kernel -+ */ -+ if (ev.type == EV_KEY && ev.code == KEY_SYSRQ) -+ had_sysrq = true; -+ - if (ev.type == EV_SYN && ev.code == SYN_REPORT) { - /* A SYN_REPORT 1 event is a kernel-inserted - * auto-repeat. Nothing in libinput cares about kernel - * repeats and the inserted frame causes issues with - * timestamp deltas (see e.g. #1145) -+ * -+ * (well, except Alt+Printscreen (KEY_SYSRQ)) - */ -- if (ev.value != 1) -+ if (ev.value != 1 || had_sysrq) - evdev_device_dispatch_frame(libinput, - device, - frame); - evdev_frame_reset(frame); -+ had_sysrq = false; - } - } else if (rc == -ENODEV) { - evdev_device_remove(device); -diff --git a/test/test-keyboard.c b/test/test-keyboard.c -index 4e1baf7f0d41..380727b25f40 100644 ---- a/test/test-keyboard.c -+++ b/test/test-keyboard.c -@@ -468,6 +468,61 @@ START_TEST(keyboard_no_scroll) - } - END_TEST - -+START_TEST(keyboard_alt_printscreen) -+{ -+ struct litest_device *dev = litest_current_device(); -+ struct libinput *li = dev->libinput; -+ -+ litest_drain_events(li); -+ -+ /* repeat frame, ignored */ -+ litest_event(dev, EV_KEY, KEY_A, 1); -+ litest_event(dev, EV_SYN, SYN_REPORT, 1); -+ litest_dispatch(li); -+ litest_assert_empty_queue(li); -+ -+ /* not a repeat frame */ -+ litest_event(dev, EV_KEY, KEY_LEFTALT, 1); -+ litest_event(dev, EV_SYN, SYN_REPORT, 0); -+ litest_dispatch(li); -+ litest_assert_key_event(li, KEY_LEFTALT, LIBINPUT_KEY_STATE_PRESSED); -+ -+ /* normal repeat frame, ignored */ -+ litest_event(dev, EV_KEY, KEY_LEFTALT, 2); -+ litest_event(dev, EV_SYN, SYN_REPORT, 1); -+ litest_dispatch(li); -+ litest_assert_empty_queue(li); -+ -+ /* not repeat frame */ -+ litest_event(dev, EV_KEY, KEY_LEFTALT, 0); -+ litest_event(dev, EV_SYN, SYN_REPORT, 0); -+ litest_dispatch(li); -+ litest_assert_key_event(li, KEY_LEFTALT, LIBINPUT_KEY_STATE_RELEASED); -+ -+ /* special alt+printscreen repeat frame, *not* ignored */ -+ litest_event(dev, EV_KEY, KEY_LEFTALT, 1); -+ litest_event(dev, EV_KEY, KEY_SYSRQ, 1); -+ litest_event(dev, EV_SYN, SYN_REPORT, 1); -+ litest_dispatch(li); -+ -+ /* special alt+printscreen repeat frame, *not* ignored */ -+ litest_event(dev, EV_KEY, KEY_LEFTALT, 0); -+ litest_event(dev, EV_KEY, KEY_SYSRQ, 0); -+ litest_event(dev, EV_SYN, SYN_REPORT, 1); -+ litest_dispatch(li); -+ -+ /* Note: the kernel doesn't release the key combo until both keys are released -+ * and the order is reshuffled so we have alt down, sysrq down, sysrq up, alt up -+ */ -+ litest_assert_key_event(li, KEY_LEFTALT, LIBINPUT_KEY_STATE_PRESSED); -+ litest_assert_key_event(li, KEY_SYSRQ, LIBINPUT_KEY_STATE_PRESSED); -+ litest_assert_key_event(li, KEY_SYSRQ, LIBINPUT_KEY_STATE_RELEASED); -+ litest_assert_key_event(li, KEY_LEFTALT, LIBINPUT_KEY_STATE_RELEASED); -+ -+ litest_assert_empty_queue(li); -+} -+END_TEST -+ - TEST_COLLECTION(keyboard) - { - /* clang-format off */ -@@ -484,5 +539,7 @@ TEST_COLLECTION(keyboard) - litest_add(keyboard_leds, LITEST_ANY, LITEST_ANY); - - litest_add(keyboard_no_scroll, LITEST_KEYS, LITEST_WHEEL); -+ -+ litest_add_for_device(keyboard_alt_printscreen, LITEST_KEYBOARD); - /* clang-format on */ - } --- -2.50.1 - diff --git a/libinput.spec b/libinput.spec index a9f0162..2ea69aa 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.28.901 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.28.902 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -19,9 +19,6 @@ Source2: commitid Source0: https://gitlab.freedesktop.org/libinput/libinput/-/archive/%{version}/libinput-%{version}.tar.bz2 %endif -Patch0001: 0001-plugins-add-a-plugin-to-emulate-high-resolution-whee.patch -Patch0002: 0002-evdev-track-KEY_SYSRQ-frames-and-pass-them-even-as-r.patch - BuildRequires: git-core BuildRequires: gcc BuildRequires: meson @@ -159,6 +156,9 @@ intended to be run by users. %changelog +* Thu Jul 17 2025 Peter Hutterer - 1.28.902-1 +- libinput 1.28.902 + * Wed Jul 16 2025 Peter Hutterer - 1.28.901-3 - Fix Alt+PrintScreen not working (#2379912) diff --git a/sources b/sources index 38e9b8a..c9ddf47 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.28.901.tar.bz2) = b314517a96bff9674256dd095b11559a9c5a005c6c213fef188e4afdd433d9a3fc6557c7b565342e13a0f93a90679fb4d694076616eabe8d13506cda068be487 +SHA512 (libinput-1.28.902.tar.bz2) = ddf3da8ffd8f3c2b782fbfd06ecff9371831b8737100be857607912bcc9c7899236c2cbd1acd977786b768194eddefbab43402d2c23a6a30d3183cd9ccecaffa From 58e71a6895bd133fe2bdd04c926226c0631c677e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 21 Jul 2025 15:09:03 +1000 Subject: [PATCH 306/317] libinput 1.28.903 (#2382208) --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 2ea69aa..0739923 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.28.902 +Version: 1.28.903 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -156,6 +156,9 @@ intended to be run by users. %changelog +* Mon Jul 21 2025 Peter Hutterer - 1.28.903-1 +- libinput 1.28.903 (#2382208) + * Thu Jul 17 2025 Peter Hutterer - 1.28.902-1 - libinput 1.28.902 diff --git a/sources b/sources index c9ddf47..170d474 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.28.902.tar.bz2) = ddf3da8ffd8f3c2b782fbfd06ecff9371831b8737100be857607912bcc9c7899236c2cbd1acd977786b768194eddefbab43402d2c23a6a30d3183cd9ccecaffa +SHA512 (libinput-1.28.903.tar.bz2) = 189e98d85e825bb8c5c17a3be091ba5b541a63c84ad4963ae4db16954318d0396483d626693dc28472b81fd24a243656559ba6fb39a09dadbe035c78a0e11949 From de60b2a048b0fa16cb203781565e90080f647af7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 19:49:27 +0000 Subject: [PATCH 307/317] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- libinput.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libinput.spec b/libinput.spec index 0739923..c63f3e9 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.28.903 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -156,6 +156,9 @@ intended to be run by users. %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 1.28.903-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Jul 21 2025 Peter Hutterer - 1.28.903-1 - libinput 1.28.903 (#2382208) From 33f4f3ebd793b245becb3f60db5039f78291e0d5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 31 Jul 2025 18:35:20 +1000 Subject: [PATCH 308/317] libinput 1.29.0 --- libinput.spec | 9 +++++++-- sources | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libinput.spec b/libinput.spec index c63f3e9..c196816 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.28.903 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.29.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -118,6 +118,7 @@ intended to be run by users. %{_libexecdir}/libinput/libinput-analyze-recording %{_libexecdir}/libinput/libinput-analyze-touch-down-state %{_libexecdir}/libinput/libinput-debug-tablet +%{_libexecdir}/libinput/libinput-debug-tablet-pad %{_libexecdir}/libinput/libinput-list-kernel-devices %{_libexecdir}/libinput/libinput-measure %{_libexecdir}/libinput/libinput-measure-fuzz @@ -134,6 +135,7 @@ intended to be run by users. %{_mandir}/man1/libinput-analyze-recording.1* %{_mandir}/man1/libinput-analyze-touch-down-state.1* %{_mandir}/man1/libinput-debug-tablet.1* +%{_mandir}/man1/libinput-debug-tablet-pad.1* %{_mandir}/man1/libinput-list-kernel-devices.1* %{_mandir}/man1/libinput-measure.1* %{_mandir}/man1/libinput-measure-fuzz.1* @@ -156,6 +158,9 @@ intended to be run by users. %changelog +* Thu Jul 31 2025 Peter Hutterer - 1.29.0-1 +- libinput 1.29.0 + * Thu Jul 24 2025 Fedora Release Engineering - 1.28.903-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/sources b/sources index 170d474..7e71bd8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.28.903.tar.bz2) = 189e98d85e825bb8c5c17a3be091ba5b541a63c84ad4963ae4db16954318d0396483d626693dc28472b81fd24a243656559ba6fb39a09dadbe035c78a0e11949 +SHA512 (libinput-1.29.0.tar.bz2) = 22ce58d6d5e2a0550c788e487e6c27d31ee67b4d1c66c72339b348ebfb47a7d4d1b80e521a86e0fc4576273c3bb1e94b13f993b323f1c1a89788d2a0f68929cd From 5abab2fe82abc22897a7650b686c720f4157523a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 28 Aug 2025 19:06:00 +1000 Subject: [PATCH 309/317] libinput 1.29.1 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index c196816..1ca07c6 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.29.0 +Version: 1.29.1 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -158,6 +158,9 @@ intended to be run by users. %changelog +* Thu Aug 28 2025 Peter Hutterer - 1.29.1-1 +- libinput 1.29.1 + * Thu Jul 31 2025 Peter Hutterer - 1.29.0-1 - libinput 1.29.0 diff --git a/sources b/sources index 7e71bd8..04888cb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.29.0.tar.bz2) = 22ce58d6d5e2a0550c788e487e6c27d31ee67b4d1c66c72339b348ebfb47a7d4d1b80e521a86e0fc4576273c3bb1e94b13f993b323f1c1a89788d2a0f68929cd +SHA512 (libinput-1.29.1.tar.bz2) = 9e5f352c2279c1234fe952ae6ecd0a275a48a595cbea8e26de682ab278499cf31a36d720800b02fd0472b20e5479ae9880633e03b1240e63d50bb6e8a1d2baf2 From 50e19d0b61685feafe8e70576a912efa0cf90816 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 21 Oct 2025 15:03:26 +1000 Subject: [PATCH 310/317] libinput 1.29.2 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 1ca07c6..70f7748 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.29.1 +Version: 1.29.2 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -158,6 +158,9 @@ intended to be run by users. %changelog +* Tue Oct 21 2025 Peter Hutterer - 1.29.2-1 +- libinput 1.29.2 + * Thu Aug 28 2025 Peter Hutterer - 1.29.1-1 - libinput 1.29.1 diff --git a/sources b/sources index 04888cb..cd6aec5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.29.1.tar.bz2) = 9e5f352c2279c1234fe952ae6ecd0a275a48a595cbea8e26de682ab278499cf31a36d720800b02fd0472b20e5479ae9880633e03b1240e63d50bb6e8a1d2baf2 +SHA512 (libinput-1.29.2.tar.bz2) = fe57f4179f830844506fcf50231d43545dce9099617957abf771cca7b263aa8d65997dc8ade39d00bc865c851deb0468ba330d3be38754fb23923304dba3ae8f From 00ac2e045bd15dbaa166cabbee9517254beb2200 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 4 Nov 2025 16:11:26 +1000 Subject: [PATCH 311/317] libinput 1.29.901 - with plugin autoload enabled --- libinput.spec | 9 +++++++-- sources | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libinput.spec b/libinput.spec index 70f7748..c5d5482 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.29.2 +Version: 1.29.901 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -28,6 +28,7 @@ BuildRequires: pkgconfig(libevdev) >= 0.4 BuildRequires: pkgconfig(libwacom) >= 0.20 BuildRequires: pkgconfig(udev) BuildRequires: python3-rpm-macros +BuildRequires: luajit-devel %description libinput is a library that handles input devices for display servers and other @@ -73,7 +74,8 @@ intended to be run by users. -Ddocumentation=false \ -Dtests=true \ -Dinstall-tests=true \ - -Dudev-dir=%{udevdir} + -Dudev-dir=%{udevdir} \ + -Dautoload-plugins=true %meson_build %install @@ -158,6 +160,9 @@ intended to be run by users. %changelog +* Tue Nov 04 2025 Peter Hutterer - 1.29.901-1 +- libinput 1.29.901 - with plugin autoload enabled + * Tue Oct 21 2025 Peter Hutterer - 1.29.2-1 - libinput 1.29.2 diff --git a/sources b/sources index cd6aec5..b293145 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.29.2.tar.bz2) = fe57f4179f830844506fcf50231d43545dce9099617957abf771cca7b263aa8d65997dc8ade39d00bc865c851deb0468ba330d3be38754fb23923304dba3ae8f +SHA512 (libinput-1.29.901.tar.bz2) = 8046e613dfaa25be3106cc4aeaa81a4a0ccf6ac7f9e830047717c7ddb6458736a072e808031b86c1a1407f1088103c3729b0bc2e71000b9675a65af106c65ff4 From 38094a7cc41b6a28086877e32f1afc631fed1947 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 4 Nov 2025 16:27:25 +1000 Subject: [PATCH 312/317] Disable plugins on ppc64le - there's no luajit --- libinput.spec | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/libinput.spec b/libinput.spec index c5d5482..0ca2215 100644 --- a/libinput.spec +++ b/libinput.spec @@ -1,11 +1,17 @@ %global udevdir %(pkg-config --variable=udevdir udev) +%if "%{_arch}" == "ppc64le" +%bcond_with plugins +%else +%bcond_without plugins +%endif + #global gitdate 20141211 %global gitversion 58abea394 Name: libinput Version: 1.29.901 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -28,7 +34,10 @@ BuildRequires: pkgconfig(libevdev) >= 0.4 BuildRequires: pkgconfig(libwacom) >= 0.20 BuildRequires: pkgconfig(udev) BuildRequires: python3-rpm-macros + +%if %{with plugins} BuildRequires: luajit-devel +%endif %description libinput is a library that handles input devices for display servers and other @@ -74,8 +83,12 @@ intended to be run by users. -Ddocumentation=false \ -Dtests=true \ -Dinstall-tests=true \ - -Dudev-dir=%{udevdir} \ - -Dautoload-plugins=true +%if %{with plugins} + -Dautoload-plugins=true \ +%else + -Dlua-plugins=disabled \ +%endif + -Dudev-dir=%{udevdir} %meson_build %install @@ -160,6 +173,9 @@ intended to be run by users. %changelog +* Tue Nov 04 2025 Peter Hutterer - 1.29.901-2 +- Disable plugins on ppc64le - there's no luajit + * Tue Nov 04 2025 Peter Hutterer - 1.29.901-1 - libinput 1.29.901 - with plugin autoload enabled From 140995a228c1afa2ffcd37562077b071bc22d12b Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 6 Nov 2025 19:07:17 -0500 Subject: [PATCH 313/317] Disable plugins on RHEL luajit is not already included, and we don't want to own it just for this. The code is only compatible with the 5.1 API, so the regular lua cannot be used either. --- libinput.spec | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libinput.spec b/libinput.spec index 0ca2215..1aee04a 100644 --- a/libinput.spec +++ b/libinput.spec @@ -1,9 +1,8 @@ %global udevdir %(pkg-config --variable=udevdir udev) -%if "%{_arch}" == "ppc64le" -%bcond_with plugins -%else -%bcond_without plugins +# Plugins require luajit or lua-5.1 +%if "%{_arch}" != "ppc64le" +%bcond plugins %{undefined rhel} %endif #global gitdate 20141211 @@ -11,7 +10,7 @@ Name: libinput Version: 1.29.901 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -173,6 +172,9 @@ intended to be run by users. %changelog +* Fri Nov 07 2025 Yaakov Selkowitz - 1.29.901-3 +- Disable plugins on RHEL + * Tue Nov 04 2025 Peter Hutterer - 1.29.901-2 - Disable plugins on ppc64le - there's no luajit From 002d51d3785e62c78e046b15906bbd7a5f28ed77 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 18 Nov 2025 14:02:27 +1000 Subject: [PATCH 314/317] libinput 1.29.902 - reenable ppc64le --- libinput.spec | 12 ++++++------ sources | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libinput.spec b/libinput.spec index 1aee04a..781950b 100644 --- a/libinput.spec +++ b/libinput.spec @@ -1,16 +1,13 @@ %global udevdir %(pkg-config --variable=udevdir udev) -# Plugins require luajit or lua-5.1 -%if "%{_arch}" != "ppc64le" %bcond plugins %{undefined rhel} -%endif #global gitdate 20141211 %global gitversion 58abea394 Name: libinput -Version: 1.29.901 -Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.29.902 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -35,7 +32,7 @@ BuildRequires: pkgconfig(udev) BuildRequires: python3-rpm-macros %if %{with plugins} -BuildRequires: luajit-devel +BuildRequires: lua-devel %endif %description @@ -172,6 +169,9 @@ intended to be run by users. %changelog +* Tue Nov 18 2025 Peter Hutterer - 1.29.902-1 +- libinput 1.29.902 - reenable ppc64le + * Fri Nov 07 2025 Yaakov Selkowitz - 1.29.901-3 - Disable plugins on RHEL diff --git a/sources b/sources index b293145..c59b5f1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.29.901.tar.bz2) = 8046e613dfaa25be3106cc4aeaa81a4a0ccf6ac7f9e830047717c7ddb6458736a072e808031b86c1a1407f1088103c3729b0bc2e71000b9675a65af106c65ff4 +SHA512 (libinput-1.29.902.tar.bz2) = 292f86a6e43943859030cc84ba8e0371134ac0606e93f06c40ff87f700a601b0ce50a217d0234d43008d98aac3f277426647efbfb8a7efbf9de298a006abb1d9 From f74cdffeb434d6b06d632ba06cd52e0942389d04 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 24 Nov 2025 10:11:21 +1000 Subject: [PATCH 315/317] Re-enable plugins on RHEL - lua 5.4 is available --- libinput.spec | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/libinput.spec b/libinput.spec index 781950b..8309e84 100644 --- a/libinput.spec +++ b/libinput.spec @@ -1,13 +1,11 @@ %global udevdir %(pkg-config --variable=udevdir udev) -%bcond plugins %{undefined rhel} - #global gitdate 20141211 %global gitversion 58abea394 Name: libinput Version: 1.29.902 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -31,9 +29,7 @@ BuildRequires: pkgconfig(libwacom) >= 0.20 BuildRequires: pkgconfig(udev) BuildRequires: python3-rpm-macros -%if %{with plugins} BuildRequires: lua-devel -%endif %description libinput is a library that handles input devices for display servers and other @@ -79,11 +75,7 @@ intended to be run by users. -Ddocumentation=false \ -Dtests=true \ -Dinstall-tests=true \ -%if %{with plugins} -Dautoload-plugins=true \ -%else - -Dlua-plugins=disabled \ -%endif -Dudev-dir=%{udevdir} %meson_build @@ -169,6 +161,9 @@ intended to be run by users. %changelog +* Mon Nov 24 2025 Peter Hutterer - 1.29.902-2 +- Re-enable plugins on RHEL - lua 5.4 is available + * Tue Nov 18 2025 Peter Hutterer - 1.29.902-1 - libinput 1.29.902 - reenable ppc64le From fa48a970939c152b2e4abec022dab0ef81b3eed3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 25 Nov 2025 15:09:26 +1000 Subject: [PATCH 316/317] libinput 1.30.0 --- libinput.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libinput.spec b/libinput.spec index 8309e84..4161710 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,8 +4,8 @@ %global gitversion 58abea394 Name: libinput -Version: 1.29.902 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.30.0 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library # SPDX @@ -161,6 +161,9 @@ intended to be run by users. %changelog +* Tue Nov 25 2025 Peter Hutterer - 1.30.0-1 +- libinput 1.30.0 + * Mon Nov 24 2025 Peter Hutterer - 1.29.902-2 - Re-enable plugins on RHEL - lua 5.4 is available diff --git a/sources b/sources index c59b5f1..9c71d23 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.29.902.tar.bz2) = 292f86a6e43943859030cc84ba8e0371134ac0606e93f06c40ff87f700a601b0ce50a217d0234d43008d98aac3f277426647efbfb8a7efbf9de298a006abb1d9 +SHA512 (libinput-1.30.0.tar.bz2) = 3965b02254e89acf349ef077709da0b9e5837cd2867d07145a08bcdb0309355f5a25b80a06ecc2bb604c1055a4a571c80d933b0cc2a5bd5ae62d039d7db309b1 From d46f71c744060479bef47ba046f30f4cb70a3169 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 8 Dec 2025 12:49:08 +1000 Subject: [PATCH 317/317] libinput 1.30.1 --- libinput.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libinput.spec b/libinput.spec index 4161710..856e23e 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.30.0 +Version: 1.30.1 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -161,6 +161,9 @@ intended to be run by users. %changelog +* Mon Dec 08 2025 Peter Hutterer - 1.30.1-1 +- libinput 1.30.1 + * Tue Nov 25 2025 Peter Hutterer - 1.30.0-1 - libinput 1.30.0 diff --git a/sources b/sources index 9c71d23..b53b11e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.30.0.tar.bz2) = 3965b02254e89acf349ef077709da0b9e5837cd2867d07145a08bcdb0309355f5a25b80a06ecc2bb604c1055a4a571c80d933b0cc2a5bd5ae62d039d7db309b1 +SHA512 (libinput-1.30.1.tar.bz2) = 6d9bb5653dfeb0e30c64e92f8146a8908233162ef39f89114f619605b7f0de3f9e0f344412d91c809d3c1dc3d4b836a5709373a80191484db3c6d0a8f69c4f82