[PATCH] dix: fix up valuators passed to acceleration code.

Simon Thum simon.thum at gmx.de
Sun Nov 21 12:56:01 PST 2010


Hi Peter,

the patch makes sense and should probably be applied. It just doesn't
work for me, i.e. acceleration is off. I'm unsure why, perhaps it's an
unrelated problem. So if it doesn't break your stuff, please apply.

On 11/19/2010 02:09 AM, Peter Hutterer wrote:
> From: Simon Thum <simon.thum at gmx.de>
> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> Simon, this is essentially your patch with the extra if () addded.
> 
>  dix/getevents.c |    9 +++++++--
>  1 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/dix/getevents.c b/dix/getevents.c
> index 9553728..7af9326 100644
> --- a/dix/getevents.c
> +++ b/dix/getevents.c
> @@ -1155,11 +1155,16 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
>               * should be converted to masked valuators. */
>              int vals[2];
>              vals[0] = valuator_mask_isset(&mask, 0) ?
> -                      valuator_mask_get(&mask, 0) : pDev->last.valuators[0];
> +                      valuator_mask_get(&mask, 0) : 0;
>              vals[1] = valuator_mask_isset(&mask, 1) ?
> -                      valuator_mask_get(&mask, 1) : pDev->last.valuators[1];
> +                      valuator_mask_get(&mask, 1) : 0;
>              accelPointer(pDev, 0, 2, vals, ms);
>  
> +            if (valuator_mask_isset(&mask, 0))
> +                valuator_mask_set(&mask, 0, vals[0]);
> +            if (valuator_mask_isset(&mask, 1))
> +                valuator_mask_set(&mask, 1, vals[1]);
> +
>              /* The pointer acceleration code modifies the fractional part
>               * in-place, so we need to extract this information first */
>              x_frac = pDev->last.remainder[0];



More information about the xorg-devel mailing list