diff options
author | Paulo Ricardo Zanoni <prz05@c3sl.ufpr.br> | 2007-05-30 16:15:15 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-05-30 16:15:15 +0930 |
commit | b5db863945fa8045995b3bf742c44e40f2650f04 (patch) | |
tree | 95f2e9059b803db9b81a0ae53448e6321779851d | |
parent | d0e8f474099dea40bbea555427772724ccb787d1 (diff) |
Allow value None for windows when setting ClientPointer.
We need this for clients that need to set the ClientPointer but don't have a
window on display yet. If used, it will set the device as the ClientPointer
for the requesting client.
-rw-r--r-- | Xi/setcptr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Xi/setcptr.c b/Xi/setcptr.c index 25874f0a5..66c8981b7 100644 --- a/Xi/setcptr.c +++ b/Xi/setcptr.c @@ -70,6 +70,7 @@ ProcXSetClientPointer(ClientPtr client) { DeviceIntPtr pDev; WindowPtr pWin; + ClientPtr targetClient; int err; REQUEST(xSetClientPointerReq); @@ -93,9 +94,11 @@ ProcXSetClientPointer(ClientPtr client) stuff->win, err); return Success; } - } + targetClient= wClient(pWin); + } else + targetClient = client; - if (!SetClientPointer(wClient(pWin), client, pDev)) + if (!SetClientPointer(targetClient, client, pDev)) { SendErrorToClient(client, IReqCode, X_SetClientPointer, stuff->win, BadAccess); |