Delta-based scroll events

Peter Hutterer peter.hutterer at who-t.net
Sun Jul 6 05:32:15 PDT 2008


On Sat, Jul 05, 2008 at 02:58:41PM +0100, Alexander Jones wrote:
> 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)

true scrolling events are nothing but events on axes other than x/y. the X
server doesn't really care what the semantics are (i.e. scrolling). And here
is where the actual issue lies, there is no standard. The third axis is
generally assumed to be pressure, beyond that it's anyone's guess. IIRC we
support up to 32 axes per device, but the main issue is to know which axis
does what.

and of course - fixing this in X is only one step, you'll then have to go into
every toolkit and fix it there as well. It's not an overnight project,
unfortunately.

Cheers,
  Peter



More information about the xorg mailing list