diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-05-25 13:55:17 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-05-25 14:58:08 +1000 |
commit | b377994336c978875dd786f4a4a9ef2e7b20e32c (patch) | |
tree | aff868bbec67d25ceb2d875d5e83521a9586026a /Xi/xiselectev.c | |
parent | b395da91c531d633ec47bb5a51e361d321663a3a (diff) |
Xi: advance by the right number of bytes when trawling XI2 event masks.
The wire layout is [struct xXIEventMask][mask bytes]. So the pointer needs
to not only be advanced by the mask bytes, but also by the size of the
struct.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi/xiselectev.c')
-rw-r--r-- | Xi/xiselectev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c index 73097736e..561618244 100644 --- a/Xi/xiselectev.c +++ b/Xi/xiselectev.c @@ -103,6 +103,7 @@ ProcXISelectEvent(ClientPtr client) } evmask = (xXIEventMask*)(((unsigned char*)evmask) + evmask->mask_len * 4); + evmask++; } /* Set masks on window */ @@ -119,6 +120,7 @@ ProcXISelectEvent(ClientPtr client) dixLookupDevice(&dev, evmask->deviceid, client, DixReadAccess); XISetEventMask(dev, win, client, evmask->mask_len * 4, (unsigned char*)&evmask[1]); evmask = (xXIEventMask*)(((unsigned char*)evmask) + evmask->mask_len * 4); + evmask++; } RecalculateDeliverableEvents(win); |