tablet: disable BTN_TOOL_MOUSE/LENS for non-Wacom tablets

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@who-t.net>
This commit is contained in:
Peter Hutterer 2018-02-06 13:45:34 +10:00
parent 26705762e2
commit ee2b58a66f

View file

@ -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);