Integrated: 8249737: java.lang.RuntimeException: Too many touch points reported
Jose Pereda
jpereda at openjdk.java.net
Tue Feb 9 19:57:38 UTC 2021
On Fri, 5 Feb 2021 10:37:54 GMT, Jose Pereda <jpereda at openjdk.org> wrote:
> Using a digitizer tablet with a pen that works with Windows or MacOS, it works fine on MacOS, but throws a RTE on Windows 10. On MacOS there are only MouseEvents, while on Windows there are both MouseEvents and TouchEvents mixed together.
>
> Windows only uses [direct](https://github.com/openjdk/jfx/blob/master/modules/javafx.graphics/src/main/native-glass/win/ViewContainer.cpp#L1271) touch events natively, and that works for touch screens.
>
> But when touch pads are used generate mainly indirect touch events.
>
> There is already a way to find the source of the touch event (touch screen or touch pad/pen), via [isTouchEvent()](https://github.com/openjdk/jfx/blob/master/modules/javafx.graphics/src/main/native-glass/win/ViewContainer.cpp#L62), so this PR uses that method to set `isDirect` based on the source: true or direct for touch screen and false or indirect for touch pad/pen.
>
> Tested successfully using a touch screen and a touch pad with pen.
This pull request has now been integrated.
Changeset: 9c8d30ac
Author: Jose Pereda <jpereda at openjdk.org>
URL: https://git.openjdk.java.net/jfx/commit/9c8d30ac
Stats: 4 lines in 1 file changed: 0 ins; 1 del; 3 mod
8249737: java.lang.RuntimeException: Too many touch points reported
Reviewed-by: kcr
-------------
PR: https://git.openjdk.java.net/jfx/pull/394
More information about the openjfx-dev
mailing list