summaryrefslogtreecommitdiff
path: root/hw/xfree86/common
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-06-27 10:17:14 +1000
committerAdam Jackson <ajax@redhat.com>2016-07-18 16:40:46 -0400
commit7f2d690725292e7b5a44c813c9456da426256873 (patch)
tree049a08e74ee9c1dddb194230f86d536045ca7ae1 /hw/xfree86/common
parent4b311d23e84356bd0e9e736aeed7448dd6382118 (diff)
xfree86: if ATTR_KEYBOARD is set, match for keyboards
ATTR_KEY maps to ID_INPUT_KEY which is set for any device with keys. ID_INPUT_KEYBOARD and thus ATTR_KEYBOARD is set for devices that are actual keyboards (and have a set of expected keys). Hand-written match rules may only apply ID_INPUT_KEYBOARD, so make sure we match on that too. Arguably we should've been matching on ATTR_KEYBOARD only all along but changing that likely introduces regressions. Reported-by: Marty Plummer <netz.kernel@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'hw/xfree86/common')
-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 e15ae3d51..42d0f32f3 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_KEY))
+ iclass->is_keyboard.val != ! !(attrs->flags & (ATTR_KEY|ATTR_KEYBOARD)))
return FALSE;
if (iclass->is_pointer.set &&
iclass->is_pointer.val != ! !(attrs->flags & ATTR_POINTER))