diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-11-07 15:37:23 +1030 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-11-07 15:37:23 +1030 |
commit | 0b729051c04da7068f1e6dd319190bd0a362b2c0 (patch) | |
tree | 6e15c5de67a40d04167fcf0a2e0e26af8eca11c2 /Xi/setmode.c | |
parent | b7ee005d327372c1e414ee6c526f9f7aee14bc86 (diff) | |
parent | d7c5e8bfc1aecbd23a4cbb2eab08656587aac2e8 (diff) |
Merge branch 'master' into mpx
Conflicts:
Xi/extinit.c
Xi/grabdev.c
Xi/setmode.c
Xi/ungrdev.c
dix/devices.c
dix/events.c
dix/getevents.c
include/dix.h
mi/midispcur.c
mi/misprite.c
xkb/xkbActions.c
xkb/xkbEvents.c
xkb/xkbPrKeyEv.c
Diffstat (limited to 'Xi/setmode.c')
-rw-r--r-- | Xi/setmode.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/Xi/setmode.c b/Xi/setmode.c index 00d340055..d8a569588 100644 --- a/Xi/setmode.c +++ b/Xi/setmode.c @@ -56,13 +56,10 @@ SOFTWARE. #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include <X11/extensions/XI.h> #include <X11/extensions/XIproto.h> #include "XIstubs.h" -#include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -105,14 +102,10 @@ ProcXSetDeviceMode(ClientPtr client) rep.sequenceNumber = client->sequence; dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) { - SendErrorToClient(client, IReqCode, X_SetDeviceMode, 0, BadDevice); - return Success; - } - if (dev->valuator == NULL) { - SendErrorToClient(client, IReqCode, X_SetDeviceMode, 0, BadMatch); - return Success; - } + if (dev == NULL) + return BadDevice; + if (dev->valuator == NULL) + return BadMatch; if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client)) rep.status = AlreadyGrabbed; else @@ -120,10 +113,8 @@ ProcXSetDeviceMode(ClientPtr client) if (rep.status == Success) dev->valuator->mode = stuff->mode; - else if (rep.status != AlreadyGrabbed) { - SendErrorToClient(client, IReqCode, X_SetDeviceMode, 0, rep.status); - return Success; - } + else if (rep.status != AlreadyGrabbed) + return rep.status; WriteReplyToClient(client, sizeof(xSetDeviceModeReply), &rep); return Success; |