Add a few comments to ProcXGrabDevice.
This commit is contained in:
parent
9e257029c7
commit
5dee64fc99
13
Xi/grabdev.c
13
Xi/grabdev.c
|
@ -160,8 +160,19 @@ ProcXGrabDevice(ClientPtr client)
|
||||||
* get the device. Then run through all available event indices (those are
|
* get the device. Then run through all available event indices (those are
|
||||||
* set when XI starts up) and binary OR's the device's mask to whatever the
|
* set when XI starts up) and binary OR's the device's mask to whatever the
|
||||||
* event mask for the given event type was.
|
* event mask for the given event type was.
|
||||||
|
* If an error occurs, it is sent to the client. Errors are generated if
|
||||||
|
* - if the device given in the event classs is invalid
|
||||||
|
* - if the device in the class list is not the device given as parameter (no
|
||||||
|
* error if parameter is NULL)
|
||||||
*
|
*
|
||||||
* mask has to be size EMASKSIZE and pre-allocated.
|
* mask has to be size EMASKSIZE and pre-allocated.
|
||||||
|
*
|
||||||
|
* @param client The client to send the error to (if one occurs)
|
||||||
|
* @param list List of event classes as sent from the client.
|
||||||
|
* @param count Number of elements in list.
|
||||||
|
* @param mask Preallocated mask (size EMASKSIZE).
|
||||||
|
* @param dev The device we're creating masks for.
|
||||||
|
* @param req The request we're processing. Used to fill in error fields.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -179,7 +190,7 @@ CreateMaskFromList(ClientPtr client, XEventClass * list, int count,
|
||||||
|
|
||||||
for (i = 0; i < count; i++, list++) {
|
for (i = 0; i < count; i++, list++) {
|
||||||
device = *list >> 8;
|
device = *list >> 8;
|
||||||
if (device > 255) {
|
if (device > 255) { /* FIXME: we only use 7 bit for devices? */
|
||||||
SendErrorToClient(client, IReqCode, req, 0, BadClass);
|
SendErrorToClient(client, IReqCode, req, 0, BadClass);
|
||||||
return BadClass;
|
return BadClass;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue