dix: Enabling devices must not overwrite existing sprites/pairing.
EnableDevices is (amongst others )called after a VT switch. We must not create a new sprite or re-pair the device, otherwise we lose the input device setup that we had before the VT switch. This requires the devices to be in exactly the same order as before the VT switch. Removing a device while on a different VT is probably a bad idea.
This commit is contained in:
parent
d627061b48
commit
72b347e681
|
@ -210,10 +210,13 @@ EnableDevice(DeviceIntPtr dev)
|
|||
/* Sprites pop up on the first root window, so we can supply it directly
|
||||
* here.
|
||||
*/
|
||||
if (IsPointerDevice(dev) && dev->spriteInfo->spriteOwner)
|
||||
InitializeSprite(dev, WindowTable[0]);
|
||||
else
|
||||
PairDevices(NULL, inputInfo.pointer, dev);
|
||||
if (!dev->spriteInfo->sprite)
|
||||
{
|
||||
if (IsPointerDevice(dev) && dev->spriteInfo->spriteOwner)
|
||||
InitializeSprite(dev, WindowTable[0]);
|
||||
else
|
||||
PairDevices(NULL, inputInfo.pointer, dev);
|
||||
}
|
||||
|
||||
if ((*prev != dev) || !dev->inited ||
|
||||
((ret = (*dev->deviceProc)(dev, DEVICE_ON)) != Success)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user