Smooth scrolling and button emulation
Peter Hutterer
peter.hutterer at who-t.net
Thu Oct 4 21:26:13 PDT 2012
On Thu, Oct 04, 2012 at 01:16:35PM +0200, Michal Suchanek wrote:
> Hello,
>
> On 4 October 2012 11:23, Sascha Hlusiak <saschahlusiak at arcor.de> wrote:
>
> >> I'm not sure what you mean by "Followed by smooth scrolling". Once you
> >> enable smooth scrolling, you don't send button 4/5 presses anymore, only
> >> the valuator events. the rest is handled in the server. are you still
> >> setting button events as well?
> > I am not sending button events as well. When the axis is first deflected, I
> > send out exactly one unit (value 100 in my example) to force immediate
> > emulated button events. While the axis is deflected, I continue sending small
> > intervals, so after some time I continually get more emulated button events,
> > each time the value of 100 is reached. With button emulation I'd expect like
> > 1 scroll unit a second, but the first scroll unit happens at a random time,
> > depending on where the counter was before.
> >
> > But when first deflecting the axis, I sometimes get two emulated button events
> > right after each other.
> >
> > Just a quick thought, would it be possible to use an absolute motion event
> > with a value of 0 to reset the internal delta? That wouldn't break ABI.
>
> Another possibility would be to reset delta after some time of
> inicativity. This is hidden state that should not be kept around
> indefinitely in general.
IMO guesswork is almost always bad and comes back to bite us. adding an API
for the driver to reset scrolling isn't hard and can be done by bumping
the ABI minor, so we can enable this in a stable branch relese too.
Cheers,
Peter
More information about the xorg-devel
mailing list