Lines Matching refs:stuff
58 swaps(&stuff->length, n);
59 swaps(&stuff->deviceid, n);
60 swapl(&stuff->grab_window, n);
61 swapl(&stuff->cursor, n);
62 swapl(&stuff->time, n);
63 swapl(&stuff->detail, n);
64 swaps(&stuff->mask_len, n);
65 swaps(&stuff->num_modifiers, n);
68 ((uint32_t) stuff->mask_len + stuff->num_modifiers) *4);
69 mods = (xXIModifierInfo*)&stuff[1];
71 for (i = 0; i < stuff->num_modifiers; i++, mods++)
99 ((uint32_t) stuff->mask_len + stuff->num_modifiers) * 4);
101 if (stuff->deviceid == XIAllDevices)
103 else if (stuff->deviceid == XIAllMasterDevices)
107 ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess);
110 client->errorValue = stuff->deviceid;
115 if (stuff->grab_type != XIGrabtypeButton &&
116 stuff->grab_type != XIGrabtypeKeycode &&
117 stuff->grab_type != XIGrabtypeEnter &&
118 stuff->grab_type != XIGrabtypeFocusIn)
120 client->errorValue = stuff->grab_type;
124 if ((stuff->grab_type == XIGrabtypeEnter ||
125 stuff->grab_type == XIGrabtypeFocusIn) && stuff->detail != 0)
127 client->errorValue = stuff->detail;
131 if (XICheckInvalidMaskBits(client, (unsigned char*)&stuff[1],
132 stuff->mask_len * 4) != Success)
135 mask_len = min(sizeof(mask.xi2mask[stuff->deviceid]), stuff->mask_len * 4);
137 memcpy(mask.xi2mask[stuff->deviceid], &stuff[1], mask_len * 4);
147 param.ownerEvents = stuff->owner_events;
148 param.grabWindow = stuff->grab_window;
149 param.cursor = stuff->cursor;
152 param.this_device_mode = stuff->grab_mode;
153 param.other_devices_mode = stuff->paired_device_mode;
155 param.this_device_mode = stuff->paired_device_mode;
156 param.other_devices_mode = stuff->grab_mode;
159 if (stuff->cursor != None)
161 status = dixLookupResourceByType(&tmp, stuff->cursor,
165 client->errorValue = stuff->cursor;
170 status = dixLookupWindow((WindowPtr*)&tmp, stuff->grab_window, client, DixSetAttrAccess);
178 modifiers = (uint32_t*)&stuff[1] + stuff->mask_len;
179 modifiers_failed = calloc(stuff->num_modifiers, sizeof(xXIGrabModifierInfo));
188 for (i = 0; i < stuff->num_modifiers; i++, modifiers++)
191 switch(stuff->grab_type)
194 status = GrabButton(client, dev, mod_dev, stuff->detail,
198 status = GrabKey(client, dev, mod_dev, stuff->detail,
203 status = GrabWindow(client, dev, stuff->grab_type,
255 swaps(&stuff->length, n);
256 swapl(&stuff->grab_window, n);
257 swaps(&stuff->deviceid, n);
258 swapl(&stuff->detail, n);
259 swaps(&stuff->num_modifiers, n);
262 ((uint32_t) stuff->num_modifiers) << 2);
263 modifiers = (uint32_t*)&stuff[1];
265 for (i = 0; i < stuff->num_modifiers; i++, modifiers++)
282 ((uint32_t) stuff->num_modifiers) << 2);
284 if (stuff->deviceid == XIAllDevices)
286 else if (stuff->deviceid == XIAllMasterDevices)
290 rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess);
295 if (stuff->grab_type != XIGrabtypeButton &&
296 stuff->grab_type != XIGrabtypeKeycode &&
297 stuff->grab_type != XIGrabtypeEnter &&
298 stuff->grab_type != XIGrabtypeFocusIn)
300 client->errorValue = stuff->grab_type;
304 if ((stuff->grab_type == XIGrabtypeEnter ||
305 stuff->grab_type == XIGrabtypeFocusIn) && stuff->detail != 0)
307 client->errorValue = stuff->detail;
311 rc = dixLookupWindow(&win, stuff->grab_window, client, DixSetAttrAccess);
323 switch(stuff->grab_type)
333 tempGrab.detail.exact = stuff->detail;
336 modifiers = (uint32_t*)&stuff[1];
338 for (i = 0; i < stuff->num_modifiers; i++, modifiers++)