RFR: 8249737: java.lang.RuntimeException: Too many touch points reported

Kevin Rushforth kcr at openjdk.java.net
Tue Feb 9 13:06:27 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.

Looks good.

-------------

Marked as reviewed by kcr (Lead).

PR: https://git.openjdk.java.net/jfx/pull/394


More information about the openjfx-dev mailing list