36 lines
1.2 KiB
Diff
36 lines
1.2 KiB
Diff
|
From 0d320c87c99e93b2feb1703f5bfd5d4fcc0a2857 Mon Sep 17 00:00:00 2001
|
||
|
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||
|
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 <peter.hutterer@who-t.net>
|
||
|
---
|
||
|
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
|
||
|
|