JDK-8214580 : Values generated by calling Robot::mouseWheel are much smaller on Mac
  • Type: Bug
  • Component: javafx
  • Sub-Component: scenegraph
  • Affected Version: openjfx11,openjfx12
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2018-12-01
  • Updated: 2018-12-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
JDK-8207369 is creating new tests for the various JavaFX Robot methods. One of them tests the robot::mouseWheel call. While testing this, it was discovered that the ScrollEvent::getDeltaY values that are delivered as a result of the mouseWheel calls on Windows and Linux are scaled by 40 compared to the values on Mac. We should understand the cause of this difference and either document it (if there is a good reason for the difference) or fix it (if the difference is considered a bug and if we can justify the compatibility concerns of changing the behavior). Also of note is that the direction of the scrolling is opposite on Mac, but this may be a result of the "natural scroll direction" on Mac.

Comments
There is an additional inconsistency between macOS and at least Windows hi-DPI displays. In order to correct the scroll amount on a Windows hi-DPI scale display I had to multiply the scroll amount in the onScroll event handler by Screen.getPrimary().getOutputScaleY(). This makes the test pass on Windows for normal and hi-DPI displays. But this same fix does not work on retina macOS so there is another inconsistency between the scroll amounts reported on macOS and other platforms.
03-12-2018