On 03/31/2011 05:29 PM, Chase Douglas wrote:
> Relative valuator values should not be reported in any future events. If
> a relative valuator value is not set in an internal event, set the value
> to 0 for XI 1.x valuator events sent over the wire.
> 
> Signed-off-by: Chase Douglas <[email protected]>
> ---
>  dix/eventconvert.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/dix/eventconvert.c b/dix/eventconvert.c
> index 3285133..088ba98 100644
> --- a/dix/eventconvert.c
> +++ b/dix/eventconvert.c
> @@ -389,8 +389,10 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv)
>          for (j = 0; j < xv->num_valuators; j++) {
>              if (BitIsOn(ev->valuators.mask, xv->first_valuator + j))
>                  valuators[j] = ev->valuators.data[xv->first_valuator + j];
> -            else
> +            else if (dev->valuator->axes[xv->first_valuator + j].mode == 
> Absolute)
>                  valuators[j] = dev->valuator->axisVal[xv->first_valuator + 
> j];
> +            else
> +                valuators[j] = 0;
>          }
>  
>          if (i + 6 < num_valuators)
Seems sane.

Reviewed-by: Simon Thum <[email protected]>

Cheers,

Simon
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to