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:
committed by
Kristian Høgsberg
parent
faee80196f
commit
d904359949
+5
-1
@@ -48,7 +48,6 @@ evdev_process_key(struct evdev_input_device *device,
|
|||||||
struct input_event *e, int value, int time)
|
struct input_event *e, int value, int time)
|
||||||
{
|
{
|
||||||
switch (e->code) {
|
switch (e->code) {
|
||||||
case BTN_TOUCH:
|
|
||||||
case BTN_TOOL_PEN:
|
case BTN_TOOL_PEN:
|
||||||
case BTN_TOOL_RUBBER:
|
case BTN_TOOL_RUBBER:
|
||||||
case BTN_TOOL_BRUSH:
|
case BTN_TOOL_BRUSH:
|
||||||
@@ -65,6 +64,11 @@ evdev_process_key(struct evdev_input_device *device,
|
|||||||
}
|
}
|
||||||
break;
|
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_LEFT:
|
||||||
case BTN_RIGHT:
|
case BTN_RIGHT:
|
||||||
case BTN_MIDDLE:
|
case BTN_MIDDLE:
|
||||||
|
|||||||
Reference in New Issue
Block a user