summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2008-08-07 11:55:10 +0930
committerPeter Hutterer <peter.hutterer@redhat.com>2008-08-08 16:19:20 +0930
commit2c3645581ee3f180d34e32c8016d5e4e1af4dca4 (patch)
tree15990fefeee17d2c88c4216fc98f98ddda703e9f /dix
parente1b286d495b760cf67ddf936eca11da50fba847a (diff)
dix: SetModifierMapping should only apply to the ClientPointer and it's SDs.
Diffstat (limited to 'dix')
-rw-r--r--dix/devices.c3
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. */