summaryrefslogtreecommitdiff
path: root/Xi/chgprop.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-09-24 13:33:01 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-09-26 07:26:59 -0400
commit31a7994ac7365562ef1d00e0a7b25f967a961a4e (patch)
treea2054c0e371e9c62396f2e09df469142dca0a633 /Xi/chgprop.c
parent56ffc381d32687242dd094395fcf2216339bab2a (diff)
Input: Return errors to the dispatcher instead of sending them ourself.
Also fixed two "unused variable: stuff" warnings.
Diffstat (limited to 'Xi/chgprop.c')
-rw-r--r--Xi/chgprop.c36
1 files changed, 11 insertions, 25 deletions
diff --git a/Xi/chgprop.c b/Xi/chgprop.c
index 59a93c60b..13463dd1c 100644
--- a/Xi/chgprop.c
+++ b/Xi/chgprop.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 "windowstr.h"
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
#include "extinit.h" /* LookupDeviceIntRec */
#include "exevents.h"
@@ -115,30 +112,22 @@ ProcXChangeDeviceDontPropagateList(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
if (stuff->length != (sizeof(xChangeDeviceDontPropagateListReq) >> 2) +
- stuff->count) {
- SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
- BadLength);
- return Success;
- }
+ stuff->count)
+ return BadLength;
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
- if (rc != Success) {
- SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
- rc);
- return Success;
- }
+ if (rc != Success)
+ return rc;
if (stuff->mode != AddToList && stuff->mode != DeleteFromList) {
client->errorValue = stuff->window;
- SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
- BadMode);
- return Success;
+ return BadMode;
}
- if (CreateMaskFromList(client, (XEventClass *) & stuff[1],
- stuff->count, tmp, NULL,
- X_ChangeDeviceDontPropagateList) != Success)
- return Success;
+ if ((rc = CreateMaskFromList(client, (XEventClass *) & stuff[1],
+ stuff->count, tmp, NULL,
+ X_ChangeDeviceDontPropagateList)) != Success)
+ return rc;
others = wOtherInputMasks(pWin);
if (!others && stuff->mode == DeleteFromList)
@@ -153,11 +142,8 @@ ProcXChangeDeviceDontPropagateList(ClientPtr client)
tmp[i].mask |= others->dontPropagateMask[i];
if (DeviceEventSuppressForWindow(pWin, client, tmp[i].mask, i) !=
- Success) {
- SendErrorToClient(client, IReqCode,
- X_ChangeDeviceDontPropagateList, 0, BadClass);
- return Success;
- }
+ Success)
+ return BadClass;
}
return Success;