aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xi/chgprop.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/Xi/chgprop.c')
-rw-r--r--nx-X11/programs/Xserver/Xi/chgprop.c83
1 files changed, 39 insertions, 44 deletions
diff --git a/nx-X11/programs/Xserver/Xi/chgprop.c b/nx-X11/programs/Xserver/Xi/chgprop.c
index 80b8aea5f..b8d0403bf 100644
--- a/nx-X11/programs/Xserver/Xi/chgprop.c
+++ b/nx-X11/programs/Xserver/Xi/chgprop.c
@@ -55,14 +55,14 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include <nx-X11/X.h> /* for inputstr.h */
-#include <nx-X11/Xproto.h> /* Request macro */
-#include "inputstr.h" /* DeviceIntPtr */
+#include <nx-X11/X.h> /* for inputstr.h */
+#include <nx-X11/Xproto.h> /* Request macro */
+#include "inputstr.h" /* DeviceIntPtr */
#include "windowstr.h"
#include <nx-X11/extensions/XI.h>
#include <nx-X11/extensions/XIproto.h>
#include "extnsionst.h"
-#include "extinit.h" /* LookupDeviceIntRec */
+#include "extinit.h" /* LookupDeviceIntRec */
#include "exevents.h"
#include "exglobals.h"
@@ -77,9 +77,8 @@ SOFTWARE.
*/
int
-SProcXChangeDeviceDontPropagateList(client)
- register ClientPtr client;
- {
+SProcXChangeDeviceDontPropagateList(register ClientPtr client)
+{
REQUEST(xChangeDeviceDontPropagateListReq);
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
@@ -88,8 +87,8 @@ SProcXChangeDeviceDontPropagateList(client)
REQUEST_FIXED_SIZE(xChangeDeviceDontPropagateListReq,
stuff->count * sizeof(CARD32));
SwapLongs((CARD32 *) (&stuff[1]), stuff->count);
- return(ProcXChangeDeviceDontPropagateList(client));
- }
+ return (ProcXChangeDeviceDontPropagateList(client));
+}
/***********************************************************************
*
@@ -98,51 +97,47 @@ SProcXChangeDeviceDontPropagateList(client)
*/
int
-ProcXChangeDeviceDontPropagateList (client)
- register ClientPtr client;
- {
- int i;
- WindowPtr pWin;
- struct tmask tmp[EMASKSIZE];
- OtherInputMasks *others;
+ProcXChangeDeviceDontPropagateList(register ClientPtr client)
+{
+ int i;
+ WindowPtr pWin;
+ struct tmask tmp[EMASKSIZE];
+ OtherInputMasks *others;
REQUEST(xChangeDeviceDontPropagateListReq);
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
- if (stuff->length !=(sizeof(xChangeDeviceDontPropagateListReq)>>2) +
- stuff->count)
- {
- SendErrorToClient (client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
- BadLength);
+ if (stuff->length != (sizeof(xChangeDeviceDontPropagateListReq) >> 2) +
+ stuff->count) {
+ SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
+ BadLength);
return Success;
- }
+ }
- pWin = (WindowPtr) LookupWindow (stuff->window, client);
- if (!pWin)
- {
+ pWin = (WindowPtr) LookupWindow(stuff->window, client);
+ if (!pWin) {
client->errorValue = stuff->window;
- SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
- BadWindow);
+ SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
+ BadWindow);
return Success;
- }
+ }
- if (stuff->mode != AddToList && stuff->mode != DeleteFromList)
- {
+ if (stuff->mode != AddToList && stuff->mode != DeleteFromList) {
client->errorValue = stuff->window;
- SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
- BadMode);
+ SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
+ BadMode);
return Success;
- }
+ }
- if (CreateMaskFromList (client, (XEventClass *)&stuff[1],
- stuff->count, tmp, NULL, X_ChangeDeviceDontPropagateList) != Success)
- return Success;
+ if (CreateMaskFromList(client, (XEventClass *) & stuff[1],
+ stuff->count, tmp, NULL,
+ X_ChangeDeviceDontPropagateList) != Success)
+ return Success;
others = wOtherInputMasks(pWin);
if (!others && stuff->mode == DeleteFromList)
return Success;
- for (i=0; i<EMASKSIZE; i++)
- {
+ for (i = 0; i < EMASKSIZE; i++) {
if (tmp[i].mask == 0)
continue;
@@ -151,13 +146,13 @@ ProcXChangeDeviceDontPropagateList (client)
else if (others)
tmp[i].mask |= others->dontPropagateMask[i];
- if (DeviceEventSuppressForWindow (pWin,client,tmp[i].mask,i) != Success)
- {
- SendErrorToClient ( client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
- BadClass);
+ if (DeviceEventSuppressForWindow(pWin, client, tmp[i].mask, i) !=
+ Success) {
+ SendErrorToClient(client, IReqCode,
+ X_ChangeDeviceDontPropagateList, 0, BadClass);
return Success;
- }
}
+ }
return Success;
- }
+}