From e7211eb0b3d10323dab681bcb18580405ea18ab2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 10 Apr 2008 08:08:54 +0930 Subject: Xi: When attaching, check for ptr -> ptr and keybd -> keybd. Some pointer devices have key classes (e.g. MS Optical Desktop 2000). The previous test was performed as Error if ptr -> keybd or keybd -> ptr. This doesnt work with such devices. New test is Succeed if ptr->ptr or keybd->keybd. --- Xi/chdevhier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Xi') diff --git a/Xi/chdevhier.c b/Xi/chdevhier.c index e9a5076a9..36797d90c 100644 --- a/Xi/chdevhier.c +++ b/Xi/chdevhier.c @@ -272,10 +272,10 @@ ProcXChangeDeviceHierarchy(ClientPtr client) goto unwind; } - if ((IsPointerDevice(newmaster) && - !IsPointerDevice(ptr)) || + if (!((IsPointerDevice(newmaster) && + IsPointerDevice(ptr)) || (IsKeyboardDevice(newmaster) && - !IsKeyboardDevice(ptr))) + IsKeyboardDevice(ptr)))) { rc = BadDevice; goto unwind; -- cgit v1.2.3