diff options
author | 2019-03-08 18:04:25 +0200 | |
---|---|---|
committer | 2019-03-08 08:04:25 -0800 | |
commit | 5b02c4d3304a570562d4dd089e46624a58697f1f (patch) | |
tree | 77c5f5125c283a5305abd83fe413ab7861b7f5a3 /src/index.js | |
parent | correctly update services submenu on language change (diff) | |
download | ferdium-app-5b02c4d3304a570562d4dd089e46624a58697f1f.tar.gz ferdium-app-5b02c4d3304a570562d4dd089e46624a58697f1f.tar.zst ferdium-app-5b02c4d3304a570562d4dd089e46624a58697f1f.zip |
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
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 5 |
1 files changed, 4 insertions, 1 deletions
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) { | |||
72 | app.on('second-instance', (event, argv) => { | 72 | app.on('second-instance', (event, argv) => { |
73 | // Someone tried to run a second instance, we should focus our window. | 73 | // Someone tried to run a second instance, we should focus our window. |
74 | if (mainWindow) { | 74 | if (mainWindow) { |
75 | if (mainWindow.isMinimized()) mainWindow.restore(); | 75 | mainWindow.show(); |
76 | if (mainWindow.isMinimized()) { | ||
77 | mainWindow.restore(); | ||
78 | } | ||
76 | mainWindow.focus(); | 79 | mainWindow.focus(); |
77 | 80 | ||
78 | if (isWindows) { | 81 | if (isWindows) { |