[RFC XI 2.1 - xinput 2/3 v2] Zero out entire mask when selecting for different events

Peter Hutterer peter.hutterer at who-t.net
Wed Nov 17 15:43:47 PST 2010


On Wed, Nov 17, 2010 at 10:42:38AM -0500, Chase Douglas wrote:
> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
> ---
>  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);
> -- 
> 1.7.1

merged, thanks.

Cheers,
  Peter


More information about the xorg-devel mailing list