Commit e433d104 authored by Peter Hutterer's avatar Peter Hutterer
Browse files

dix: disable non-sprite-owners first when disabling paired devices

If a sprite-owner is to be disabled but still paired, disable the paired
device first. i.e. disabling a master pointer will disable the master
keyboard first.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
Reviewed-by: default avatarChase Douglas <>
parent df170436
......@@ -458,10 +458,13 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
if (IsMaster(dev) && dev->spriteInfo->sprite) {
for (other = inputInfo.devices; other; other = other->next)
BUG_RETURN_VAL_MSG(other->spriteInfo->paired == dev, FALSE,
"%s still paired with %s", dev->name, other->spriteInfo->paired->name);
if (other->spriteInfo->paired == dev && !other->spriteInfo->spriteOwner)
DisableDevice(other, sendevent);
if (dev->spriteInfo->paired)
dev->spriteInfo->paired = NULL;
(void) (*dev->deviceProc) (dev, DEVICE_OFF);
dev->enabled = FALSE;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment