From 10ca39cf80698cedf92c38fc49a1f9784d2ab385 Mon Sep 17 00:00:00 2001 From: Jason Gerecke Date: Fri, 27 Mar 2015 15:34:54 -0700 Subject: [PATCH] evdev: Do not mark tablet touchscreens as tablets Devices like the Cintiq 24HDT are marked with both ID_INPUT_TABLET and ID_INPUT_TOUCHSCREEN in udev. Be sure that we don't try to use such a device as a tablet. Signed-off-by: Jason Gerecke Reviewed-by: Benjamin Tissoires Signed-off-by: Peter Hutterer --- src/evdev.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/evdev.c b/src/evdev.c index 0c85230e..c0351983 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1538,6 +1538,7 @@ evdev_configure_device(struct evdev_device *device) struct libevdev *evdev = device->evdev; const char *devnode = udev_device_get_devnode(device->udev_device); enum evdev_device_udev_tags udev_tags; + unsigned int tablet_tags; udev_tags = evdev_device_get_udev_tags(device, device->udev_device); @@ -1609,11 +1610,13 @@ evdev_configure_device(struct evdev_device *device) } } - /* libwacom assigns touchpad _and_ tablet to the tablet touch bits, - so make sure we don't initialize the tablet interface for the - touch device */ - if ((udev_tags & (EVDEV_UDEV_TAG_TABLET|EVDEV_UDEV_TAG_TOUCHPAD)) == - EVDEV_UDEV_TAG_TABLET) { + /* libwacom assigns touchpad (or touchscreen) _and_ tablet to the + tablet touch bits, so make sure we don't initialize the tablet + interface for the touch device */ + tablet_tags = EVDEV_UDEV_TAG_TABLET | + EVDEV_UDEV_TAG_TOUCHPAD | + EVDEV_UDEV_TAG_TOUCHSCREEN; + if ((udev_tags & tablet_tags) == EVDEV_UDEV_TAG_TABLET) { device->dispatch = evdev_tablet_create(device); device->seat_caps |= EVDEV_DEVICE_TABLET; log_info(libinput,