diff options
Diffstat (limited to 'src/XISelEv.c')
-rw-r--r-- | src/XISelEv.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/XISelEv.c b/src/XISelEv.c index fa7eb54..f871222 100644 --- a/src/XISelEv.c +++ b/src/XISelEv.c @@ -135,8 +135,14 @@ XIGetSelectedEvents(Display* dpy, Window win, int *num_masks_return) _XRead(dpy, (char*)mask_in, reply.length * 4); - /* Memory layout of the XIEventMask for a 3 mask reply: - * [struct a][struct b][struct c][masks a][masks b][masks c] + /* + * This function takes interleaved xXIEventMask structs & masks off + * the wire, such as this 3 mask reply: + * [struct a][masks a][struct b][masks b][struct c][masks c] + * And generates a memory buffer to be returned to callers in which + * they are not interleaved, so that callers can treat the returned + * pointer as a simple array of XIEventMask structs, such as: + * [struct a][struct b][struct c][masks a][masks b][masks c] */ len = reply.num_masks * sizeof(XIEventMask); |