RFR: 8325900: Emit a warning on macOS if AWT has set the NSAppearance
Michael Strauß
mstrauss at openjdk.org
Wed Feb 14 21:13:10 UTC 2024
Platform preferences detection doesn't pick up effective macOS system preferences if AWT owns the NSApplication and has set its NSAppearance to a fixed value.
The workaround is to set the system property "apple.awt.application.appearance=system".
If this property is not set, the following warning will be emitted if a JavaFX application attempts to use the platform preferences API:
WARNING: Reported preferences may not reflect the macOS system preferences unless the sytem
property apple.awt.application.appearance=system is set. This warning can be disabled by
setting javafx.preferences.suppressAppleAwtWarning=true.
-------------
Commit messages:
- Emit a warning on macOS if AWT has set the NSAppearance
Changes: https://git.openjdk.org/jfx/pull/1367/files
Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1367&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8325900
Stats: 53 lines in 4 files changed: 48 ins; 0 del; 5 mod
Patch: https://git.openjdk.org/jfx/pull/1367.diff
Fetch: git fetch https://git.openjdk.org/jfx.git pull/1367/head:pull/1367
PR: https://git.openjdk.org/jfx/pull/1367
More information about the openjfx-dev
mailing list