Ptr accel API changes

Peter Hutterer peter.hutterer at who-t.net
Wed Jun 17 17:23:39 PDT 2009


On Sat, Jun 06, 2009 at 03:45:13PM +0200, Simon Thum wrote:
> I would like to see the first of the attached patches in the server  
> before 1.7 is branched. This is to have the accel API be sensible enough  
> to finally solve the synaptics-and-acceleration problem hiding in its  
> corner since the jura, approximately. The synaptics accel code (or the  
> driver as a whole) could be depending on 1.7 then, so this has my 
> priority.

can you give an example of how this would be used in the driver? Will the
driver provide it's custom acceleration function or just rely on the server?
If the former, why not the latter? :)

right now, the server provides a couple of options to configure pointer
acceleration on a per-device basis. Why can't we set these options in the
driver to something resembling sensible defaults (IIRC synaptics requires
constant deceleration of at least 3 or so, it'd be a single line to add this
to the driver).

> From db032cde079725e7f650776fc110a6edcb8c9bf2 Mon Sep 17 00:00:00 2001
> From: Simon Thum <simon.thum at gmx.de>
> Date: Sat, 6 Jun 2009 14:49:43 +0200
> Subject: [PATCH] dix: improve pointer acceleration API
> 
> This makes the ptr accel api actually sensible from a driver
> perspective, since the device is now a parameter of the
> device-specific accel callback.
> ---
>  dix/ptrveloc.c     |   40 +++++++++++++++++++++++++++-------------
>  include/ptrveloc.h |   14 ++++++++++++--
>  2 files changed, 39 insertions(+), 15 deletions(-)
> 
> diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
> index dd26477..8b9b065 100644
> --- a/dix/ptrveloc.c
> +++ b/dix/ptrveloc.c
> @@ -63,7 +63,7 @@
>  int
>  SetAccelerationProfile(DeviceVelocityPtr s, int profile_num);
>  static float
> -SimpleSmoothProfile(DeviceVelocityPtr pVel, float velocity,
> +SimpleSmoothProfile(DeviceIntPtr pDev, DeviceVelocityPtr pVel, float velocity,

I wish we could get rid of the pDev and pVel and pSomething and just use
dev, vel, and something instead. (I know, I'm guilty of that myself)
same goes for the rest of the patch.

Cheers,
  Peter


More information about the xorg-devel mailing list