summaryrefslogtreecommitdiff
path: root/Xi/chgprop.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xi/chgprop.c')
-rw-r--r--Xi/chgprop.c85
1 files changed, 39 insertions, 46 deletions
diff --git a/Xi/chgprop.c b/Xi/chgprop.c
index f379048f5..0f1ab5152 100644
--- a/Xi/chgprop.c
+++ b/Xi/chgprop.c
@@ -1,5 +1,3 @@
-/* $Xorg: chgprop.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */
-
/************************************************************
Copyright 1989, 1998 The Open Group
@@ -45,7 +43,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/Xi/chgprop.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */
/***********************************************************************
*
@@ -59,14 +56,14 @@ 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/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 "extinit.h" /* LookupDeviceIntRec */
#include "exevents.h"
#include "exglobals.h"
@@ -92,14 +89,13 @@ SProcXChangeDeviceDontPropagateList(register ClientPtr client)
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
swapl(&stuff->window, n);
swaps(&stuff->count, n);
- p = (long *) &stuff[1];
- for (i=0; i<stuff->count; i++)
- {
- swapl(p, n);
+ p = (long *)&stuff[1];
+ for (i = 0; i < stuff->count; i++) {
+ swapl(p, n);
p++;
- }
- return(ProcXChangeDeviceDontPropagateList(client));
}
+ return (ProcXChangeDeviceDontPropagateList(client));
+}
/***********************************************************************
*
@@ -108,50 +104,47 @@ SProcXChangeDeviceDontPropagateList(register ClientPtr client)
*/
int
-ProcXChangeDeviceDontPropagateList (register ClientPtr client)
+ProcXChangeDeviceDontPropagateList(register ClientPtr client)
{
- int i;
- WindowPtr pWin;
- struct tmask tmp[EMASKSIZE];
- OtherInputMasks *others;
+ 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;
@@ -160,13 +153,13 @@ ProcXChangeDeviceDontPropagateList (register ClientPtr 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;
- }
+}