dix: Remove RegisterPairingClient and UnregisterPairingClient.
This commit is contained in:
@@ -2371,11 +2371,6 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd)
|
||||
if (ptr->spriteInfo->paired)
|
||||
return BadDevice;
|
||||
|
||||
if (!pairingClient)
|
||||
RegisterPairingClient(client);
|
||||
else if (client && pairingClient != client)
|
||||
return BadAccess;
|
||||
|
||||
if (kbd->spriteInfo->spriteOwner)
|
||||
{
|
||||
xfree(kbd->spriteInfo->sprite);
|
||||
@@ -2409,11 +2404,6 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
|
||||
if (master && !master->isMaster) /* can't attach to slaves */
|
||||
return BadDevice;
|
||||
|
||||
if (!pairingClient)
|
||||
RegisterPairingClient(client);
|
||||
else if (client && pairingClient != client)
|
||||
return BadAccess;
|
||||
|
||||
/* set from floating to floating? */
|
||||
if (!dev->u.master && !master)
|
||||
return Success;
|
||||
@@ -2495,39 +2485,6 @@ GetPairedDevice(DeviceIntPtr dev)
|
||||
return dev->spriteInfo->paired;
|
||||
}
|
||||
|
||||
/*
|
||||
* Register a client to be able to pair devices.
|
||||
*/
|
||||
Bool
|
||||
RegisterPairingClient(ClientPtr client)
|
||||
{
|
||||
if (!pairingClient)
|
||||
{
|
||||
pairingClient = client;
|
||||
} else if (pairingClient != client)
|
||||
{
|
||||
return False;
|
||||
}
|
||||
return True;
|
||||
}
|
||||
|
||||
/*
|
||||
* Unregister pairing client;
|
||||
*/
|
||||
Bool
|
||||
UnregisterPairingClient(ClientPtr client)
|
||||
{
|
||||
if (pairingClient)
|
||||
{
|
||||
if ( pairingClient == client)
|
||||
{
|
||||
pairingClient = NULL;
|
||||
} else
|
||||
return False;
|
||||
}
|
||||
return True;
|
||||
}
|
||||
|
||||
/* Guess a pointer that could be a good one for pairing. Any pointer that is
|
||||
* not yet paired with keyboard is considered a good one.
|
||||
* If no pointer is found, the last real pointer is chosen. If that doesn't
|
||||
|
||||
@@ -3572,7 +3572,6 @@ CloseDownClient(ClientPtr client)
|
||||
ReleaseActiveGrabs(client);
|
||||
DeleteClientFontStuff(client);
|
||||
ACUnregisterClient(client);
|
||||
UnregisterPairingClient(client); /* other clients can pair devices */
|
||||
if (!really_close_down)
|
||||
{
|
||||
/* This frees resources that should never be retained
|
||||
|
||||
Reference in New Issue
Block a user