diff options
author | Chase Douglas <chase.douglas@canonical.com> | 2010-11-17 10:42:38 -0500 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-11-18 09:43:34 +1000 |
commit | 72c6ec92dcb647dbd7930f4fc3e60b1868f1a225 (patch) | |
tree | 4d873d8157610be24e55f5fab0a1564d0bdcd844 /src | |
parent | 746d437b60662b6da62af8dbd38f594a896b1db5 (diff) |
Zero out entire mask when selecting for different events
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/test_xi2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test_xi2.c b/src/test_xi2.c index fea36a8..5b56397 100644 --- a/src/test_xi2.c +++ b/src/test_xi2.c @@ -324,7 +324,7 @@ test_xi2(Display *display, int nmods = sizeof(modifiers)/sizeof(modifiers[0]); mask.deviceid = 2; - memset(mask.mask, 0, 2); + memset(mask.mask, 0, mask.mask_len); XISetMask(mask.mask, XI_KeyPress); XISetMask(mask.mask, XI_KeyRelease); XISetMask(mask.mask, XI_ButtonPress); @@ -339,7 +339,7 @@ test_xi2(Display *display, } mask.deviceid = XIAllMasterDevices; - memset(mask.mask, 0, 2); + memset(mask.mask, 0, mask.mask_len); XISetMask(mask.mask, XI_RawKeyPress); XISetMask(mask.mask, XI_RawKeyRelease); XISetMask(mask.mask, XI_RawButtonPress); |