Smooth scrolling and button emulation

Michal Suchanek hramrach at gmail.com
Thu Oct 4 04:16:35 PDT 2012


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.

Thanks

Michal


More information about the xorg-devel mailing list