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. ------------- Commit messages: - Set isDirect using isTouchEvent() that returns the source of the touch event (screen or pen) Changes: https://git.openjdk.java.net/jfx/pull/394/files Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=394&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8249737 Stats: 4 lines in 1 file changed: 0 ins; 1 del; 3 mod Patch: https://git.openjdk.java.net/jfx/pull/394.diff Fetch: git fetch https://git.openjdk.java.net/jfx pull/394/head:pull/394 PR: https://git.openjdk.java.net/jfx/pull/394