Smooth scrolling again

Simon Thum simon.thum at gmx.de
Mon Nov 8 13:39:02 PST 2010


On 11/07/10 18:03, Max Schwarz wrote:
> Hi Simon,
> 
>> A thing I'm
>> missing is how you're establishing the relationship of smooth and button
>> scrolling? It might just be me since I'm only looking at the diffs.
> It's certainly subtle ;-)
> Look at EvdevProcessRelativeMotionEvent().
> In case of a change on REL_(H)WHEEL the clicks are queued and "value" is 
> multiplied by the current resolution, which is 42 if mouse wheel emulation is 
> enabled, and 1 otherwise. The mouse wheel emulation code just injects the raw 
> values from the axes.
> The toolkit-space code interprets the valuator resolution as ticks per old-
> style scroll button click, e.g.
> float clicks = event_value / resolution;
That sounds fine. But how are button events being generated which match
a potential only-smooth-scrolling input?

>> A minor objection is that the evdev wheel resolution is not
>> axis-dependent. This may (or may not) be a problem.
> Well, it was not handled differently up to this point (same count of clicks 
> emitted for both directions).
It's certainly an easy fix should it bubble up.

> 
>> Also minor: axes seem to gain a mode (rel/abs), maybe we can make that
>> (rel/abs/non-integrating rel)?
> You want that distinction in the server? That would require more changes, 
> since non-integrating valuators would need to be handled the same as relative 
> valuators in most contexts.
True, though negligible for bit-flag based modes.

> Something that I just thought of: Runtime-changing of the resolution is not 
> really supported right now. You can change the property, but the resolution 
> field of the valuator is not updated, and no XIDeviceChanged events are sent to 
> clients...
> That would definitely be needed for fine-tuning the wheel resolution (= scroll 
> speed).
We have axis labels ( = properties + some shi shi), why not use
properties to communicate the axis resolution? It seems that the axis
resolution field is well-intentioned, but hasn't actually been used.

Cheers,

Simon


More information about the xorg-devel mailing list