dorkbox / SystemTray

Cross-platform SystemTray support for Swing/AWT, macOS, GtkStatusIcon, and AppIndicator on Java 8+
Other
446 stars 58 forks source link

Added a try-catch for LinkageError on macOS #205

Closed Nohus closed 11 months ago

Nohus commented 11 months ago

On macOS I am getting a LinkageError crash in SystemTrayFixesMacOS.java. Also reported here: https://github.com/JetBrains/compose-multiplatform/issues/1847#issuecomment-1768969611

Catching the issue prevents the crash and allows the rest of the fixes to still work correctly: menu item icons are set correctly and the menu works fine. The functionality to enable right-click (in additional to left click which works as normal) to open the tray menu does not apply in this case, but tray icons on macOS normally don't open their menu when right-clicked, so this results in normal behaviour anyway.

dorkbox commented 11 months ago

Thanks!