Merge pull request #1364 from hydralauncher/feat/adjust-tray-icon-interaction

feat: double click shows windows
This commit is contained in:
Zamitto 2024-12-31 00:12:45 -03:00 committed by GitHub
commit ba2ac1eb93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "hydralauncher", "name": "hydralauncher",
"version": "3.1.2", "version": "3.1.3",
"description": "Hydra", "description": "Hydra",
"main": "./out/main/index.js", "main": "./out/main/index.js",
"author": "Los Broxas", "author": "Los Broxas",

View File

@ -277,14 +277,9 @@ export class WindowManager {
if (process.platform !== "darwin") { if (process.platform !== "darwin") {
await updateSystemTray(); await updateSystemTray();
tray.addListener("click", () => { tray.addListener("double-click", () => {
if (this.mainWindow) { if (this.mainWindow) {
if ( this.mainWindow.show();
WindowManager.mainWindow?.isMinimized() ||
!WindowManager.mainWindow?.isVisible()
) {
WindowManager.mainWindow?.show();
}
} else { } else {
this.createMainWindow(); this.createMainWindow();
} }