Commit eededbeb authored by Peter Hutterer's avatar Peter Hutterer

evdev: fix the check for tablet vs joystick

A device may have ID_INPUT_JOYSTICK and ID_INPUT_KEY in which case it would
still get added, despite being a joystick device. Make sure we check only the
tablet and joystick bits - where a device has the joystick bit set but not the
tablet one we ignore it.

Note that this check will get removed in the next commit anyway, it's just
here to make tracking the change easier in the history (and figuring out where
potential regressions come from).

Fixes #415Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
parent c9ff7e78
......@@ -1812,9 +1812,10 @@ evdev_configure_device(struct evdev_device *device)
/* libwacom *adds* TABLET, TOUCHPAD but leaves JOYSTICK in place, so
make sure we only ignore real joystick devices */
"device is a joystick, ignoring\n");
const unsigned int joystick_tag = EVDEV_UDEV_TAG_JOYSTICK;
const unsigned int joystick_or_tablet_tag = EVDEV_UDEV_TAG_JOYSTICK|EVDEV_UDEV_TAG_TABLET;
if ((udev_tags & joystick_or_tablet_tag) == joystick_tag) {
evdev_log_info(device, "device is a joystick, ignoring\n");
return NULL;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment