touchpad: don't init edge palm detection on touchpads less than 8cm across
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 15 Jul 2014 04:01:00 +0000 (14:01 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Sun, 20 Jul 2014 22:56:12 +0000 (08:56 +1000)
commit858f0095653ce4b5f4a099bd2afbdcf616e5764a
tree2e23ea7b9b284963361dacb9f7d37523e8c7fa2f
parentb3c578521e7b53bb9fd0516344d9c24b24e519a1
touchpad: don't init edge palm detection on touchpads less than 8cm across

On small touchpads, a touch that intends to go across the width of the
touchpad is likely to start in the edge zone. Likewise, on those touchpads the
chances of a palm event happening on the edge is small.

A minimum width of 8cm determined by an elaborate process of completely
unscientific guesswork: the x220 is roughly 7.5cm across and doesn't suffer
much from edge events, the T440s is 10cm across and definitely suffers from
it. So the trigger width likely somewhere in between which makes 8cm about as
valid as any other guess.

Note that this disables palm detection for resolution-less touchpads too - if
we don't know how big the touchpad is we can't know if palm detection on the
edges is necessary.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
src/evdev-mt-touchpad.c
test/touchpad.c