diff options
author | skoruppa <skoruppa@gmail.com> | 2019-03-08 18:04:25 +0200 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2019-03-08 08:04:25 -0800 |
commit | 5b02c4d3304a570562d4dd089e46624a58697f1f (patch) | |
tree | 77c5f5125c283a5305abd83fe413ab7861b7f5a3 /src/stores/AppStore.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/stores/AppStore.js')
-rw-r--r-- | src/stores/AppStore.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 7784ff1f9..89eb16fe2 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -12,7 +12,7 @@ import { URL } from 'url'; | |||
12 | import Store from './lib/Store'; | 12 | import Store from './lib/Store'; |
13 | import Request from './lib/Request'; | 13 | import Request from './lib/Request'; |
14 | import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; | 14 | import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; |
15 | import { isMac, isLinux, isWindows } from '../environment'; | 15 | import { isMac } from '../environment'; |
16 | import locales from '../i18n/translations'; | 16 | import locales from '../i18n/translations'; |
17 | import { gaEvent, gaPage } from '../lib/analytics'; | 17 | import { gaEvent, gaPage } from '../lib/analytics'; |
18 | import { onVisibilityChange } from '../helpers/visibility-helper'; | 18 | import { onVisibilityChange } from '../helpers/visibility-helper'; |
@@ -195,12 +195,11 @@ export default class AppStore extends Store { | |||
195 | }); | 195 | }); |
196 | 196 | ||
197 | this.actions.service.setActive({ serviceId }); | 197 | this.actions.service.setActive({ serviceId }); |
198 | 198 | mainWindow.show(); | |
199 | if (isWindows) { | 199 | if (app.mainWindow.isMinimized()) { |
200 | mainWindow.restore(); | 200 | mainWindow.restore(); |
201 | } else if (isLinux) { | ||
202 | mainWindow.show(); | ||
203 | } | 201 | } |
202 | mainWindow.focus(); | ||
204 | } | 203 | } |
205 | }; | 204 | }; |
206 | } | 205 | } |