[PATCH 2/2 xf86-input-evdev] Ensure all known valuator values are stored when out of proximity

Peter Hutterer peter.hutterer at who-t.net
Mon Apr 4 20:50:02 PDT 2011


On Mon, Apr 04, 2011 at 09:40:14AM -0400, Chase Douglas wrote:
> The current code overwrites *all* the stored axis values with whatever
> came in from evdev. Evdev is a stateful protocol, so it only sends us
> updates to the axis values that have changed. We need to only update
> the values that have changed.
> 
> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
> ---
>  src/evdev.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/src/evdev.c b/src/evdev.c
> index 9cf6fae..b767b0e 100644
> --- a/src/evdev.c
> +++ b/src/evdev.c
> @@ -504,7 +504,10 @@ EvdevProcessProximityState(InputInfoPtr pInfo)
>      if (!pEvdev->prox_queued)
>      {
>          if (pEvdev->abs_queued && !pEvdev->in_proximity)
> -            valuator_mask_copy(pEvdev->prox, pEvdev->vals);
> +            for (i = 0; i < valuator_mask_size(pEvdev->vals); i++)
> +                if (valuator_mask_isset(pEvdev->vals, i))
> +                    valuator_mask_set(pEvdev->prox, i,
> +                                      valuator_mask_get(pEvdev->vals, i));
>          return 0;
>      }
>  
> -- 
> 1.7.4.1

both applied, thanks.

Cheers,
  Peter


More information about the xorg-devel mailing list