Merge pull request #1287 from JarEXE/fix/traymenu
Some checks failed
Release / build (ubuntu-latest) (push) Has been cancelled
Release / build (windows-latest) (push) Has been cancelled

fix: workaround for broken or missing tray icon menu on linux
This commit is contained in:
Zamitto 2024-12-11 17:22:49 -03:00 committed by GitHub
commit 95d320a0fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -195,7 +195,7 @@ export class WindowManager {
this.mainWindow?.focus();
}
public static createSystemTray(language: string) {
public static async createSystemTray(language: string) {
let tray: Tray;
if (process.platform === "darwin") {
@ -263,6 +263,7 @@ export class WindowManager {
},
]);
tray.setContextMenu(contextMenu);
return contextMenu;
};
@ -274,6 +275,8 @@ export class WindowManager {
tray.setToolTip("Hydra");
if (process.platform !== "darwin") {
await updateSystemTray();
tray.addListener("click", () => {
if (this.mainWindow) {
if (