[PATCH 2/4] touchpad: Don't process fake touches if they are not dirty

Hans de Goede hdegoede at redhat.com
Fri Jul 18 02:06:37 PDT 2014


Don't process fake touches, e.g. re-adding the same position to the motion
history when they are not dirty. This could trigger for example on a button
press.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 src/evdev-mt-touchpad.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index a77686e..6f5ce26 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -408,10 +408,11 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time)
 			t->y = first->y;
 			if (!t->dirty)
 				t->dirty = first->dirty;
-		} else if (!t->dirty) {
-			continue;
 		}
 
+		if (!t->dirty)
+			continue;
+
 		tp_palm_detect(tp, t, time);
 
 		tp_motion_hysteresis(tp, t);
-- 
2.0.1



More information about the wayland-devel mailing list