From: Peter Hutterer Date: Fri, 12 Jun 2015 07:24:33 +0000 (+1000) Subject: touchpad: fix pinned finger drifting X-Git-Tag: 0.18.0~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b48ecd186d8fb707e89bf04036a48600dc49125f;p=platform%2Fupstream%2Flibinput.git 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 Reviewed-by: Hans de Goede --- diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index c82d7339..ce79530c 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