From 8963544afab4d3642628a9f2d1f6356254e307a0 Mon Sep 17 00:00:00 2001 From: Ronan Jouchet Date: Fri, 24 Nov 2017 10:31:08 -0500 Subject: [PATCH] Fix #462 - When minimized to tray and single-instance, re-running the app should activate and focus it (#490) --- app/src/main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main.js b/app/src/main.js index c136d7a..29b1e74 100644 --- a/app/src/main.js +++ b/app/src/main.js @@ -122,7 +122,9 @@ if (appArgs.singleInstance) { const shouldQuit = app.makeSingleInstance(() => { // Someone tried to run a second instance, we should focus our window. if (mainWindow) { - if (mainWindow.isMinimized()) { + if (!mainWindow.isVisible()) { // tray + mainWindow.show(); + } if (mainWindow.isMinimized()) { // minimized mainWindow.restore(); } mainWindow.focus();