Merge pull request #866 from johankwarnmarksymphony/sda-1720

fix: sda-1720 windows/electron BrowserWindow does not always open a window…
This commit is contained in:
Johan Kwarnmark 2020-01-31 12:43:44 +01:00 committed by GitHub
commit 119da410dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {