mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-23 05:24:55 +03:00
Merge pull request #1287 from JarEXE/fix/traymenu
fix: workaround for broken or missing tray icon menu on linux
This commit is contained in:
commit
95d320a0fe
@ -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 (
|
||||
|
Loading…
Reference in New Issue
Block a user