Hi Peter, On Donnerstag, 4. Oktober 2012 00:30:36 Peter Hutterer wrote: > On Wed, Oct 03, 2012 at 07:17:08PM +0200, Sascha Hlusiak wrote: > > In the case for legacy button scroll events, the server keeps track of > > the accumulated scroll delta and after reaching 100, will generate a > > XI1/legacy scroll button down/up sequence. Is there a way to reset that > > server internal delta to 0 after scrolling stops? It seems that smooth > > scrolling might leave that value at 99, which makes it impossible for > > me to predict when the next legacy button scroll event will happen. > > no, not really. this is a missing API but I do wonder how useful this API > would be. The scroll resolution is supposed to represent one unit of > scrolling, so it should be hard to repeatedly accumulate 99 - that would > just mean the resolution is too high, wouldn't it? I did notice the effect when I used it and the effect would be the same if resolution was set to e.g. 5.
> > In the case of the joystick module, where deflecting the axis generates > > a whole scroll unit, followed by smooth scrolling, this results in > > sometimes two units from the start. > > 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. Cheers, Sascha
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
