JDK-8207372 : Robot.mouseWheel not implemented correctly on Linux, Mac
  • Type: Bug
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: openjfx11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-07-17
  • Updated: 2018-07-24
  • Resolved: 2018-07-21
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
openjfx11Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
I tested Robot.mouseWheel on all three platforms, and only Windows is implemented correctly.

On Linux, positive and negative scroll values are backwards.

Mac appears not to be scaling the values correctly (or at all).

Comments
Changeset: ccdff6bcf8c1 Author: kcr Date: 2018-07-21 07:17 -0700 URL: http://hg.openjdk.java.net/openjfx/jfx-dev/rt/rev/ccdff6bcf8c1 8207372: Robot.mouseWheel not implemented correctly on Linux, Mac Reviewed-by: kcr Contributed-by: mike.ennen@gmail.com
21-07-2018

PR reviewed at: https://github.com/javafxports/openjdk-jfx/pull/134
21-07-2018

The docs are also wrong, and will be fixed as part of this bug. See JDK-8207371, which has been closed as a duplicate of this bug.
20-07-2018

I ran a simple, manual FX and AWT robot program (attached) on all three platforms. Windows: both AWT and FX are scrolling in the correct direction Linux: FX is backwards from AWT (AWT matches the docs). Mac: AWT works as I would expect and scrolls one "click" of the mouse whereas FX scrolls a much smaller amount (looks like 1 pixel). This suggests either a missing scale on FX or some sort of "units" setting that isn't being done on FX. The scrolling direction for both FX and AWT matches the "natural" scrolling direction on Mac (this setting is enabled by default).
19-07-2018