Smooth scrolling

Peter Hutterer peter.hutterer at who-t.net
Mon May 3 19:12:55 PDT 2010


On Fri, Apr 30, 2010 at 01:17:42PM +0200, Max Schwarz wrote:
> > not really, all valuators sent to the clients are always absolute (with the
> > exception of the ones in RawEvents). so even though the driver posts events
> > as relative, they're just added to the current value and sent as absolute
> > anyway.
> What's the point of relative valuators on the driver-side then?
> Seems over-complicated to me.

some devices only have relative valuators. for a mouse it's a lot easier to
just post -1/-1 than trying to figure out what the current pointer position
is (given pointer acceleration, clipping, etc.)

> I could listen to RawEvents, but those are only sent to root windows, which 
> makes checking if they are meant for my window a little tricky.
> 
> Do you think it is easier to modify Xorg itself to send relative events or 
> should I interpret the absolute values on the client side? Overflow detection 
> is possible, but not very nice as the values are doubles...
> Clearly, the right way would be to report relative events.
> I will start looking into Xorg where this addition of relative events takes 
> place.

to get relative valuators into events you'd have to bump the XI2 protocol
and add it to the events. that isn't that hard per se, but quite a fair bit
of work.

I guess one approach might be to add the relative valuators (for applicable
axes) after the valuator data to the XIDeviceEvents. that scales and is
compatible to the current protocol.

Cheers,
  Peter


More information about the xorg-devel mailing list