[Development] mouse wheel zooming and inertial scrolling
René J. V. Bertin
rjvbertin at gmail.com
Wed Sep 2 09:58:30 CEST 2015
Thiago Macieira wrote:
>> Fine with me too, but let's first see if there is going to be such a patch
>> for this particular issue...
>
> If you're not volunteering to do it, I doubt it will get done.
In case it wasn't clear yet, I was asking for pointers that could help me do
just that. I thought the development ML was the right place for that ...
Then again, maybe there's a mechanism I haven't yet discovered to switch off the
setting altogether in Qt4? I know it's possible under KDE4 (and that apparently
there was a time where the same event led to accelerated scrolling).
>> I also just noticed that pressing the Meta (Command or Control) key while an
>> inertial scroll is coasting still lets zooming kick in in the xcb plugin,
>> meaning that the same application doesn't work consistently across platform
>> plugins. Isn't that a bug, and if so, what is the intended behaviour?
>
> That depends what does the interpreting of mouse and modifiers. They may come
> as different events from the OS or the OS could delay the keypress of the
> modifier until the coasting is finished.
Rather the former as the keypress can have an immediate effect with both the
cocoa and the xcb plugins. With the xcb plugin (and in Qt4's cocoa backend)
zooming starts immediately when the Control (or Command key) is pressed. With
the cocoa plugin, the Command keypress can be used to trigger a keyboard
shortcut while scrolling still coasts.
>
> What matters is the behaviour compared to other applications on that platform.
So cross-platform consistency is not of consideration?
BTW, I just noticed that Qt 5.3 and 5.2 both and don't the coasting when
scrolling hits the top or bottom of the view. As a result, the zooming
continues. ATM I can only test 5.4's behaviour with the xcb plugin under OS X
but I suspect it will do the same. I presume that this does *not* happen with
the cocoa plugin (nor Qt4 on OS X) because whatever sends the events also knows
what they're destined for and thus takes the view(port)'s vertical position into
account (or maybe even handles the whole scrolling bit itself). AFAIK this
cannot be the case with X11 so it'd be up to Qt to stop the coasting as soon as
the view is scrolled all the way up or down (or horizontally), correct?
Maybe I should asked this first:
Where is simulated inertial scrolling implemented under X11/xcb?
R.
More information about the Development
mailing list