<AWT Dev> [9] Review request for 8166591 [macos 10.12] Trackpad scrolling of text on OS X 10.12 Sierra is very fast (Trackpad, Retina only)

Sergey Malenkov malenkov at gmail.com
Thu Sep 29 20:17:41 UTC 2016


>> But we already did some magic to support mouse event.
>> On the top level I have no access to the phase values.
>
> But how this values helps you? If we roundup the accumulator on the "end
> phase" the scroll will be slow in the middle phase, no?

I want to support short gestures like we supported mouse wheel.
When you accumulated 0.4 and ended a phase, the value should be 1.
Possibly, we have to use here a threshold ~0.1


>> This is not a list. And this image scrolls very-very slow.
>> Usually we setUnitIncrement(10) to such components.
>
> It is scrolled slow-slow because we get such notifications from native. I am
> still hope Apple will fix this.

Nope. Windows provides the same values and we have a very slow scrolling here.

>> Note, that MouseWheelEvent contains deltaY (line scroll)
>> instead of scrollingDeltaY (pixel scroll) from native events.
>
> That's a good question can we use scrollingDeltaX/Y instead and in the same
> time tweak the "scrollAmount" value. What is a "scrollAmount" means here? is
> it a pixels? If yes why we cannot post scrollingDeltaX/Y as a
> scrollAmount(and set wheelRotation as +-1)?

It is a units in Swing.  See MouseWheelEvent.getUnitsToScroll()
For lists and trees it is amount of lines to scroll per mouse wheel tick.

-- 
Best regards,
Sergey A. Malenkov


More information about the awt-dev mailing list