dix: Remove GetPairedPointer, GetPairedKeyboard in favour of GetPairedDevice.
This commit is contained in:
parent
3e07e73fef
commit
032e906711
|
@ -2274,46 +2274,19 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
/* Return the pointer that is paired with the given keyboard. If no pointer is
|
|
||||||
* paired, return the virtual core pointer
|
|
||||||
*/
|
|
||||||
DeviceIntPtr
|
|
||||||
GetPairedPointer(DeviceIntPtr kbd)
|
|
||||||
{
|
|
||||||
DeviceIntPtr ptr = inputInfo.devices;
|
|
||||||
while(ptr)
|
|
||||||
{
|
|
||||||
if (ptr->spriteInfo->sprite == kbd->spriteInfo->sprite &&
|
|
||||||
ptr->spriteInfo->spriteOwner)
|
|
||||||
{
|
|
||||||
return ptr;
|
|
||||||
}
|
|
||||||
ptr = ptr->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
return inputInfo.pointer;
|
/* Return the device paired with the given device or NULL.
|
||||||
}
|
|
||||||
|
|
||||||
/* Find the keyboard device that is paired with the given pointer. If none is
|
|
||||||
* found, return the VCK.
|
|
||||||
*/
|
*/
|
||||||
_X_EXPORT DeviceIntPtr
|
_X_EXPORT DeviceIntPtr
|
||||||
GetPairedKeyboard(DeviceIntPtr ptr)
|
GetPairedDevice(DeviceIntPtr dev)
|
||||||
{
|
{
|
||||||
DeviceIntPtr dev = inputInfo.devices;
|
if (!dev->spriteInfo->paired)
|
||||||
|
|
||||||
if (IsKeyboardDevice(ptr))
|
|
||||||
return ptr;
|
|
||||||
|
|
||||||
while(dev)
|
|
||||||
{
|
{
|
||||||
if (ptr != dev &&
|
ErrorF("[dix] No device paired with %d (%s).\n",
|
||||||
IsKeyboardDevice(dev) &&
|
dev->id, dev->name);
|
||||||
ptr->spriteInfo->sprite == dev->spriteInfo->sprite)
|
return NULL;
|
||||||
return dev;
|
|
||||||
dev = dev->next;
|
|
||||||
}
|
}
|
||||||
return (dev) ? dev : inputInfo.keyboard;
|
return dev->spriteInfo->paired;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue