xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Mon Jul 18 20:42:35 UTC 2016


 hw/xfree86/common/xf86Xinput.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7f2d690725292e7b5a44c813c9456da426256873
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Mon Jun 27 10:17:14 2016 +1000

    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 at gmail.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index e15ae3d..42d0f32 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))


More information about the xorg-commit mailing list