evdev: hook up left-handed configuration option
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 23 Sep 2014 03:48:06 +0000 (13:48 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 23 Sep 2014 06:00:06 +0000 (16:00 +1000)
commit3240b4287b4e7d3b4a8eddde402eb2ae5fe3bc3b
tree9ca9878624ab6fefd288fe8c059b2cf303e99049
parentcba92f9762a377120867061fe42d656d1295bc44
evdev: hook up left-handed configuration option

Two separate flags needed, want_left_handed and left_handed to avoid switching
to left_handed while a button is still down. Since each backend has a
different way of determining whether buttons are down, let them set a function
to do exactly that. Then call that function whenever a button release event is
posted to switch the device to right/left-handed if applicable.

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