From 2c3645581ee3f180d34e32c8016d5e4e1af4dca4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 7 Aug 2008 11:55:10 +0930 Subject: [PATCH] dix: SetModifierMapping should only apply to the ClientPointer and it's SDs. --- dix/devices.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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. */