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
8248126: JavaFX ignores HiDPI scaling settings on some linux platforms #396
Conversation
👋 Welcome back pbansal! A progress list of the required criteria for merging this PR into |
This is a simple enough fix, but it would be helpful to have a second reviewer take a look, and test it. /reviewers 2 |
@kevinrushforth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I tested on Ubuntu 20.04 with both GTK3 and GTK2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, verified with Ubuntu 20.04.
@pankaj-bansal This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 4 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
/integrate |
@pankaj-bansal Since your change was applied there have been 4 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 782f22a. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This is amazing. I had to set uiScale on startup because it wouldnt work on ubuntu 20.04 |
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.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jfx pull/396/head:pull/396
$ git checkout pull/396