From b5db863945fa8045995b3bf742c44e40f2650f04 Mon Sep 17 00:00:00 2001 From: Paulo Ricardo Zanoni Date: Wed, 30 May 2007 16:15:15 +0930 Subject: [PATCH] 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. --- Xi/setcptr.c | 7 +++++-- 1 file 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);