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/stores/AppStore.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/stores/AppStore.js') 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'; import Store from './lib/Store'; import Request from './lib/Request'; import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; -import { isMac, isLinux, isWindows } from '../environment'; +import { isMac } from '../environment'; import locales from '../i18n/translations'; import { gaEvent, gaPage } from '../lib/analytics'; import { onVisibilityChange } from '../helpers/visibility-helper'; @@ -195,12 +195,11 @@ export default class AppStore extends Store { }); this.actions.service.setActive({ serviceId }); - - if (isWindows) { + mainWindow.show(); + if (app.mainWindow.isMinimized()) { mainWindow.restore(); - } else if (isLinux) { - mainWindow.show(); } + mainWindow.focus(); } }; } -- cgit v1.2.3-70-g09d2