JavaFX ignores the HiDPI scaling settings on Fedora 32 and Ubuntu 20.04.

The scale detection in JavaFX assumes that the "scaling-factor" setting in 
"org.gnome.desktop.interface" has the correct Hi-DPI setting. But this not true 
for some systems and "scaling-factor" has value of 0. JavaFX should detect the 
windows level scale factor automatically in this case,  but this logic is 
missing right now. So, the JavaFX applications are not scaled properly. 
This issue can be reproduced by setting the scale from Settings->Displays->Set 
Scale. Note, the option for scale may not be present from some resolution 
settings, so you may need to change it to see the option to scale the full 
windowing system. The issue can be verified by running some JavaFX 
applications/samples. The application will not be scaled properly according to 
the UIScale. https://bugs.openjdk.java.net/browse/JDK-8258464 is similar bug 
and has been closed as duplicate.

This fix adds the logic to detect the scale from windows system itself.
I have ran all automated unit tests and system tests, this fix is not causing 
any new failures. I have tested this on fedora 32 VM, Ubuntu 20.04 VM and 
Ubuntu 20.10 VM.

-------------

Commit messages:
 - 8248126: JavaFX ignores HiDPI scaling settings on Fedora 32 (Gnome)

Changes: https://git.openjdk.java.net/jfx/pull/396/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=396&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8248126
  Stats: 15 lines in 3 files changed: 5 ins; 1 del; 9 mod
  Patch: https://git.openjdk.java.net/jfx/pull/396.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/396/head:pull/396

PR: https://git.openjdk.java.net/jfx/pull/396

Reply via email to