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();
|
this.mainWindow?.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static createSystemTray(language: string) {
|
public static async createSystemTray(language: string) {
|
||||||
let tray: Tray;
|
let tray: Tray;
|
||||||
|
|
||||||
if (process.platform === "darwin") {
|
if (process.platform === "darwin") {
|
||||||
@ -263,6 +263,7 @@ export class WindowManager {
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
tray.setContextMenu(contextMenu);
|
||||||
return contextMenu;
|
return contextMenu;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -274,6 +275,8 @@ export class WindowManager {
|
|||||||
tray.setToolTip("Hydra");
|
tray.setToolTip("Hydra");
|
||||||
|
|
||||||
if (process.platform !== "darwin") {
|
if (process.platform !== "darwin") {
|
||||||
|
await updateSystemTray();
|
||||||
|
|
||||||
tray.addListener("click", () => {
|
tray.addListener("click", () => {
|
||||||
if (this.mainWindow) {
|
if (this.mainWindow) {
|
||||||
if (
|
if (
|
||||||
|
Loading…
Reference in New Issue
Block a user