From 56004ba34bb9cdde1d95d36532be283d61bf86d7 Mon Sep 17 00:00:00 2001 From: Stephen Chandler Paul Date: Mon, 19 Jan 2015 20:54:45 -0500 Subject: [PATCH] evdev.c: Return from evdev_configure_device() after configuring a device as a tablet As it turns out upon detecting a tablet in evdev_configure_device(), there isn't any call to return to escape the function once we've finished configuring the tablet. As a result, the code continues running and ends up reconfiguring the device as a pointer, resulting in strange behavior such as left-handed mode being enabled by default. Signed-off-by: Stephen Chandler Paul Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer --- src/evdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/evdev.c b/src/evdev.c index 939d266c..defd0042 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1448,6 +1448,7 @@ evdev_configure_device(struct evdev_device *device) log_info(libinput, "input device '%s', %s is a tablet\n", device->devname, devnode); + return device->dispatch == NULL ? -1 : 0; } for (i = 0; i < KEY_MAX; i++) {