From 882da2a42f84b24b20529cf4d010bffe42d65990 Mon Sep 17 00:00:00 2001 From: Salah Benmoussati <51402489+sbenmoussati@users.noreply.github.com> Date: Tue, 19 Apr 2022 10:17:16 +0200 Subject: [PATCH] SDA-3652 App mispositioning bugfix (#1392) --- src/app/window-handler.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index 81b75f25..036eba75 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -215,6 +215,7 @@ export class WindowHandler { minHeight: 300, minWidth: 300, title: 'Symphony', + show: false, }, { preload: path.join(__dirname, '../renderer/_preload-main.js'), @@ -375,15 +376,6 @@ export class WindowHandler { true, ); - if (isMaximized || isMaximizedFlag) { - this.mainWindow.maximize(); - logger.info( - `window-handler: window is maximized!`, - isMaximized, - isMaximizedFlag, - ); - } - if (isFullScreen) { logger.info(`window-handler: window is in full screen!`); this.mainWindow.setFullScreen(true); @@ -407,6 +399,16 @@ export class WindowHandler { this.mainWindow.loadURL(this.url, { userAgent }); this.mainWebContents = this.mainWindow.webContents; } + if (isMaximized || isMaximizedFlag) { + this.mainWindow.maximize(); + logger.info( + `window-handler: window is maximized!`, + isMaximized, + isMaximizedFlag, + ); + mainEvents.publish('maximize'); + } + this.mainWindow.show(); // check for build expiry in case of test builds this.checkExpiry(this.mainWindow);