Skip to content

Commit 777814a

Browse files
committed
fix(Windows): Open Window when app is pinned to taskbar and minimized to system tray
1 parent 28e993e commit 777814a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/index.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ if (process.platform !== 'darwin') {
3131
if (mainWindow.isMinimized()) mainWindow.restore();
3232
mainWindow.focus();
3333
}
34-
return true;
3534
});
3635

3736
if (isSecondInstance) {
@@ -111,6 +110,13 @@ const createWindow = async () => {
111110
app.isMaximized = true;
112111
});
113112

113+
mainWindow.on('close', (e) => {
114+
if (settings.get('minimizeToSystemTray')) {
115+
e.preventDefault();
116+
mainWindow.minimize();
117+
}
118+
});
119+
114120
mainWindow.on('unmaximize', () => {
115121
app.isMaximized = false;
116122
});

0 commit comments

Comments
 (0)