From 728a38301f817657ff37d6b5f6e81e41f1779e51 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Thu, 1 Sep 2011 19:00:05 +0300 Subject: [PATCH] evdev: treat BTN_TOUCH as BTN_LEFT idea stolen from xorg evdev. Signed-off-by: Tiago Vignatti --- compositor/evdev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compositor/evdev.c b/compositor/evdev.c index 662a61c0..113eded9 100644 --- a/compositor/evdev.c +++ b/compositor/evdev.c @@ -48,7 +48,6 @@ evdev_process_key(struct evdev_input_device *device, struct input_event *e, int value, int time) { switch (e->code) { - case BTN_TOUCH: case BTN_TOOL_PEN: case BTN_TOOL_RUBBER: case BTN_TOOL_BRUSH: @@ -65,6 +64,11 @@ evdev_process_key(struct evdev_input_device *device, } break; + case BTN_TOUCH: + /* Treat BTN_TOUCH from devices that only have BTN_TOUCH as + * BTN_LEFT */ + e->code = BTN_LEFT; + /* Intentional fallthrough! */ case BTN_LEFT: case BTN_RIGHT: case BTN_MIDDLE: