[PATCH] dix: allow a ConstantDeceleration between 0 and 1 (#66134)

Simon Thum simon.thum at gmx.de
Sat Jul 27 11:37:59 PDT 2013


Hi Peter,

finally some time for this ;)

In general I'm fine but I think this duplicates the affine transform 
matrix already present. The old limit was chosen to avoid difficulties 
that are no longer present with Daniel's double valuators, so it is not 
a problem in itself, just a duplication.

So I'm not against it but not a big supporter too. I didn't check if you 
already pushed this, maybe you want to reconsider if not.

Cheers,

Simon


On 07/15/2013 05:15 AM, Peter Hutterer wrote:
> A constant deceleration of x simply means (delta * 1/x). We limited that to
> values >= 1.0f for obvious reasons, but can also allow values from 0-1.
> That means that ConstantDeceleration is actually a ConstantAcceleration, but
> hey, if someone needs it...
>
> X.Org Bug 66134 <http://bugs.freedesktop.org/show_bug.cgi?id=66134>
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>   dix/ptrveloc.c               | 5 ++---
>   hw/xfree86/man/xorg.conf.man | 3 ++-
>   2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
> index d6fef9c..e75300a 100644
> --- a/dix/ptrveloc.c
> +++ b/dix/ptrveloc.c
> @@ -245,11 +245,10 @@ AccelSetDecelProperty(DeviceIntPtr dev, Atom atom,
>       if (checkOnly) {
>           if (rc)
>               return rc;
> -        return (v >= 1.0f) ? Success : BadValue;
> +        return (v > 0) ? Success : BadValue;
>       }
>
> -    if (v >= 1.0f)
> -        vel->const_acceleration = 1 / v;
> +    vel->const_acceleration = 1 / v;
>
>       return Success;
>   }
> diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man
> index 67d8594..fa5b5fe 100644
> --- a/hw/xfree86/man/xorg.conf.man
> +++ b/hw/xfree86/man/xorg.conf.man
> @@ -972,7 +972,8 @@ is constructed. This is mainly a matter of personal preference.
>   .BI "Option \*qConstantDeceleration\*q  \*q" real \*q
>   Makes the pointer go
>   .B deceleration
> -times slower than normal. Most useful for high-resolution devices.
> +times slower than normal. Most useful for high-resolution devices. A value
> +between 0 and 1 will speed up the pointer.
>   .TP 7
>   .BI "Option \*qAdaptiveDeceleration\*q  \*q" real \*q
>   Allows to actually decelerate the pointer when going slow. At most, it will be
>



More information about the xorg-devel mailing list