Lines Matching refs:stuff

58     swaps(&stuff->length);
59 swaps(&stuff->deviceid);
60 swapl(&stuff->grab_window);
61 swapl(&stuff->cursor);
62 swapl(&stuff->time);
63 swapl(&stuff->detail);
64 swaps(&stuff->mask_len);
65 swaps(&stuff->num_modifiers);
68 ((uint32_t) stuff->mask_len + stuff->num_modifiers) *4);
69 mods = (uint32_t *) &stuff[1] + stuff->mask_len;
71 for (i = 0; i < stuff->num_modifiers; i++, mods++) {
100 ((uint32_t) stuff->mask_len + stuff->num_modifiers) * 4);
102 if (stuff->deviceid == XIAllDevices)
104 else if (stuff->deviceid == XIAllMasterDevices)
107 ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess);
109 client->errorValue = stuff->deviceid;
114 if (stuff->grab_type != XIGrabtypeButton &&
115 stuff->grab_type != XIGrabtypeKeycode &&
116 stuff->grab_type != XIGrabtypeEnter &&
117 stuff->grab_type != XIGrabtypeFocusIn &&
118 stuff->grab_type != XIGrabtypeTouchBegin &&
119 stuff->grab_type != XIGrabtypeGesturePinchBegin &&
120 stuff->grab_type != XIGrabtypeGestureSwipeBegin) {
121 client->errorValue = stuff->grab_type;
125 if ((stuff->grab_type == XIGrabtypeEnter ||
126 stuff->grab_type == XIGrabtypeFocusIn ||
127 stuff->grab_type == XIGrabtypeTouchBegin ||
128 stuff->grab_type == XIGrabtypeGesturePinchBegin ||
129 stuff->grab_type == XIGrabtypeGestureSwipeBegin) && stuff->detail != 0) {
130 client->errorValue = stuff->detail;
134 if (stuff->grab_type == XIGrabtypeTouchBegin &&
135 (stuff->grab_mode != XIGrabModeTouch ||
136 stuff->paired_device_mode != GrabModeAsync)) {
137 client->errorValue = stuff->grab_mode;
144 if (stuff->detail > 255)
147 if (XICheckInvalidMaskBits(client, (unsigned char *) &stuff[1],
148 stuff->mask_len * 4) != Success)
155 mask_len = min(xi2mask_mask_size(mask.xi2mask), stuff->mask_len * 4);
156 xi2mask_set_one_mask(mask.xi2mask, stuff->deviceid,
157 (unsigned char *) &stuff[1], mask_len * 4);
161 param.ownerEvents = stuff->owner_events;
162 param.grabWindow = stuff->grab_window;
163 param.cursor = stuff->cursor;
166 param.this_device_mode = stuff->grab_mode;
167 param.other_devices_mode = stuff->paired_device_mode;
170 param.this_device_mode = stuff->paired_device_mode;
171 param.other_devices_mode = stuff->grab_mode;
174 if (stuff->cursor != None) {
175 ret = dixLookupResourceByType(&tmp, stuff->cursor,
178 client->errorValue = stuff->cursor;
184 dixLookupWindow((WindowPtr *) &tmp, stuff->grab_window, client,
193 modifiers = (uint32_t *) &stuff[1] + stuff->mask_len;
195 calloc(stuff->num_modifiers, sizeof(xXIGrabModifierInfo));
203 for (i = 0; i < stuff->num_modifiers; i++, modifiers++) {
211 switch (stuff->grab_type) {
213 status = GrabButton(client, dev, mod_dev, stuff->detail,
217 status = GrabKey(client, dev, mod_dev, stuff->detail,
222 status = GrabWindow(client, dev, stuff->grab_type, &param, &mask);
283 swaps(&stuff->length);
284 swapl(&stuff->grab_window);
285 swaps(&stuff->deviceid);
286 swapl(&stuff->detail);
287 swaps(&stuff->num_modifiers);
290 ((uint32_t) stuff->num_modifiers) << 2);
291 modifiers = (uint32_t *) &stuff[1];
293 for (i = 0; i < stuff->num_modifiers; i++, modifiers++)
310 ((uint32_t) stuff->num_modifiers) << 2);
312 if (stuff->deviceid == XIAllDevices)
314 else if (stuff->deviceid == XIAllMasterDevices)
317 rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess);
322 if (stuff->grab_type != XIGrabtypeButton &&
323 stuff->grab_type != XIGrabtypeKeycode &&
324 stuff->grab_type != XIGrabtypeEnter &&
325 stuff->grab_type != XIGrabtypeFocusIn &&
326 stuff->grab_type != XIGrabtypeTouchBegin &&
327 stuff->grab_type != XIGrabtypeGesturePinchBegin &&
328 stuff->grab_type != XIGrabtypeGestureSwipeBegin) {
329 client->errorValue = stuff->grab_type;
333 if ((stuff->grab_type == XIGrabtypeEnter ||
334 stuff->grab_type == XIGrabtypeFocusIn ||
335 stuff->grab_type == XIGrabtypeTouchBegin) && stuff->detail != 0) {
336 client->errorValue = stuff->detail;
341 if (stuff->detail > 255) {
342 client->errorValue = stuff->detail;
346 rc = dixLookupWindow(&win, stuff->grab_window, client, DixSetAttrAccess);
359 switch (stuff->grab_type) {
385 tempGrab->detail.exact = stuff->detail;
388 modifiers = (uint32_t *) &stuff[1];
390 for (i = 0; i < stuff->num_modifiers; i++, modifiers++) {