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