Xi: allow clients to specify pure client id in SetClientPointer.
If no window was found with the given ID, try if there's a client with the ID. Allows us to set the CP for apps that don't open windows (e.g. x2x).
This commit is contained in:
parent
33f1568992
commit
9ed43eff48
15
Xi/setcptr.c
15
Xi/setcptr.c
|
@ -89,10 +89,17 @@ ProcXSetClientPointer(ClientPtr client)
|
||||||
err = dixLookupWindow(&pWin, stuff->win, client, DixReadWriteAccess);
|
err = dixLookupWindow(&pWin, stuff->win, client, DixReadWriteAccess);
|
||||||
if (err != Success)
|
if (err != Success)
|
||||||
{
|
{
|
||||||
client->errorValue = stuff->win;
|
/* window could not be found. maybe the window ID given was a pure
|
||||||
return err;
|
client id? */
|
||||||
}
|
err = dixLookupClient(&targetClient, stuff->win,
|
||||||
targetClient= wClient(pWin);
|
client, DixReadWriteAccess);
|
||||||
|
if (err != Success)
|
||||||
|
{
|
||||||
|
client->errorValue = stuff->win;
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
targetClient= wClient(pWin);
|
||||||
} else
|
} else
|
||||||
targetClient = client;
|
targetClient = client;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user