-
-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Popup menu shows on adjacent monitor #177
Comments
I'm seeing this only with the 125%, 150% (left, right) monitor configuration, so far. |
Hmm, strange. Can not reproduce it... Does this also happen with Metal or Windows LaFs? What Java distro do you use? AdoptOpenJDK? Or other? Could you please run FlatScreenInfo.java on your computer, with the same Java version, and post the output here? |
Should have tried this already before – appears to happen with Metal and the Windows LaFs as well, so it doesn't appear FlatLaf specific. I'm using Oracle's JDK. Here are the FlatScreenInfo outputs:
I'll try to update to JDK 11.0.8 to see if it would make any difference... but then it doesn't appear a FlatLaf problem. |
Ok, can now reproduce it with your second screen configuration. Occurs also in Oracle JDK 11.0.8 and in AdoptOpenJDK 11.0.8. But works in JetBrains Runtime 11.0.8 (bundled in IDEA 2020.2.2) |
Thanks for looking into it. Please, close at your discretion. |
Just compared screen info of Oracle JDK with JetBrains Runtime: The interesting thing is the difference in the X location of the second screen. In JetBrains Runtime the X location of second screen is The wrong menu positioning happens in method This has actually nothing to do with maximized windows. Occurs also in not maximized windows: Also occurs for other popups. E.g. comboboxes: |
Yeah, I would expect
I guess device coordinates should match the physical size reported but then it would be "impossible" to correctly position stuff. |
Yea, that's confusing. The documentation is not clear IMHO... |
I think it's related to this OpenJDK issue openjdk/jdk#375 |
@grimlock81 thx for the link. Good news that a fix is (hopefully) coming to Java 16... Here is the JDK issue: https://bugs.openjdk.java.net/browse/JDK-8211999 |
FlatLaf 0.42
Java 11
Windows 10
Steps to reproduce
Have a two-monitor (left and right) setup. Open and maximize the FlatLaf Demo (or another application with a menu-bar) on the ride-side monitor. Start cycling through top-level menus.
Actual results
Some of the (popup) menus get shown on the other (left-side) monitor for no apparent reason.
Details
So far I'm experiencing this with two configurations:
Left monitor: 150%
Right monitor (primary): 200%
Left monitor (primary): 125%
Right monitor: 150%
Maybe the right one should have a greater scaling factor to reproduce as I'm not getting it with:
Left monitor: 150%
Right monitor (primary): 125%
Appears to happen with FlatLaf Demo 0.35 as well. Some of the menus may not show on the other monitor but appear to be aligned on the right-side:
When showing the window on the left-side monitor, the problem is not visible and all menus are left-aligned:
Happens with both "Window decorations" enabled and disabled.
The text was updated successfully, but these errors were encountered: