Smooth scrolling again

Simon Thum simon.thum at gmx.de
Wed Nov 17 14:55:20 PST 2010


On 11/14/10 22:52, Peter Hutterer wrote:
> On Sun, Nov 14, 2010 at 06:51:43PM +0100, Max Schwarz wrote:
>>>> Are the drivers "allowed" to access the valuator structure
>>>> (e.g. dev->valuator->axis[0].resolution = XY) or should I implement
>>>> wrapper functions in the server to do that?
>>>
>>> It depends on whether the server can operate properly without wrappers,
>>> i.e. whether some complex state needs wrangling. In that particular
>>> case, I'm leaning slightly towards wrapping.
>> That would mean something like
>> xf86SetValuatorAxisResolution(DeviceIntPtr dev, int axnum, int min, int max, 
>> int current)?
>> This method could directly send out the DeviceChangedEvent. Would that still 
>> be a layer violation?
>> I'll add that to my patch in the next days.
> 
> if possible, wrap it. it's much easier to work around issues than when each
> driver just mangles the struct directly. But I don't think you need a new
> call here, just re-using the existing InitValuatorAxisStruct should do.
Srsly?

I mean, that's initialization. Sure, git also has non/destructive
initialization, but I'd rather have wrapped calls which optionally send
events. That way one might also suppress superfluous events generated
when modifying multiple axes.

Cheers,

Simon


More information about the xorg-devel mailing list