diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-02-18 11:53:06 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-02-22 14:35:45 +1000 |
commit | ce7f79efd588899f01c74f95c2f58d6dd6d816cd (patch) | |
tree | 2f801d4932a6e05d3e2a9a9dc4a081c016b427c4 /dix | |
parent | e1ac704185dee31b427a46cd41a00ef7a28b4129 (diff) |
dix: fix a master device access in change_modmap.
We need to check if our master keyboard is the given device since we may be
a pointer with keys and thus need to change the modmap too.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/inpututils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dix/inpututils.c b/dix/inpututils.c index 8b7b03523..abeabf229 100644 --- a/dix/inpututils.c +++ b/dix/inpututils.c @@ -268,12 +268,12 @@ change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *modkeymap, /* Change any attached masters/slaves. */ if (IsMaster(dev)) { for (tmp = inputInfo.devices; tmp; tmp = tmp->next) { - if (!IsMaster(tmp) && tmp->u.master == dev) + if (!IsMaster(tmp) && GetMaster(tmp, MASTER_KEYBOARD) == dev) if (check_modmap_change_slave(client, dev, tmp, modmap)) do_modmap_change(client, tmp, modmap); } } - else if (!IsFloating(dev) && dev->u.master->u.lastSlave == dev) { + else if (!IsFloating(dev) && GetMaster(dev, MASTER_KEYBOARD)->u.lastSlave == dev) { /* If this fails, expect the results to be weird. */ if (check_modmap_change(client, dev->u.master, modmap)) do_modmap_change(client, dev->u.master, modmap); |