From ce4a3968d8c33b3fd6f3bc8d7ffd44c8e1cfc771 Mon Sep 17 00:00:00 2001 From: Johan Kwarnmark Date: Fri, 31 Jan 2020 11:06:47 +0100 Subject: [PATCH] sda-1720 windows/electron BrowserWindow does not always open a window with the right location and size --- src/app/window-handler.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index 8ed823e1..56192f6f 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -152,6 +152,14 @@ export class WindowHandler { ...this.windowOpts, ...getBounds(this.config.mainWinPos, DEFAULT_WIDTH, DEFAULT_HEIGHT), }) as ICustomBrowserWindow; + if (isWindowsOS) { + // SDA-1720 when Symphony on secondary screen is wider than main screen, the window on secondary is clapmed to the width of main screen + // Only happens on windows (BrowserWindow) + this.mainWindow.setBounds(getBounds(this.config.mainWinPos, DEFAULT_WIDTH, DEFAULT_HEIGHT) as Electron.Rectangle); + } + + logger.info('window-handler: this.mainWindow.getBounds: ' + JSON.stringify(this.mainWindow.getBounds())); + this.mainWindow.winName = apiName.mainWindowName; const {isFullScreen, isMaximized} = this.config.mainWinPos ? this.config.mainWinPos : {isFullScreen: false, isMaximized: false}; if (isMaximized) {