mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-28 14:30:12 +01:00
evdev: treat BTN_TOUCH as BTN_LEFT
idea stolen from xorg evdev. Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
This commit is contained in:
parent
faee80196f
commit
d904359949
1 changed files with 5 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue