dix: GetPairedDevice: return dev paired with master for slave devices.
This commit is contained in:
parent
6c259a08d9
commit
840bde3d32
|
@ -2268,11 +2268,17 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the device paired with the given device or NULL.
|
/**
|
||||||
|
* Return the device paired with the given device or NULL.
|
||||||
|
* Returns the device paired with the parent master if the given device is a
|
||||||
|
* slave device.
|
||||||
*/
|
*/
|
||||||
_X_EXPORT DeviceIntPtr
|
_X_EXPORT DeviceIntPtr
|
||||||
GetPairedDevice(DeviceIntPtr dev)
|
GetPairedDevice(DeviceIntPtr dev)
|
||||||
{
|
{
|
||||||
|
if (!dev->isMaster && dev->master)
|
||||||
|
dev = dev->master;
|
||||||
|
|
||||||
if (!dev->spriteInfo->paired)
|
if (!dev->spriteInfo->paired)
|
||||||
{
|
{
|
||||||
ErrorF("[dix] No device paired with %d (%s).\n",
|
ErrorF("[dix] No device paired with %d (%s).\n",
|
||||||
|
|
Loading…
Reference in New Issue