Smooth scrolling
Peter Hutterer
peter.hutterer at who-t.net
Wed Apr 7 16:42:00 PDT 2010
On Wed, Apr 07, 2010 at 11:46:49PM +0200, Éric Piel wrote:
> Op 07-04-10 20:30, Max Schwarz schreef:
> > Am Mittwoch 07 April 2010 16:13:09 schrieben Sie:
> >> First, you could have one factor which governs how many valuator scroll
> >> steps are needed to trigger one button scroll event, as discussed above.
> >> This would need to be enforced by the driver. If a mouse is clicky, it
> >> may be 1 or the driver would multiply it to match some target value like
> >> 100. The main question is whether apps need to or shouldn't know that
> >> factor. I think that's what Eric meant.
> > Eric wanted to scale the reported valuator value so that it is in relative
> > units to the old clicks, if I understood correctly.
> What I wanted to say is that there is a need for an _official_ value of
> how much is a click in this new (almost) continue space. Otherwise we
> might end up with drivers saying that a click is 20u, other drivers
> converting it to 33u, and others to 100u.
evdev uses a 1:1 mapping from REL_WHEEL, user-configured for wheel
emulation. synaptics has it user-configurable for wheel emulation.
for evdev, just applying some velocity calculation and adjusting the number
of clicks accordingly may be helpful already. Right now, if you scroll 1,
1, 1, 1 that looks the same to the client as if you scroll 2, 2. Arguably,
the latter one is faster and should result in more scrolling.
for now, rather than worrying about the mapping I'd try out how far you can
get with this approach alone and look at the results. for evdev, the code is
in EvdevProcessRelativeMotionEvent().
just my 1.8568 cents.
Cheers,
Peter
More information about the xorg-devel
mailing list