[PATCH libXi] Fill in mods/group->effective in XIQueryPointer()

Peter Hutterer peter.hutterer at who-t.net
Mon Jan 24 17:13:40 PST 2011


On Mon, Jan 24, 2011 at 12:35:04PM +0100, carlosg at gnome.org wrote:
> From: Carlos Garnacho <carlosg at gnome.org>
> 
> the other XIModifierState/XIGroupState fields are being set correctly,
> but the "effective" field was being left as undefined memory.
> ---
>  src/XIQueryPointer.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/src/XIQueryPointer.c b/src/XIQueryPointer.c
> index b3bfebc..e068a97 100644
> --- a/src/XIQueryPointer.c
> +++ b/src/XIQueryPointer.c
> @@ -86,9 +86,12 @@ XIQueryPointer(Display     *dpy,
>      mods->base          = rep.mods.base_mods;
>      mods->latched       = rep.mods.latched_mods;
>      mods->locked        = rep.mods.locked_mods;
> +    mods->effective     = mods->base | mods->latched | mods->locked;
> +
>      group->base         = rep.group.base_group;
>      group->latched      = rep.group.latched_group;
>      group->locked       = rep.group.locked_group;
> +    group->effective    = group->base | group->latched | group->locked;
>  
>      buttons->mask_len   = rep.buttons_len * 4;
>      buttons->mask       = malloc(buttons->mask_len);
> -- 
> 1.7.3.4
 
ooops. applied, can you send me your Signed-off-by please though.
 
Cheers,
  Peter


More information about the xorg-devel mailing list