touchpad: Route top softbuttons through the trackstick if we've one
authorHans de Goede <hdegoede@redhat.com>
Tue, 16 Sep 2014 14:22:39 +0000 (16:22 +0200)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 18 Sep 2014 22:20:00 +0000 (08:20 +1000)
commit8f20c07a1f0c465317f77d21304d7afaadb1b4a8
treea9df20f779d7fea5bd3283d2ccb32ef07d0afc05
parenta8ffc096bed1b9ebed7f2d870ddf5d743e2c83ee
touchpad: Route top softbuttons through the trackstick if we've one

The touchpad top softbuttons such as found on the Lenove T440 are intended for
use with the trackstick. Route their events through the trackstick, so that
they can be used for e.g. middle button scrolling with the trackstick.

Note that sending top button events to a disabled trackpoint makes no sense
(and will mess up internal state). Likely a user with a disabled trackpoint
will still expect the top buttons to work, so rather than not sending events
in that case, simply treat a suspendeded trackpoint as not being there, and
send the events directly from the touchpad device.

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>
doc/touchpad-softbutton-state-machine.svg
src/evdev-mt-touchpad-buttons.c
src/evdev-mt-touchpad.c
src/evdev-mt-touchpad.h