summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2017-01-10 17:36:46 +1000
committerMartin Pitt <martin.pitt@ubuntu.com>2017-01-10 08:36:46 +0100
commit64083a6078630372623bb1013a45d3bf31d8a836 (patch)
tree8e5f7199a51aa9860d758e1d0ad1b5325d158413 /src
parent6534c8d35ff03ae2b3d2e8c26a175ee39dbb4af0 (diff)
udev: add ID_INPUT_SWITCH for devices with switch capability (#5057)
Diffstat (limited to 'src')
-rw-r--r--src/udev/udev-builtin-input_id.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/udev/udev-builtin-input_id.c b/src/udev/udev-builtin-input_id.c
index 59b9804dc4..51f364bf94 100644
--- a/src/udev/udev-builtin-input_id.c
+++ b/src/udev/udev-builtin-input_id.c
@@ -323,6 +323,9 @@ static int builtin_input_id(struct udev_device *dev, int argc, char *argv[], boo
if (!is_pointer && !is_key && test_bit(EV_REL, bitmask_ev) &&
(test_bit(REL_WHEEL, bitmask_rel) || test_bit(REL_HWHEEL, bitmask_rel)))
udev_builtin_add_property(dev, test, "ID_INPUT_KEY", "1");
+ if (test_bit(EV_SW, bitmask_ev))
+ udev_builtin_add_property(dev, test, "ID_INPUT_SWITCH", "1");
+
}
devnode = udev_device_get_devnode(dev);