-
Bug
-
Resolution: Fixed
-
P4
-
8
-
None
-
b11
-
os_x
Note: This is the same issue as JDK-8119983, which was fixed for JavaFX8, but probably for one single monitor and not for two.
The issue can be reproduced on macOS with any setup of two monitors, regardless their arrangement (left or right), providing they just have different resolution/size.
For instance, apply the following setup:
- MacBook Pro Retina display to the left, as Extended Display, with Default resolution (1728x1117)
- LG HDR 4K to the right, as Main display, with any resolution like 1920x1080, 2560x1440, 3008x1692, 3360x1890 or 3840x2160 (not matching the Retina one)
and run the attached sample, which is a simplification of the test inJDK-8119983.
Steps:
- Run the sample in the main screen, and do a drag gesture, the dialog will show up in the expected position (see ExpectedDialogPosition.png)
- Close the dialog, and move the stage to the secondary monitor.
- Do a drag gesture, the dialog will show up in the unexpected position (see UnexpectedDialogPosition.png), with a big offset in the Y coordinate, which is probably depending on the difference of screen sizes.
Workaround: as it can be seen from the test case, don't use DragEvent::screenY, but calculate it from the main Stage, main Scene and DragEvent::sceneY coordinates.
The issue can be reproduced on macOS with any setup of two monitors, regardless their arrangement (left or right), providing they just have different resolution/size.
For instance, apply the following setup:
- MacBook Pro Retina display to the left, as Extended Display, with Default resolution (1728x1117)
- LG HDR 4K to the right, as Main display, with any resolution like 1920x1080, 2560x1440, 3008x1692, 3360x1890 or 3840x2160 (not matching the Retina one)
and run the attached sample, which is a simplification of the test in
Steps:
- Run the sample in the main screen, and do a drag gesture, the dialog will show up in the expected position (see ExpectedDialogPosition.png)
- Close the dialog, and move the stage to the secondary monitor.
- Do a drag gesture, the dialog will show up in the unexpected position (see UnexpectedDialogPosition.png), with a big offset in the Y coordinate, which is probably depending on the difference of screen sizes.
Workaround: as it can be seen from the test case, don't use DragEvent::screenY, but calculate it from the main Stage, main Scene and DragEvent::sceneY coordinates.
- links to
-
Commit(master) openjdk/jfx/9ab20363
-
Review(master) openjdk/jfx/1756