JDK-8160073 : menu issues in case of two-display configuration
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_10
  • Submitted: 2016-06-22
  • Updated: 2016-12-20
  • Resolved: 2016-08-18
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.
JDK 9
9Fixed
Related Reports
Relates :  
Relates :  
Description
JDK9 b123 + Win. 10 + two displays (both HiDPI, but not sure if it does matter)

Please run the test code from JDK-8159968 and drag the app from the 1st display to another. Then it is impossible to select the menu items, as the menu
1. appears at a wrong place and
2. vanishes immediately when releasing the mouse button (so can't select any item).

Please see the screenshot attached. Note also that the "Minimize" button has huge size and is located under the app's icon (it appears in the leftmost corner on the screenshot) - that's NOK as well.
Comments
http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/7767e1102983
18-08-2016

Looks good. I don't have a multi-mon setup on Windows, but the code looks correct and I tested that there are no regressions on Windows 10 with a single monitor. +1
18-08-2016

The fix to the event handler screen coordinate scaling code is identical to JDK-8156094.
18-08-2016

webrev: http://cr.openjdk.java.net/~flar/JDK-8160073/webrev.00/ This fixes both of the issues identified in the previous comment and also updates code in additional (scrolling and gesture-related) event paths to perform proper scaling of screen coordinates. Note that the new code for scaling screen coordinates in GlassViewEventHandler is copied from the menuEvent code (near line 440 in the old file) that had already been doing this scaling properly.
17-08-2016

There are 2 HiDPI related issues going on here: - The fact that the decorations have a different size relative to the screen scale on the second window is not communicated to the FX layer so it mismanages where it locates the submenu. - There is some missing code in the glass event propagation mechanism that recalculates the screen coordinates on mouse events on secondary screens incorrectly. The screen coordinates are appropriately scaled already for menu coordinates, but the decision to show/hide the menu popup happens on regular mouse events which were not being scaled correctly.
17-08-2016

The size of the minimize widget is due to the fact that Windows will not scale those items on displays of different DPIs (they will always be scaled for the primary monitor). We will need to update to a more modern way of managing decorated windows to get scalable decorations. The menu issue should not be happening, though.
15-08-2016

Aug 11, 2016: pending Assignee's evaluation
11-08-2016

This is likely a Hi-DPI issue.
25-06-2016