summaryrefslogtreecommitdiff
path: root/Xi/ungrdevb.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xi/ungrdevb.c')
-rw-r--r--Xi/ungrdevb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Xi/ungrdevb.c b/Xi/ungrdevb.c
index 64bb213f5..8db9307ce 100644
--- a/Xi/ungrdevb.c
+++ b/Xi/ungrdevb.c
@@ -105,6 +105,7 @@ ProcXUngrabDeviceButton(ClientPtr client)
DeviceIntPtr mdev;
WindowPtr pWin;
GrabRec temporaryGrab;
+ int rc;
REQUEST(xUngrabDeviceButtonReq);
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
@@ -134,9 +135,9 @@ ProcXUngrabDeviceButton(ClientPtr client)
} else
mdev = (DeviceIntPtr) LookupKeyboardDevice();
- pWin = LookupWindow(stuff->grabWindow, client);
- if (!pWin) {
- SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadWindow);
+ rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess);
+ if (rc != Success) {
+ SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, rc);
return Success;
}