diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-06-19 11:31:22 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-06-19 11:31:22 +0930 |
commit | 5dee64fc99f34e091abce65d47c4b6f026ab4849 (patch) | |
tree | abd356ce806025198a1ff7d1c92cf832e2099311 /Xi | |
parent | 9e257029c760883c4ea0715d4fd06476f3fe8053 (diff) |
Add a few comments to ProcXGrabDevice.
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/grabdev.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Xi/grabdev.c b/Xi/grabdev.c index f3349ba8c..f2227bcf1 100644 --- a/Xi/grabdev.c +++ b/Xi/grabdev.c @@ -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; } |