libinput/0001-touchpad-fix-pinned-finger-drifting.patch

33 lines
1.1 KiB
Diff
Raw Normal View History

From b48ecd186d8fb707e89bf04036a48600dc49125f Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri, 12 Jun 2015 17:24:33 +1000
Subject: [PATCH libinput] touchpad: fix pinned finger drifting
This caused the finger to be unpinned on the first motion event after the
click, effectively disabling this feature.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
---
src/evdev-mt-touchpad.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index c82d733..ce79530 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -440,8 +440,8 @@ tp_unpin_finger(struct tp_dispatch *tp, struct tp_touch *t)
}
/* The finger may slowly drift, adjust the center */
- t->pinned.center.x = t->point.x + t->pinned.center.x / 2;
- t->pinned.center.y = t->point.y + t->pinned.center.y / 2;
+ t->pinned.center.x = (t->point.x + t->pinned.center.x)/2;
+ t->pinned.center.y = (t->point.y + t->pinned.center.y)/2;
}
static void
--
2.4.3