On Fri, 5 Feb 2021 10:37:54 GMT, Jose Pereda <[email protected]> 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
