fix: window not opening when clicking on tray icon on linux

This commit is contained in:
Zamitto
2025-09-03 06:05:02 -03:00
parent 6bc6a10d66
commit 2b6d8eba78
2 changed files with 13 additions and 27 deletions

View File

@@ -584,7 +584,7 @@ export class WindowManager {
tray.setToolTip("Hydra Launcher");
if (process.platform !== "darwin") {
if (process.platform === "win32") {
await updateSystemTray();
tray.addListener("double-click", () => {
@@ -595,6 +595,18 @@ export class WindowManager {
}
});
tray.addListener("right-click", showContextMenu);
} else if (process.platform === "linux") {
await updateSystemTray();
tray.addListener("click", () => {
if (this.mainWindow) {
this.mainWindow.show();
} else {
this.createMainWindow();
}
});
tray.addListener("right-click", showContextMenu);
} else {
tray.addListener("click", showContextMenu);