xserver: Branch 'mpx'
Peter Hutterer
whot at kemper.freedesktop.org
Tue Jun 19 00:52:10 PDT 2007
Xi/grabdev.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletion(-)
New commits:
diff-tree 5dee64fc99f34e091abce65d47c4b6f026ab4849 (from 9e257029c760883c4ea0715d4fd06476f3fe8053)
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date: Tue Jun 19 11:31:22 2007 +0930
Add a few comments to ProcXGrabDevice.
diff --git a/Xi/grabdev.c b/Xi/grabdev.c
index f3349ba..f2227bc 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, XEv
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;
}
More information about the xorg-commit
mailing list