diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2008-11-02 15:26:35 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2008-11-02 15:26:35 +0000 |
commit | dbca69c8a4f3e2d1ccb4f89152213b2861b33af6 (patch) | |
tree | f8963ef73903a7b4374adc2354dffbaa905112ac /xserver/Xi/ungrdev.c | |
parent | 33b2029f322f3c238b7ba528083195ad8dde33e1 (diff) |
xserver 1.5.2. tested by ckuethe@, oga@, and others.
Diffstat (limited to 'xserver/Xi/ungrdev.c')
-rw-r--r-- | xserver/Xi/ungrdev.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/xserver/Xi/ungrdev.c b/xserver/Xi/ungrdev.c index 980fa9339..7abb1d061 100644 --- a/xserver/Xi/ungrdev.c +++ b/xserver/Xi/ungrdev.c @@ -56,13 +56,9 @@ SOFTWARE. #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include <X11/extensions/XIproto.h> -#include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "ungrdev.h" @@ -74,9 +70,9 @@ SOFTWARE. */ int -SProcXUngrabDevice(register ClientPtr client) +SProcXUngrabDevice(ClientPtr client) { - register char n; + char n; REQUEST(xUngrabDeviceReq); swaps(&stuff->length, n); @@ -92,20 +88,19 @@ SProcXUngrabDevice(register ClientPtr client) */ int -ProcXUngrabDevice(register ClientPtr client) +ProcXUngrabDevice(ClientPtr client) { DeviceIntPtr dev; GrabPtr grab; TimeStamp time; + int rc; REQUEST(xUngrabDeviceReq); REQUEST_SIZE_MATCH(xUngrabDeviceReq); - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) { - SendErrorToClient(client, IReqCode, X_UngrabDevice, 0, BadDevice); - return Success; - } + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) + return rc; grab = dev->grab; time = ClientTimeToServerTime(stuff->time); |