diff options
author | Stefan <stefan@adlk.io> | 2017-11-03 10:27:14 +0100 |
---|---|---|
committer | Stefan <stefan@adlk.io> | 2017-11-03 10:27:14 +0100 |
commit | 777814aa713e5093de52cb9c4c1cbf754b9e8289 (patch) | |
tree | cd6fa8956c722149e4a4e3b9eadbf024aff19144 /src/index.js | |
parent | Start from pinned icon (diff) | |
download | ferdium-app-777814aa713e5093de52cb9c4c1cbf754b9e8289.tar.gz ferdium-app-777814aa713e5093de52cb9c4c1cbf754b9e8289.tar.zst ferdium-app-777814aa713e5093de52cb9c4c1cbf754b9e8289.zip |
fix(Windows): Open Window when app is pinned to taskbar and minimized to system tray
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js index a6c7e1d85..a72d76f3a 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -31,7 +31,6 @@ if (process.platform !== 'darwin') { | |||
31 | if (mainWindow.isMinimized()) mainWindow.restore(); | 31 | if (mainWindow.isMinimized()) mainWindow.restore(); |
32 | mainWindow.focus(); | 32 | mainWindow.focus(); |
33 | } | 33 | } |
34 | return true; | ||
35 | }); | 34 | }); |
36 | 35 | ||
37 | if (isSecondInstance) { | 36 | if (isSecondInstance) { |
@@ -111,6 +110,13 @@ const createWindow = async () => { | |||
111 | app.isMaximized = true; | 110 | app.isMaximized = true; |
112 | }); | 111 | }); |
113 | 112 | ||
113 | mainWindow.on('close', (e) => { | ||
114 | if (settings.get('minimizeToSystemTray')) { | ||
115 | e.preventDefault(); | ||
116 | mainWindow.minimize(); | ||
117 | } | ||
118 | }); | ||
119 | |||
114 | mainWindow.on('unmaximize', () => { | 120 | mainWindow.on('unmaximize', () => { |
115 | app.isMaximized = false; | 121 | app.isMaximized = false; |
116 | }); | 122 | }); |