From: Kristian Høgsberg Date: Tue, 13 Aug 2013 21:55:39 +0000 (-0700) Subject: evdev: Ignore joystick devices X-Git-Tag: 0.1.0~163^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6dc5a8e95dceded41174de9ea175473f40fe542c;p=platform%2Fupstream%2Flibinput.git evdev: Ignore joystick devices We don't handle them in any way now and having your steering wheel move the cursor isn't useful. Applications can still open evdev devices and access them directly like they already do. --- diff --git a/src/evdev.c b/src/evdev.c index 2966b612..26fe8665 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -445,6 +445,16 @@ evdev_handle_device(struct evdev_device *device) ioctl(device->fd, EVIOCGBIT(EV_ABS, sizeof(abs_bits)), abs_bits); + + if (TEST_BIT(abs_bits, ABS_WHEEL) || + TEST_BIT(abs_bits, ABS_GAS) || + TEST_BIT(abs_bits, ABS_BRAKE) || + TEST_BIT(abs_bits, ABS_HAT0X)) { + weston_log("device %s is a joystick, ignoring\n", + device->devnode); + return 0; + } + if (TEST_BIT(abs_bits, ABS_X)) { ioctl(device->fd, EVIOCGABS(ABS_X), &absinfo); device->abs.min_x = absinfo.minimum;