touchpad: impose maximum distance limits on clickfingers
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 3 Jun 2015 02:15:51 +0000 (12:15 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 3 Jun 2015 04:43:58 +0000 (14:43 +1000)
commitdf83144457176e454953d2a580a8f28e73f4a677
treee562f9b73cfaed6f286fdd50a961381e18353713
parentb2a6ead9929f8cdf0778a942ffcfd6e75bc76294
touchpad: impose maximum distance limits on clickfingers

A common use-case for clickfinger is to use the index finger for moving the
pointer, then triggering the click with a thumb. If the index finger isn't
lifted before the click this counted as two-finger click.

To avoid this, check the distance between touches on the touchpad (on
touchpads reporting resolution values anyway). If the touches are too far
apart, don't count them together (or specifically only count those close
enough together as multi-finger).

The touch area is uneven, it's wider than high. Spreading fingers horizontally
is more common and this also makes it easier to rule out thumbs which tend to
be well below the fingers.

http://bugs.freedesktop.org/show_bug.cgi?id=90526

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
doc/clickpad-softbuttons.dox
doc/svg/clickfinger-distance.svg [new file with mode: 0644]
src/evdev-mt-touchpad-buttons.c
test/touchpad.c