dix: Extend IsKeyboardDevice() to not include pointer devices.
If a pointer devices has key classes as well, don't register it as a keyboard device. Let's see how much that change will break.
This commit is contained in:
parent
cc7dab2d04
commit
bce6091c6b
|
@ -331,11 +331,14 @@ IsPointerDevice(DeviceIntPtr dev)
|
|||
/*
|
||||
* Return true if a device is a keyboard, check is the same as used by XI to
|
||||
* fill the 'use' field.
|
||||
*
|
||||
* Some pointer devices have keys as well (e.g. multimedia keys). Try to not
|
||||
* count them as keyboard devices.
|
||||
*/
|
||||
_X_EXPORT Bool
|
||||
IsKeyboardDevice(DeviceIntPtr dev)
|
||||
{
|
||||
return (dev->key && dev->kbdfeed);
|
||||
return (dev->key && dev->kbdfeed) && !IsPointerDevice(dev);;
|
||||
}
|
||||
|
||||
#ifdef XEVIE
|
||||
|
|
Loading…
Reference in New Issue