dix: fix detritus from adding lastSlave field.
This commit is contained in:
parent
90d077e537
commit
caa69d8f7b
|
@ -302,7 +302,7 @@ DisableDevice(DeviceIntPtr dev)
|
||||||
{
|
{
|
||||||
for (other = inputInfo.devices; other; other = other->next)
|
for (other = inputInfo.devices; other; other = other->next)
|
||||||
{
|
{
|
||||||
if (other->master == dev)
|
if (other->u.master == dev)
|
||||||
AttachDevice(NULL, dev, NULL);
|
AttachDevice(NULL, dev, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -513,7 +513,7 @@ InitCoreDevices(void)
|
||||||
if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex))
|
if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex))
|
||||||
FatalError("Couldn't allocate keyboard devPrivates\n");
|
FatalError("Couldn't allocate keyboard devPrivates\n");
|
||||||
dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL;
|
dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL;
|
||||||
dev->master = NULL;
|
dev->u.lastSlave = NULL;
|
||||||
dev->isMaster = TRUE;
|
dev->isMaster = TRUE;
|
||||||
(void)ActivateDevice(dev);
|
(void)ActivateDevice(dev);
|
||||||
|
|
||||||
|
@ -541,7 +541,7 @@ InitCoreDevices(void)
|
||||||
if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex))
|
if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex))
|
||||||
FatalError("Couldn't allocate pointer devPrivates\n");
|
FatalError("Couldn't allocate pointer devPrivates\n");
|
||||||
dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL;
|
dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL;
|
||||||
dev->master = NULL;
|
dev->u.lastSlave = NULL;
|
||||||
dev->isMaster = TRUE;
|
dev->isMaster = TRUE;
|
||||||
(void)ActivateDevice(dev);
|
(void)ActivateDevice(dev);
|
||||||
|
|
||||||
|
@ -2255,7 +2255,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
|
||||||
if (!dev || !master)
|
if (!dev || !master)
|
||||||
return BadDevice;
|
return BadDevice;
|
||||||
|
|
||||||
if (master->master) /* can't attach to slave device */
|
if (!master->isMaster) /* can't attach to slave device */
|
||||||
return BadDevice;
|
return BadDevice;
|
||||||
|
|
||||||
if (!pairingClient)
|
if (!pairingClient)
|
||||||
|
@ -2263,7 +2263,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
|
||||||
else if (client && pairingClient != client)
|
else if (client && pairingClient != client)
|
||||||
return BadAccess;
|
return BadAccess;
|
||||||
|
|
||||||
dev->master = master;
|
dev->u.master = master;
|
||||||
dev->spriteInfo->sprite = master->spriteInfo->sprite;
|
dev->spriteInfo->sprite = master->spriteInfo->sprite;
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
@ -2277,8 +2277,8 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
|
||||||
_X_EXPORT DeviceIntPtr
|
_X_EXPORT DeviceIntPtr
|
||||||
GetPairedDevice(DeviceIntPtr dev)
|
GetPairedDevice(DeviceIntPtr dev)
|
||||||
{
|
{
|
||||||
if (!dev->isMaster && dev->master)
|
if (!dev->isMaster && dev->u.master)
|
||||||
dev = dev->master;
|
dev = dev->u.master;
|
||||||
|
|
||||||
if (!dev->spriteInfo->paired)
|
if (!dev->spriteInfo->paired)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue