mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-23 13:34:54 +03:00
Merge pull request #1364 from hydralauncher/feat/adjust-tray-icon-interaction
feat: double click shows windows
This commit is contained in:
commit
ba2ac1eb93
@ -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",
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user