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/getbmap.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/getbmap.c')
-rw-r--r-- | Xi/getbmap.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/Xi/getbmap.c b/Xi/getbmap.c index 5e8cf07fb..ebb0613af 100644 --- a/Xi/getbmap.c +++ b/Xi/getbmap.c @@ -56,12 +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 <X11/extensions/XI.h> #include <X11/extensions/XIproto.h> -#include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -106,18 +103,13 @@ ProcXGetDeviceButtonMapping(ClientPtr client) rep.sequenceNumber = client->sequence; dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) { - SendErrorToClient(client, IReqCode, X_GetDeviceButtonMapping, 0, - BadDevice); - return Success; - } + if (dev == NULL) + return BadDevice; b = dev->button; - if (b == NULL) { - SendErrorToClient(client, IReqCode, X_GetDeviceButtonMapping, 0, - BadMatch); - return Success; - } + if (b == NULL) + return BadMatch; + rep.nElts = b->numButtons; rep.length = (rep.nElts + (4 - 1)) / 4; WriteReplyToClient(client, sizeof(xGetDeviceButtonMappingReply), &rep); |