summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86Xinput.c
diff options
context:
space:
mode:
authorLaércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>2016-02-12 14:18:02 -0200
committerAdam Jackson <ajax@redhat.com>2016-03-01 10:46:48 -0500
commitdaa6d2d58f65b9301b1b1f3c6df07719ecb5c03d (patch)
tree8d73d57fc4359ed5869c3a81301e0744a42d43f5 /hw/xfree86/common/xf86Xinput.c
parent851ff9ec04b73412c7dbad7b4911a1feac21f354 (diff)
config/udev: distinguish between real keyboards and other key devices
This patch introduces a new flag ATTR_KEY for hotplugged input devices, so we can better distinguish between real keyboards (i.e. devices with udev property ID_INPUT_KEYBOARD="1") and other key input devices like lid switches, power buttons, etc. All supported hotplug backends (udev, hal, and wscons) will set both flags ATTR_KEY and ATTR_KEYBOARD for real keyboards, but udev backend will set ATTR_KEY, but not ATTR_KEYBOARD, for non-keyboard key input devices (hal and wscons will set both flags in any case). With this distinction, kdrive input hotplugging mechanism will be allowed to only grab real keyboards, as other key input devices are currently not supported. In order to don't break current behaviour, this patch will replace all ATTR_KEYBOARD occurrences with ATTR_KEY in hw/xfree86/common/xf86Xinput.c. [ajax: Just add ATTR_KEY, don't re-number the other attributes] Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
Diffstat (limited to 'hw/xfree86/common/xf86Xinput.c')
-rw-r--r--hw/xfree86/common/xf86Xinput.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index a9ce62a98..4f2e6c8c4 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -635,7 +635,7 @@ InputClassMatches(const XF86ConfInputClassPtr iclass, const InputInfoPtr idev,
/* MatchIs* booleans */
if (iclass->is_keyboard.set &&
- iclass->is_keyboard.val != ! !(attrs->flags & ATTR_KEYBOARD))
+ iclass->is_keyboard.val != ! !(attrs->flags & ATTR_KEY))
return FALSE;
if (iclass->is_pointer.set &&
iclass->is_pointer.val != ! !(attrs->flags & ATTR_POINTER))