From 8ed156bd588dcece30c54855940449b2d4346280 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 14 Jul 2015 09:47:06 +1000 Subject: [PATCH] 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)