diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2013-12-16 15:37:16 -0800 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-12-16 15:44:26 -0800 |
commit | c67fd1cf0e91ab03a7d5e5edf44e4a748f899ae4 (patch) | |
tree | 9e97b9dc5de6bfe4981e4a0f6490a08757ec5aba /src/evdev.c | |
parent | de5f82c90d4542a4edd9314c0a17f8c77c4380d3 (diff) | |
download | weston-c67fd1cf0e91ab03a7d5e5edf44e4a748f899ae4.tar.gz |
evdev: Drop obsolete accelerometer reject rule
This rule triggers for devices with an ABS_X/Y evaluators and no
keyboard or multitouch events. There is no way we would ever add such
a device as a pointer, keyboard or touch device anyway. A pointer
device requires has_button (in which case the !has_key condtion would
fail); a keyboard device would also mean !has_key is false and a touch
screen device implies that !device->is_mt is false.
Diffstat (limited to 'src/evdev.c')
-rw-r--r-- | src/evdev.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/evdev.c b/src/evdev.c index 382e3295..f24544a6 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -444,11 +444,10 @@ evdev_configure_device(struct evdev_device *device) unsigned long abs_bits[NBITS(ABS_MAX)]; unsigned long rel_bits[NBITS(REL_MAX)]; unsigned long key_bits[NBITS(KEY_MAX)]; - int has_key, has_abs, has_rel, has_mt; + int has_abs, has_rel, has_mt; int has_button, has_keyboard, has_touch; unsigned int i; - has_key = 0; has_rel = 0; has_abs = 0; has_mt = 0; @@ -521,7 +520,6 @@ evdev_configure_device(struct evdev_device *device) has_rel = 1; } if (TEST_BIT(ev_bits, EV_KEY)) { - has_key = 1; ioctl(device->fd, EVIOCGBIT(EV_KEY, sizeof(key_bits)), key_bits); if (TEST_BIT(key_bits, BTN_TOOL_FINGER) && @@ -551,16 +549,6 @@ evdev_configure_device(struct evdev_device *device) if (TEST_BIT(ev_bits, EV_LED)) has_keyboard = 1; - /* This rule tries to catch accelerometer devices and opt out. We may - * want to adjust the protocol later adding a proper event for dealing - * with accelerometers and implement here accordingly */ - if (has_abs && !has_key && !device->is_mt) { - weston_log("input device %s, %s " - "ignored: unsupported device type\n", - device->devname, device->devnode); - return 0; - } - if ((has_abs || has_rel) && has_button) { weston_seat_init_pointer(device->seat); device->seat_caps |= EVDEV_SEAT_POINTER; |