mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-27 07:00:07 +01:00
dix: GetPairedDevice: return dev paired with master for slave devices.
This commit is contained in:
parent
6c259a08d9
commit
840bde3d32
1 changed files with 7 additions and 1 deletions
|
|
@ -2268,11 +2268,17 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
|
|||
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
|
||||
GetPairedDevice(DeviceIntPtr dev)
|
||||
{
|
||||
if (!dev->isMaster && dev->master)
|
||||
dev = dev->master;
|
||||
|
||||
if (!dev->spriteInfo->paired)
|
||||
{
|
||||
ErrorF("[dix] No device paired with %d (%s).\n",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue