Skip to content

Commit

Permalink
App: Thing to disable tray manually.
Browse files Browse the repository at this point in the history
  • Loading branch information
e3ndr committed Dec 20, 2024
1 parent 8303e1f commit f606a43
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ public static boolean tryCreateTray() {
throw new IllegalStateException("Tray handler is already initialized.");
}

if (System.getProperty("caffeinated.tray.enabled", "true").equalsIgnoreCase("false")) {
return false;
}

if ((Platform.osDistribution != OSDistribution.WINDOWS_NT) || !SystemTray.isSupported()) {
// Note that calling SystemTray will cause an AWT thread lock on macOS. So we
// always need to be diligent and check for platform for compat.
Expand Down Expand Up @@ -79,6 +83,7 @@ public static boolean tryCreateTray() {
} else {
CaffeinatedApp.getInstance().getUI().navigate("/");
Bootstrap.getSaucer().window().show();
Bootstrap.getSaucer().window().focus();
updateShowCheckbox(true);
}
});
Expand Down

0 comments on commit f606a43

Please sign in to comment.