From b2fcd965fd67cb59a7a867fbce232fff2208632a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Caplygin?= Date: Wed, 1 Nov 2017 14:59:56 +0100 Subject: [PATCH 1/2] toggleWindow: minimize before hide to return focus Should fix issue #50 --- app/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/index.js b/app/index.js index 5a22f56..0cca70c 100644 --- a/app/index.js +++ b/app/index.js @@ -32,6 +32,7 @@ if (isAlreadyRunning) { function toggleWindow() { if (mainWindow.isVisible()) { + mainWindow.minimize() mainWindow.hide() } else { mainWindow.show() From ef72e8f090e2b07d3a12415172b4d68dd4c38064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Caplygin?= Date: Wed, 1 Nov 2017 15:31:24 +0100 Subject: [PATCH 2/2] and for closing as well --- app/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/index.js b/app/index.js index 0cca70c..8c6eb2e 100644 --- a/app/index.js +++ b/app/index.js @@ -70,6 +70,7 @@ function createMainWindow() { if (process.platform === 'darwin') { app.hide() } else { + win.minimize() win.hide() } }