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>
This commit is contained in:
parent
e1ac704185
commit
ce7f79efd5
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user