mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-01 15:10:08 +01:00
touchpad: Allow the center of pinned fingers to drift over time
Allow the center of pinned fingers to drift over time, to avoid accidentally unpinning fingers. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=86807 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
09d07d5634
commit
aee7ba8360
1 changed files with 5 additions and 0 deletions
|
|
@ -385,7 +385,12 @@ tp_unpin_finger(struct tp_dispatch *tp, struct tp_touch *t)
|
|||
tp->buttons.motion_dist * tp->buttons.motion_dist) {
|
||||
t->pinned.is_pinned = false;
|
||||
tp_set_pointer(tp, t);
|
||||
return;
|
||||
}
|
||||
|
||||
/* The finger may slowly drift, adjust the center */
|
||||
t->pinned.center_x = t->x + t->pinned.center_x / 2;
|
||||
t->pinned.center_y = t->y + t->pinned.center_y / 2;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue