Ptr accel API changes

Simon Thum simon.thum at gmx.de
Sat Jun 20 10:09:39 PDT 2009


Peter Hutterer wrote:
> 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? :)
See attached synaptics patch (POC code only!). The driver provides its 
own function to implement the pressure-related acceleration feature, 
which I think is worth the sweat.

Without the API change, it would be hard to do this properly because 
it's hard to infer the device from a DeviceVelocityPtr alone. (Ok, I'm 
yet to see a 2-synaptics-pads-box, but you get the point.)

Also, now a driver can create own accel contexts, e.g. to accelerate 
scrolling or other independent axes. (I could have before but it would 
be unnecessarily verbose).

> 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).
That's what the patch also does. Or, does try to, at least.

> 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.
I was merely aligning to what I found; I'm not a great supporter of that 
hungarian notation thingy either. Anyway, your wishes have come true 
(for ptrveloc, at least :)

Cheers,

Simon


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Setup-dix-pointer-acceleration-from-synaptics.patch
Url: http://lists.x.org/archives/xorg-devel/attachments/20090620/738adb44/attachment-0001.ksh 


More information about the xorg-devel mailing list