RFR: 8206253: No/Wrong scroll events from touch input in window mode
Jose Pereda
jpereda at openjdk.java.net
Tue Mar 9 16:45:11 UTC 2021
On Tue, 9 Mar 2021 09:04:00 GMT, Johan Vos <jvos at openjdk.org> wrote:
>> This PR changes the parameter names to accommodate class calculations related to screen event coordinates (AbsX, AbsY).
>>
>> As [discussed](https://bugs.openjdk.java.net/browse/JDK-8206253?focusedCommentId=14405707&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14405707), the sendScrollXXXEvent methods are currently passing the screen coordinates (AbsX, AbsY) to the local ones, but they shouldn't modify those, but the screen ones.
>>
>> Tested successfully on Android with ComboBox controls in different positions.
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/tk/quantum/ScrollGestureRecognizer.java line 265:
>
>> 263: }
>> 264:
>> 265: private void sendScrollStartedEvent(double centerAbsX, double centerAbsY, int touchCount) {
>
> It's probably better to use other names here, as centerAbsX/Y are already used as instance variables.
Yes, that makes sense.
We could refactor the three `sendScrollXXXEvent` methods to something like:
sendScrollXXXEvent(double xAbs, double yAbs, int touchCount)
or to:
sendScrollXXXEvent(double x, double y, double xAbs, double yAbs, int touchCount)
Any preference?
-------------
PR: https://git.openjdk.java.net/jfx/pull/420
More information about the openjfx-dev
mailing list