summaryrefslogtreecommitdiff
path: root/src/evdev-mt-touchpad.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-06-24 16:23:10 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2014-06-25 11:11:39 +1000
commitc0af1b57d4063f0894ade2ba2f57a149ad454f7f (patch)
tree74930062e2931b797a8219ad34291f8915da48e5 /src/evdev-mt-touchpad.h
parentc9a01969d8e5ad527fede479be0b032a46a4f18d (diff)
downloadlibinput-c0af1b57d4063f0894ade2ba2f57a149ad454f7f.tar.gz
touchpad: Avoid spurious motion event for scroll movement below threshold
If the user puts down to fingers to scroll, then changes his mind and lifts them, without having them moved past the initial scroll threshold in either direction, then any movement which he has done will cause a spurious scroll event when the second finger down is lifted first. The problem is that t->is_pointer was not being set to false in this case, since that is done in tp_post_twofinger_scroll after checking scroll.state which never gets set in this scenario. Instead of changing the order, simply completely remove scroll.state completely it is a boolean, and everywhere we check for it we also check for the axis bits in state.direction, so it is not necessary. Also add a check to ensure there are no spurious motion events. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/evdev-mt-touchpad.h')
-rw-r--r--src/evdev-mt-touchpad.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h
index 0b1457db..7afb3c46 100644
--- a/src/evdev-mt-touchpad.h
+++ b/src/evdev-mt-touchpad.h
@@ -72,11 +72,6 @@ enum button_state {
BUTTON_STATE_IGNORE,
};
-enum scroll_state {
- SCROLL_STATE_NONE,
- SCROLL_STATE_SCROLLING
-};
-
enum tp_tap_state {
TAP_STATE_IDLE = 4,
TAP_STATE_TOUCH,
@@ -192,7 +187,6 @@ struct tp_dispatch {
} buttons; /* physical buttons */
struct {
- enum scroll_state state;
enum libinput_pointer_axis direction;
} scroll;