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>
This commit is contained in:
parent
4b311d23e8
commit
7f2d690725
@ -635,7 +635,7 @@ InputClassMatches(const XF86ConfInputClassPtr iclass, const InputInfoPtr idev,
|
|||||||
|
|
||||||
/* MatchIs* booleans */
|
/* MatchIs* booleans */
|
||||||
if (iclass->is_keyboard.set &&
|
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;
|
return FALSE;
|
||||||
if (iclass->is_pointer.set &&
|
if (iclass->is_pointer.set &&
|
||||||
iclass->is_pointer.val != ! !(attrs->flags & ATTR_POINTER))
|
iclass->is_pointer.val != ! !(attrs->flags & ATTR_POINTER))
|
||||||
|
Loading…
Reference in New Issue
Block a user