Permalink
Browse files

fix(Windows): Open Window when app is pinned to taskbar and minimized…

… to system tray
  • Loading branch information...
adlk committed Nov 3, 2017
1 parent 28e993e commit 777814aa713e5093de52cb9c4c1cbf754b9e8289
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/index.js
@@ -31,7 +31,6 @@ if (process.platform !== 'darwin') {
if (mainWindow.isMinimized()) mainWindow.restore();
mainWindow.focus();
}
return true;
});
if (isSecondInstance) {
@@ -111,6 +110,13 @@ const createWindow = async () => {
app.isMaximized = true;
});
mainWindow.on('close', (e) => {
if (settings.get('minimizeToSystemTray')) {
e.preventDefault();
mainWindow.minimize();
}
});
mainWindow.on('unmaximize', () => {
app.isMaximized = false;
});

0 comments on commit 777814a

Please sign in to comment.