inconsistency in processing scroll events with hidpi/retina

Jim Graham james.graham at oracle.com
Tue Sep 8 23:10:11 UTC 2015


Hi Johan,

Can you file a bug on this?

			...jim

On 9/8/15 5:14 AM, Johan Vos wrote:
> Hi,
>
> I am running into an issue on Android that seems more general to me.
> I noticed that scroll gestures where passed with wrong coordinates, as
> the physical coordinates are used instead of the logical (e.g. on a
> screen with a density/scalefactor of 3, we would pass x = 900 instead
> of x = 300).
>
> Debugging it shows that
> scene.sceneListener.scrollEvent()
>
> can be called from 2 different paths:
> GlassViewEventHandler.handleScrollEvent()
> and
> ScrollGestureRecognizer.sendScrollStartedEvent
>
> In the GlassViewEventHandler.handleScrollEvent, coordinates are
> transformed before sending to the scrollEvent method:
>
> (w being the Window)
> double pScale = (w == null) ? 1.0 : w.getPlatformScale();
> and the x and y coordinates are replaced with x/pScale and y/pScale
>
> However, this doesn't happen in the ScrollGestureRecognizer, so the
> coordinates that this one sent to the scrollEvent method are not
> corrected by with the scale factor.
>
> - Johan
>


More information about the openjfx-dev mailing list