59
56
#include <dix-config.h>
62
#include <X11/X.h> /* for inputstr.h */
63
#include <X11/Xproto.h> /* Request macro */
64
#include "inputstr.h" /* DeviceIntPtr */
59
#include <X11/X.h> /* for inputstr.h */
60
#include <X11/Xproto.h> /* Request macro */
61
#include "inputstr.h" /* DeviceIntPtr */
65
62
#include "windowstr.h"
66
63
#include <X11/extensions/XI.h>
67
64
#include <X11/extensions/XIproto.h>
68
65
#include "extnsionst.h"
69
#include "extinit.h" /* LookupDeviceIntRec */
66
#include "extinit.h" /* LookupDeviceIntRec */
71
68
#include "exevents.h"
72
69
#include "exglobals.h"
93
89
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
94
90
swapl(&stuff->window, n);
95
91
swaps(&stuff->count, n);
96
p = (long *) &stuff[1];
97
for (i=0; i<stuff->count; i++)
92
p = (long *)&stuff[1];
93
for (i = 0; i < stuff->count; i++) {
102
return(ProcXChangeDeviceDontPropagateList(client));
97
return (ProcXChangeDeviceDontPropagateList(client));
105
100
/***********************************************************************
112
ProcXChangeDeviceDontPropagateList (client)
113
register ClientPtr client;
117
struct tmask tmp[EMASKSIZE];
118
OtherInputMasks *others;
107
ProcXChangeDeviceDontPropagateList(register ClientPtr client)
111
struct tmask tmp[EMASKSIZE];
112
OtherInputMasks *others;
120
114
REQUEST(xChangeDeviceDontPropagateListReq);
121
115
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
123
if (stuff->length !=(sizeof(xChangeDeviceDontPropagateListReq)>>2) +
126
SendErrorToClient (client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
131
pWin = (WindowPtr) LookupWindow (stuff->window, client);
134
client->errorValue = stuff->window;
135
SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
140
if (stuff->mode != AddToList && stuff->mode != DeleteFromList)
142
client->errorValue = stuff->window;
143
SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
148
if (CreateMaskFromList (client, (XEventClass *)&stuff[1],
149
stuff->count, tmp, NULL, X_ChangeDeviceDontPropagateList) != Success)
117
if (stuff->length != (sizeof(xChangeDeviceDontPropagateListReq) >> 2) +
119
SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
124
pWin = (WindowPtr) LookupWindow(stuff->window, client);
126
client->errorValue = stuff->window;
127
SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
132
if (stuff->mode != AddToList && stuff->mode != DeleteFromList) {
133
client->errorValue = stuff->window;
134
SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
139
if (CreateMaskFromList(client, (XEventClass *) & stuff[1],
140
stuff->count, tmp, NULL,
141
X_ChangeDeviceDontPropagateList) != Success)
152
144
others = wOtherInputMasks(pWin);
153
145
if (!others && stuff->mode == DeleteFromList)
155
for (i=0; i<EMASKSIZE; i++)
147
for (i = 0; i < EMASKSIZE; i++) {
157
148
if (tmp[i].mask == 0)
163
154
tmp[i].mask |= others->dontPropagateMask[i];
165
if (DeviceEventSuppressForWindow (pWin,client,tmp[i].mask,i) != Success)
167
SendErrorToClient ( client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
156
if (DeviceEventSuppressForWindow(pWin, client, tmp[i].mask, i) !=
158
SendErrorToClient(client, IReqCode,
159
X_ChangeDeviceDontPropagateList, 0, BadClass);