diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-04-10 09:59:45 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-04-10 09:59:45 +0930 |
commit | bce6091c6b04ff2db704ae4f161179d21dcbec59 (patch) | |
tree | 20f5ab0fdac1af444a5df2e214bf7d2d747ca6c4 /dix/events.c | |
parent | cc7dab2d04da4ca164eeec1a3296df1706585466 (diff) |
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.
Diffstat (limited to 'dix/events.c')
-rw-r--r-- | dix/events.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dix/events.c b/dix/events.c index a2a0c1a67..305502ac9 100644 --- a/dix/events.c +++ b/dix/events.c @@ -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 |