Add a few comments to ProcXGrabDevice.

This commit is contained in:
Peter Hutterer 2007-06-19 11:31:22 +09:30
parent 9e257029c7
commit 5dee64fc99

View File

@ -160,8 +160,19 @@ ProcXGrabDevice(ClientPtr client)
* 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
* 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.
*
* @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
@ -179,7 +190,7 @@ CreateMaskFromList(ClientPtr client, XEventClass * list, int count,
for (i = 0; i < count; i++, list++) {
device = *list >> 8;
if (device > 255) {
if (device > 255) { /* FIXME: we only use 7 bit for devices? */
SendErrorToClient(client, IReqCode, req, 0, BadClass);
return BadClass;
}