[PATCH libinput 1/4] touchpad: don't try to unhover touches if nothing changed
Peter Hutterer
peter.hutterer at who-t.net
Thu Jan 21 18:06:12 PST 2016
If the touch hasn't updated, the distance hasn't changed so there is no need
to unhover.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/evdev-mt-touchpad.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index 6f834fb..62087fb 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -743,6 +743,9 @@ tp_unhover_abs_distance(struct tp_dispatch *tp, uint64_t time)
for (i = 0; i < tp->ntouches; i++) {
t = tp_get_touch(tp, i);
+ if (!t->dirty)
+ continue;
+
if (t->state == TOUCH_HOVERING) {
if (t->distance == 0) {
/* avoid jumps when landing a finger */
--
2.5.0
More information about the wayland-devel
mailing list