diff --git a/dix/devices.c b/dix/devices.c index 5bf956ead..e62c34c55 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2622,6 +2622,8 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) if (IsFloating(dev) && !master && dev->enabled) return Success; + input_lock(); + /* free the existing sprite. */ if (IsFloating(dev) && dev->spriteInfo->paired == dev) { screen = miPointerGetScreen(dev); @@ -2662,6 +2664,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) RecalculateMasterButtons(master); } + input_unlock(); /* XXX: in theory, the MD should change back to its old, original * classes when the last SD is detached. Thanks to the XTEST devices, * we'll always have an SD attached until the MD is removed.