From 1a3321079a81b0cf3979f43872f34e9c68dec97d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mar 07 2017 00:03:02 +0000 Subject: Allow horiz. scrolling on smaller touchpads (#1422221) --- diff --git a/0001-touchpad-reduce-minimum-height-for-horiz-edge-scroll.patch b/0001-touchpad-reduce-minimum-height-for-horiz-edge-scroll.patch new file mode 100644 index 0000000..866c686 --- /dev/null +++ b/0001-touchpad-reduce-minimum-height-for-horiz-edge-scroll.patch @@ -0,0 +1,58 @@ +From d6379bc3f3ee57a02b23f99b82a50aaa4cfe7b04 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 27 Feb 2017 11:02:06 +1000 +Subject: [PATCH libinput] touchpad: reduce minimum height for horiz edge + scrolling to 40mm + +Introduced in commit 8e7f99c27ab39 we only allowed horizontal edge scrolling +on devices larger than 50mm to leave enough reactive space on the touchpad. +Looking at a ruler, a 50mm high touchpad is still large enough to leave the +bottom 7mm as an horizontal edge scroll area. Reduce the minimum size to 40mm +instead, that's closer to where it starts to get a bit iffy. + +https://bugzilla.redhat.com/show_bug.cgi?id=1422221 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad-edge-scroll.c | 4 ++-- + test/test-touchpad.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c +index 7da44ae..9f6660c 100644 +--- a/src/evdev-mt-touchpad-edge-scroll.c ++++ b/src/evdev-mt-touchpad-edge-scroll.c +@@ -282,14 +282,14 @@ tp_edge_scroll_init(struct tp_dispatch *tp, struct evdev_device *device) + struct phys_coords mm = { 0.0, 0.0 }; + + evdev_device_get_size(device, &width, &height); +- /* Touchpads smaller than 50mm are not tall enough to have a ++ /* Touchpads smaller than 40mm are not tall enough to have a + horizontal scroll area, it takes too much space away. But + clickpads have enough space here anyway because of the + software button area (and all these tiny clickpads were built + when software buttons were a thing, e.g. Lenovo *20 series) + */ + if (!tp->buttons.is_clickpad) +- want_horiz_scroll = (height >= 50); ++ want_horiz_scroll = (height >= 40); + + /* 7mm edge size */ + mm.x = width - 7; +diff --git a/test/test-touchpad.c b/test/test-touchpad.c +index 4656443..29039b3 100644 +--- a/test/test-touchpad.c ++++ b/test/test-touchpad.c +@@ -462,7 +462,7 @@ touchpad_has_horiz_edge_scroll_size(struct litest_device *dev) + + rc = libinput_device_get_size(dev->libinput_device, &width, &height); + +- return rc == 0 && height >= 50; ++ return rc == 0 && height >= 40; + } + + START_TEST(touchpad_edge_scroll_horiz) +-- +2.9.3 + diff --git a/libinput.spec b/libinput.spec index 0fe37bd..6d0fc76 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.6.2 -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-allow-button-scrolling-on-the-L-R-button-with-.patch Patch02: 0001-evdev-add-quirk-for-Logitech-Marble-Mouse.patch +Patch03: 0001-touchpad-reduce-minimum-height-for-horiz-edge-scroll.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -97,6 +98,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* 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)