Delta-based scroll events

Alexander Jones alex at
Sat Jul 5 06:58:41 PDT 2008

Hi list

(First time poster here, I hope this is the right list!)

I've recently started using a trackpad, and scrolling with it is
noticeably smoother and easier to control on Mac OS X than it is on my
Ubuntu system.

It seems that scroll events are only done as discrete click events for
buttons 4 and 5 in Xorg. This results in a small amount of motion on
the trackpad giving no response until a certain threshold, when all of
a sudden a large scroll occurs.

I am using the Synaptics touchpad driver, so I had a quick look at the
code. In the HandleState function, it is clear that scrolling events
are handled by figuring out how far the motion has moved in real
terms, exactly the same to regular mouse pointer motion, and then
converting that to a number of scroll events, and then firing button
down-up events on buttons 4 and 5.

So I'm interested in adding support for delta-based scrolling events
that are much more like regular motion events, and then updating
toolkits and applications to handle them.

I saw that the code was using xf86PostMotionEvent for normal motion
events, which itself is a convenience function for a very long and
complicated routine. I don't know if this would be adaptable to
support scrolling events, or even if the X11 protocol supports what I
want (I am a *total* X newbie in case you haven't figured this out by
now :P)

Please let me know your thoughts on this all!

Many thanks


More information about the xorg mailing list