dix: set the client's error value to the bad deviceid in check_butmap_change.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
da04e8f135
commit
34424fab9a
|
@ -45,11 +45,17 @@ check_butmap_change(DeviceIntPtr dev, CARD8 *map, int len, CARD32 *errval_out,
|
||||||
int i, ret;
|
int i, ret;
|
||||||
|
|
||||||
if (!dev || !dev->button)
|
if (!dev || !dev->button)
|
||||||
|
{
|
||||||
|
client->errorValue = (dev) ? dev->id : 0;
|
||||||
return BadDevice;
|
return BadDevice;
|
||||||
|
}
|
||||||
|
|
||||||
ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess);
|
ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess);
|
||||||
if (ret != Success)
|
if (ret != Success)
|
||||||
|
{
|
||||||
|
client->errorValue = dev->id;
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
if (dev->button->map[i + 1] != map[i] && dev->button->down[i + 1])
|
if (dev->button->map[i + 1] != map[i] && dev->button->down[i + 1])
|
||||||
|
|
Loading…
Reference in New Issue