-
Notifications
You must be signed in to change notification settings - Fork 285
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
Add System Tray workaround for Big Sur #745
Conversation
Add new java attribute for system tray template icons
I tested the icon theming on macOS Big Sur 11.1 and this works great. |
Great, however proper testing should include regression testing (e.g. Java 8 and hopefully an older macOS version) to ensure there's no breaking change. @Vzor- I think you have the most macOS VMs laying around, can you test this out? If you need precompiled binaries, I can provide temporary download links. |
Testing on macOS Mountain Lion 10.8, I get the following hard-crash: Edit: Filed upstream bug report: dyorgio/macos-tray-icon-fixer#3
|
Fix race condition
Tested:
With patched from dyorgio/macos-tray-icon-fixer#3, and a fix for a race condition, this is working very well on all tests. Merging. |
Documenting the reflection warning that occurs when running QZ Tray with this patch. Per @tresf this will go away once the patched jdk11 receives the system tray patch
|
Correct, the warning is triggered here: tray/src/qz/utils/MacUtilities.java Lines 205 to 211 in 46a49e1
The code will stop executing the moment tray/src/qz/utils/MacUtilities.java Lines 166 to 182 in 46a49e1
|
Java doesn't have proper support for templated TrayIcons, a hard-requirement since Big Sur for apps that use black and white TrayIcons.
This issue was tracked and patched in JDK17 per https://bugs.openjdk.java.net/browse/JDK-8252015 (thanks @Vzor- and our JDK support provider), however the backport to JDK11 will take some time (estimated at least 3 months).
This PR adds a workaround from https://github.com/dyorgio/macos-tray-icon-fixer (Thanks @dyorgio!) which uses JNA to fix the issue prior to the backport of JDK-8252015. Note, this workaround won't work fully on Apple Silicon until the project is updated with JNA 5.7.0, which contains macOS aarch64 (arm64) support java-native-access/jna#1238.
Test results (1/29/21)
Closes #678