summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-11-21 17:16:27 +1030
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-11-21 17:16:27 +1030
commit9ed43eff48201520797f89a12bb3b2f5819bd99f (patch)
treed22c80cea5be089422e525429dd90106088719c8
parent33f15689922ad9f1193f803bc1636c82c23ab99e (diff)
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).
-rw-r--r--Xi/setcptr.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/Xi/setcptr.c b/Xi/setcptr.c
index ad8f571db..a3bd9c2ec 100644
--- a/Xi/setcptr.c
+++ b/Xi/setcptr.c
@@ -89,10 +89,17 @@ ProcXSetClientPointer(ClientPtr client)
err = dixLookupWindow(&pWin, stuff->win, client, DixReadWriteAccess);
if (err != Success)
{
- client->errorValue = stuff->win;
- return err;
- }
- targetClient= wClient(pWin);
+ /* window could not be found. maybe the window ID given was a pure
+ client id? */
+ err = dixLookupClient(&targetClient, stuff->win,
+ client, DixReadWriteAccess);
+ if (err != Success)
+ {
+ client->errorValue = stuff->win;
+ return err;
+ }
+ } else
+ targetClient= wClient(pWin);
} else
targetClient = client;