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>
This commit is contained in:
Peter Hutterer 2015-06-12 17:24:33 +10:00
parent 65ce6b10ee
commit b48ecd186d

View file

@ -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