Skip to contentSkip to conversation

HID: wacom: generic: Wacom mouse is only provided for opaque tablets

PATCH Applied Ping Cheng 2 participants 2 messages Mar 15, 2017 – Mar 21, 2017

Subsystems (2)
lore
Share & tools
lore

Ping Cheng

author
#0 lore raw

PATCH v2 1/1 HID: wacom: generic: Wacom mouse is only provided for opaque tablets

Commit f85c9dc ("Support tool ID and additional tool types") introduced mouse and lens cursor tools to generic codepath, which covers both display (direct) and opaque tablets (indirect devices). However, mouse and lens cursor tools are only provided for opaque tablets. This patch ignores mouse and lens cursor tools if the device is a display tablet.

---
v2: updated commit comments as requested by Jiri.

---
 drivers/hid/wacom_wac.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/hid/wacom_wac.c +4 -2
index d51daf5..b51aa27 100644
@@ -1952,8 +1952,10 @@ static void wacom_wac_pen_usage_mapping(struct hid_device *hdev,
 		input_set_capability(input, EV_KEY, BTN_TOOL_BRUSH);
 		input_set_capability(input, EV_KEY, BTN_TOOL_PENCIL);
 		input_set_capability(input, EV_KEY, BTN_TOOL_AIRBRUSH);
-		input_set_capability(input, EV_KEY, BTN_TOOL_MOUSE);
-		input_set_capability(input, EV_KEY, BTN_TOOL_LENS);
+		if (!(features->device_type & WACOM_DEVICETYPE_DIRECT)) {
+			input_set_capability(input, EV_KEY, BTN_TOOL_MOUSE);
+			input_set_capability(input, EV_KEY, BTN_TOOL_LENS);
+		}
 		break;
 	case WACOM_HID_WD_FINGERWHEEL:
 		wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0);
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw
Quoted 10 lines · Ping Cheng

Commit f85c9dc ("Support tool ID and additional tool types") introduced mouse and lens cursor tools to generic codepath, which covers both display (direct) and opaque tablets (indirect devices). However, mouse and lens cursor tools are only provided for opaque tablets. This patch ignores mouse and lens cursor tools if the device is a display tablet.

---
v2: updated commit comments as requested by Jiri.

Applied to for-4.11/upstream-fixes.

Signature · 2 lines
Jiri Kosina
SUSE Labs