[PATCH libinput 6/8] tablet: disable BTN_TOOL_MOUSE/LENS for non-Wacom tablets

Peter Hutterer peter.hutterer at who-t.net
Wed Feb 7 01:45:04 UTC 2018


Mouse and lens cursor tools are rare and the rotation calculation is quirky to
say the least. I don't have access to a non-Wacom mouse tool, so
until this changes, just disable those tools and wait for someone to shout.

This is a much easier fix than trying to figure out the correct generic
rotation calculation that may not be correct anyway.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev-tablet.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index 0140c6f5..2480bbfe 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -2038,6 +2038,13 @@ tablet_init(struct tablet_dispatch *tablet,
 		tablet->quirks.proximity_out_forced = true;
 	}
 
+	/* Our rotation code only works with Wacoms, let's wait until
+	 * someone shouts */
+	if (evdev_device_get_id_vendor(device) != VENDOR_ID_WACOM) {
+		libevdev_disable_event_code(evdev, EV_KEY, BTN_TOOL_MOUSE);
+		libevdev_disable_event_code(evdev, EV_KEY, BTN_TOOL_LENS);
+	}
+
 	tablet_init_calibration(tablet, device);
 	tablet_init_proximity_threshold(tablet, device);
 	rc = tablet_init_accel(tablet, device);
-- 
2.14.3



More information about the wayland-devel mailing list