diff --git a/.gitignore b/.gitignore index 9597fbc..21589a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /libinput-1.6.2.tar.xz +/libinput-1.6.3.tar.xz diff --git a/0001-touchpad-ignore-the-tap-motion-threshold-if-fingers-.patch b/0001-touchpad-ignore-the-tap-motion-threshold-if-fingers-.patch new file mode 100644 index 0000000..93d115f --- /dev/null +++ b/0001-touchpad-ignore-the-tap-motion-threshold-if-fingers-.patch @@ -0,0 +1,119 @@ +From 2f81e554e94c6b560ac2432a2f3e2db0f09364be Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 15 Jun 2017 14:13:26 +1000 +Subject: [PATCH libinput] touchpad: ignore the tap motion threshold if fingers + > slots + +Do so on the synaptics serial touchpads at least, they're known to cause +cursor jumps when the third finger is down. Not detecting a tap move means +three-finger taps get more reliable on these touchpads. + +This change affects gestures who now effectively have to wait for the tap +timeout to happen. It's a trade-off. + +https://bugs.freedesktop.org/show_bug.cgi?id=101435 + +Signed-off-by: Peter Hutterer +--- + src/evdev-mt-touchpad-tap.c | 12 ++++++++++ + test/test-touchpad-tap.c | 54 +++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 66 insertions(+) + +diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c +index 03d4c701..bc1b41e9 100644 +--- a/src/evdev-mt-touchpad-tap.c ++++ b/src/evdev-mt-touchpad-tap.c +@@ -730,6 +730,18 @@ tp_tap_exceeds_motion_threshold(struct tp_dispatch *tp, + tp_normalize_delta(tp, device_delta(t->point, + t->tap.initial)); + ++ /* if we have more fingers down than slots, we know that synaptics ++ * touchpads are likely to give us pointer jumps. ++ * This triggers the movement threshold, making three-finger taps ++ * less reliable (#101435) ++ */ ++ if (tp->device->model_flags & EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD && ++ (tp->nfingers_down > 2 || tp->old_nfingers_down > 2) && ++ (tp->nfingers_down > tp->num_slots || ++ tp->old_nfingers_down > tp->num_slots)) { ++ return false; ++ } ++ + return normalized_length(norm) > DEFAULT_TAP_MOVE_THRESHOLD; + } + +diff --git a/test/test-touchpad-tap.c b/test/test-touchpad-tap.c +index 7acd0bad..3777eda2 100644 +--- a/test/test-touchpad-tap.c ++++ b/test/test-touchpad-tap.c +@@ -1542,6 +1542,59 @@ START_TEST(touchpad_3fg_tap_btntool_inverted) + } + END_TEST + ++START_TEST(touchpad_3fg_tap_btntool_pointerjump) ++{ ++ struct litest_device *dev = litest_current_device(); ++ struct libinput *li = dev->libinput; ++ enum libinput_config_tap_button_map map = _i; /* ranged test */ ++ unsigned int button = 0; ++ ++ if (libevdev_get_abs_maximum(dev->evdev, ++ ABS_MT_SLOT) > 2) ++ return; ++ ++ litest_enable_tap(dev->libinput_device); ++ litest_set_tap_map(dev->libinput_device, map); ++ ++ switch (map) { ++ case LIBINPUT_CONFIG_TAP_MAP_LRM: ++ button = BTN_MIDDLE; ++ break; ++ case LIBINPUT_CONFIG_TAP_MAP_LMR: ++ button = BTN_RIGHT; ++ break; ++ default: ++ litest_abort_msg("Invalid map range %d", map); ++ } ++ ++ litest_drain_events(li); ++ ++ litest_touch_down(dev, 0, 50, 50); ++ litest_touch_down(dev, 1, 70, 50); ++ litest_event(dev, EV_KEY, BTN_TOOL_TRIPLETAP, 1); ++ litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 0); ++ litest_event(dev, EV_SYN, SYN_REPORT, 0); ++ /* Pointer jump should be ignored */ ++ litest_touch_move_to(dev, 0, 50, 50, 20, 20, 0, 0); ++ libinput_dispatch(li); ++ litest_event(dev, EV_KEY, BTN_TOOL_TRIPLETAP, 0); ++ litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 1); ++ litest_event(dev, EV_SYN, SYN_REPORT, 0); ++ litest_touch_up(dev, 1); ++ litest_touch_up(dev, 0); ++ ++ libinput_dispatch(li); ++ ++ litest_assert_button_event(li, button, ++ LIBINPUT_BUTTON_STATE_PRESSED); ++ litest_timeout_tap(); ++ litest_assert_button_event(li, button, ++ LIBINPUT_BUTTON_STATE_RELEASED); ++ ++ litest_assert_empty_queue(li); ++} ++END_TEST ++ + START_TEST(touchpad_4fg_tap) + { + struct litest_device *dev = litest_current_device(); +@@ -2152,6 +2205,7 @@ litest_setup_tests_touchpad_tap(void) + litest_add_ranged("tap-3fg:3fg", touchpad_3fg_tap_btntool_inverted, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &tap_map_range); + litest_add_ranged("tap-3fg:3fg", touchpad_3fg_tap, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &tap_map_range); + litest_add("tap-3fg:3fg", touchpad_3fg_tap_quickrelease, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); ++ litest_add_for_device("tap-3fg:3fg", touchpad_3fg_tap_btntool_pointerjump, LITEST_SYNAPTICS_TOPBUTTONPAD); + litest_add("tap-4fg:4fg", touchpad_4fg_tap, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_SEMI_MT); + litest_add("tap-4fg:4fg", touchpad_4fg_tap_quickrelease, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_SEMI_MT); + litest_add("tap-5fg:5fg", touchpad_5fg_tap, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_SEMI_MT); +-- +2.13.0 + 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..7dde217 --- /dev/null +++ b/0001-touchpad-pull-the-tap-exclusion-zone-down-to-the-ful.patch @@ -0,0 +1,45 @@ +From 81fe0347c92c67fb687c3d7cbd4c0eef0a33d90a 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 | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 116d1ba6..4c81da3b 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -540,15 +540,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) { +- log_debug(tp_libinput_context(tp), +- "palm: palm-tap detected\n"); +- return true; +- } ++ log_debug(tp_libinput_context(tp), "palm: palm-tap detected\n"); + +- return false; ++ return true; + } + + static bool +-- +2.12.2 + diff --git a/90-switch.hwdb b/90-switch.hwdb new file mode 100644 index 0000000..35543e9 --- /dev/null +++ b/90-switch.hwdb @@ -0,0 +1,4 @@ +# Simple entry for ID_INPUT_SWITCH +# Upstream in systemd 233 but not in F25 +libinput:name:*Lid Switch*:dmi:* + ID_INPUT_SWITCH=1 diff --git a/libinput.spec b/libinput.spec index 0fe37bd..18aac0d 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.3 +Release: 6%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -18,8 +18,12 @@ Source2: commitid Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz %endif +Source1: 90-switch.hwdb + Patch01: 0001-evdev-allow-button-scrolling-on-the-L-R-button-with-.patch Patch02: 0001-evdev-add-quirk-for-Logitech-Marble-Mouse.patch +Patch03: 0001-touchpad-pull-the-tap-exclusion-zone-down-to-the-ful.patch +Patch04: 0001-touchpad-ignore-the-tap-motion-threshold-if-fingers-.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -69,6 +73,8 @@ make %{?_smp_mflags} %make_install find $RPM_BUILD_ROOT -name '*.la' -delete +mkdir -p ${RPM_BUILD_ROOT}%{udevdir}/hwdb.d/ +install -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}%{udevdir}/hwdb.d/ %post /sbin/ldconfig @@ -85,6 +91,7 @@ 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 +%{udevdir}/hwdb.d/90-switch.hwdb %{_bindir}/libinput-list-devices %{_bindir}/libinput-debug-events %{_mandir}/man1/libinput-list-devices.1* @@ -97,6 +104,22 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Jun 26 2017 Peter Hutterer 1.6.3-6 +- Ignore tap motion for 3fg taps when we only have 2 slots (#1455443) + +* Mon May 22 2017 Peter Hutterer 1.6.3-5 +- Install a hwdb file to tag lid switches as such, this is missing from F25 + systemd. + +* Tue May 09 2017 Peter Hutterer 1.6.3-4 +- Ignore taps in the palm detection area even in software buttons (#1415796) + +* Thu Mar 09 2017 Peter Hutterer 1.6.3-1 +- libinput 1.6.3 + +* Tue Mar 07 2017 Peter Hutterer 1.6.2-3 +- Allow horiz. scrolling on smaller touchpads (#1422221) + * 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..b5de686 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.6.2.tar.xz) = f1e1436ec4259ebddf93a50fe4d39a52713efd246a39a072b44bf296a413bdadbb789d6a4f0107ed3eb37afe34a37a43c9e75dcf814462385011eff2d3f42db7 +SHA512 (libinput-1.6.3.tar.xz) = be1ab191b5605943d6f46a5fee7af9ecba83ab30ba3d38b6ec136980f2183f6dcb5aaf048aa81a096c4f51b6de05bebc83b4ffa29a0574752062a994f377aa5f