From 5b02c4d3304a570562d4dd089e46624a58697f1f Mon Sep 17 00:00:00 2001 From: skoruppa Date: Fri, 8 Mar 2019 18:04:25 +0200 Subject: fix(Linux): Fix minimized window focusing (#1304) (@skoruppa) * trigger build * Check if window is minimized before restoring it * restore() should be executed only when window is minimized --- src/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/index.js') diff --git a/src/index.js b/src/index.js index 0e222c3d6..05c793d98 100644 --- a/src/index.js +++ b/src/index.js @@ -72,7 +72,10 @@ if (!gotTheLock) { app.on('second-instance', (event, argv) => { // Someone tried to run a second instance, we should focus our window. if (mainWindow) { - if (mainWindow.isMinimized()) mainWindow.restore(); + mainWindow.show(); + if (mainWindow.isMinimized()) { + mainWindow.restore(); + } mainWindow.focus(); if (isWindows) { -- cgit v1.2.3-70-g09d2