diff options
Diffstat (limited to 'Xi/setmode.c')
-rw-r--r-- | Xi/setmode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Xi/setmode.c b/Xi/setmode.c index d8a569588..2badb5161 100644 --- a/Xi/setmode.c +++ b/Xi/setmode.c @@ -60,7 +60,6 @@ SOFTWARE. #include <X11/extensions/XI.h> #include <X11/extensions/XIproto.h> #include "XIstubs.h" -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "setmode.h" @@ -92,6 +91,7 @@ ProcXSetDeviceMode(ClientPtr client) { DeviceIntPtr dev; xSetDeviceModeReply rep; + int rc; REQUEST(xSetDeviceModeReq); REQUEST_SIZE_MATCH(xSetDeviceModeReq); @@ -101,9 +101,9 @@ ProcXSetDeviceMode(ClientPtr client) rep.length = 0; rep.sequenceNumber = client->sequence; - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + if (rc != Success) + return rc; if (dev->valuator == NULL) return BadMatch; if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client)) |