summaryrefslogtreecommitdiff
path: root/Xi/ungrdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xi/ungrdev.c')
-rw-r--r--Xi/ungrdev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Xi/ungrdev.c b/Xi/ungrdev.c
index 3b6b252b6..f6525a287 100644
--- a/Xi/ungrdev.c
+++ b/Xi/ungrdev.c
@@ -59,7 +59,6 @@ SOFTWARE.
#include "inputstr.h" /* DeviceIntPtr */
#include "windowstr.h" /* window structure */
#include <X11/extensions/XIproto.h>
-#include "extinit.h" /* LookupDeviceIntRec */
#include "exglobals.h"
#include "ungrdev.h"
@@ -94,13 +93,14 @@ ProcXUngrabDevice(ClientPtr client)
DeviceIntPtr dev;
GrabPtr grab;
TimeStamp time;
+ int rc;
REQUEST(xUngrabDeviceReq);
REQUEST_SIZE_MATCH(xUngrabDeviceReq);
- dev = LookupDeviceIntRec(stuff->deviceid);
- if (dev == NULL)
- return BadDevice;
+ rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
grab = dev->deviceGrab.grab;
time = ClientTimeToServerTime(stuff->time);