From 60d9defdb7487637d08e485d4000d72ea916aba6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 4 Oct 2018 10:30:26 +1000 Subject: [PATCH] touchpad: don't calculate movement for an already-moved touch Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad-buttons.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c index 27a15805..ae58c154 100644 --- a/src/evdev-mt-touchpad-buttons.c +++ b/src/evdev-mt-touchpad-buttons.c @@ -464,6 +464,9 @@ tp_button_check_for_movement(struct tp_dispatch *tp, struct tp_touch *t) struct phys_coords mm; double vector_length; + if (t->button.has_moved) + return; + switch (t->button.state) { case BUTTON_STATE_NONE: case BUTTON_STATE_AREA: -- 2.34.1