dix: don't apply button mappings to SDs, or the device's MD. (#20122)

Only ever change the button map on the device we actually care about, not the
attached SDs, not the current MD of the device.

X.Org Bug 20122 <http://bugs.freedesktop.org/show_bug.cgi?id=20122>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
Peter Hutterer 2009-02-21 08:09:40 +10:00
parent 36583a4996
commit a50c40be1f

View File

@ -119,24 +119,6 @@ ApplyPointerMapping(DeviceIntPtr dev, CARD8 *map, int len, ClientPtr client)
return ret;
do_butmap_change(dev, map, len, client);
/* Change any attached masters/slaves. */
if (dev->isMaster) {
for (tmp = inputInfo.devices; tmp; tmp = tmp->next) {
if (!tmp->isMaster && tmp->u.master == dev)
if (check_butmap_change(tmp, map, len, NULL, client) == Success)
do_butmap_change(tmp, map, len, client);
}
}
else {
for (tmp = inputInfo.devices; tmp; tmp = tmp->next) {
if (tmp->isMaster && tmp->u.lastSlave == dev) {
/* If this fails, expect the results to be weird. */
if (check_butmap_change(tmp, map, len, NULL, client) == Success)
do_butmap_change(tmp, map, len, client);
}
}
}
return Success;
}