[PATCH dix] dix: Added a "flat" acceleration profile that provides a linear pointer response.
Simon Thum
simon.thum at gmx.de
Tue Mar 29 04:56:12 PDT 2011
Hi Orhan,
I don't have much problems with the patch as-is, except that a
corresponding xorg.conf man page entry should be added.
The bigger problem is that I don't even like to have
ConstantDeceleration within the accel code, so adding scaling as a "flat
profile" is making the mess worse.
What I'd like to see are input transformation matrices as recently
discussed (or similar). See
http://lists.freedesktop.org/archives/xorg-devel/2011-March/020680.html
for my input on peter's request.
This would solve the problem as a side-effect, and allow for much more.
I mean, why would scaling/sensitivity "be" a single profile, and not be
available as an add-on to all profiles?
It's technically correct, and I welcome people to patch it into distros,
but for master I'd prefer a conceptually clean solution. But if it turns
out there's no support for the concept as described, we should probably
add it to master (given you provide a man page entry).
Cheers,
Simon
On 03/28/2011 08:34 PM, Orhan Kavrakoglu wrote:
> From: Orhan Kavrakoğlu <aibok42 at gmail.com>
>
> This profile disables pointer acceleration in the conventional sense
> yet still allows one to adjust sensitivity using the "acceleration"
> control.
>
> Signed-off-by: Orhan Kavrakoğlu <aibok42 at gmail.com>
> ---
> dix/ptrveloc.c | 13 +++++++++++++
> include/ptrveloc.h | 3 ++-
> 2 files changed, 15 insertions(+), 1 deletions(-)
>
> diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
> index ccd445e..2349c11 100644
> --- a/dix/ptrveloc.c
> +++ b/dix/ptrveloc.c
> @@ -953,6 +953,17 @@ NoProfile(
> return 1.0f;
> }
>
> +static float
> +FlatProfile(
> + DeviceIntPtr dev,
> + DeviceVelocityPtr vel,
> + float velocity,
> + float threshold,
> + float acc)
> +{
> + return acc;
> +}
> +
> static PointerAccelerationProfileFunc
> GetAccelerationProfile(
> DeviceVelocityPtr vel,
> @@ -977,6 +988,8 @@ GetAccelerationProfile(
> return SmoothLimitedProfile;
> case AccelProfileNone:
> return NoProfile;
> + case AccelProfileFlat:
> + return FlatProfile;
> default:
> return NULL;
> }
> diff --git a/include/ptrveloc.h b/include/ptrveloc.h
> index c14e12d..151dcf2 100644
> --- a/include/ptrveloc.h
> +++ b/include/ptrveloc.h
> @@ -38,7 +38,8 @@
> #define AccelProfilePower 5
> #define AccelProfileLinear 6
> #define AccelProfileSmoothLimited 7
> -#define AccelProfileLAST AccelProfileSmoothLimited
> +#define AccelProfileFlat 8
> +#define AccelProfileLAST AccelProfileFlat
>
> /* fwd */
> struct _DeviceVelocityRec;
More information about the xorg-devel
mailing list