diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2008-08-07 11:55:10 +0930 |
---|---|---|
committer | Alan Hourihane <alanh@localhost.(none)> | 2008-08-12 19:33:33 +0100 |
commit | cba798dbfbcbcd8a3d9122536cd458b34cc0e411 (patch) | |
tree | 3a2d3008e0d3c149f39b42602c5da2926537d27e | |
parent | 7e0b1f5cd89fa8de7ce069de107970d73358dbfa (diff) |
dix: SetModifierMapping should only apply to the ClientPointer and it's SDs.
-rw-r--r-- | dix/devices.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dix/devices.c b/dix/devices.c index d8e37d790..7519e0644 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -1651,10 +1651,11 @@ DoSetModifierMapping(ClientPtr client, KeyCode *inputMap, int numKeyPerModifier, xSetModifierMappingReply *rep) { DeviceIntPtr pDev = NULL; + DeviceIntPtr cp = PickKeyboard(client); /* ClientPointer keyboard */ int rc, i = 0, inputMapLen = numKeyPerModifier * 8; for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { + if (pDev == cp || (!pDev->isMaster && (pDev->u.master == cp) && pDev->key)) { for (i = 0; i < inputMapLen; i++) { /* Check that all the new modifiers fall within the advertised * keycode range, and are okay with the DDX. */ |