mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user