From 351c9092470bc1f58b2b293f087e2b13239a2b88 Mon Sep 17 00:00:00 2001 From: Bill Wallace Date: Fri, 20 Dec 2024 15:43:38 -0500 Subject: [PATCH] Relaunch without refresh in any windows --- platform/core/src/services/MultiMonitorService.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/platform/core/src/services/MultiMonitorService.ts b/platform/core/src/services/MultiMonitorService.ts index 385006c657..1b7dcb02e4 100644 --- a/platform/core/src/services/MultiMonitorService.ts +++ b/platform/core/src/services/MultiMonitorService.ts @@ -108,14 +108,14 @@ export class MultiMonitorService { if (this.launchWindows[screenNumber] && !this.launchWindows[screenNumber].closed) { return this.launchWindows[screenNumber]; } - return this.createWindow(screenNumber, false); + return this.createWindow(screenNumber); } /** * Creates a new window showing the given url by default, or gets an existing * window. */ - public async createWindow(screenNumber, reload = true) { + public async createWindow(screenNumber) { if (screenNumber === this.screenNumber) { return window; } @@ -143,11 +143,8 @@ export class MultiMonitorService { const options = newScreen.options || ''; const position = `screenX=${useLeft},screenY=${useTop},width=${useWidth},height=${useHeight},${options}`; - let newWindow; - if (!reload) { - newWindow = window.open('', newId, position); - } - if (!newWindow?.multimonitor) { + let newWindow = window.open('', newId, position); + if (newWindow?.location.href !== url) { newWindow = window.open(url, newId, position); } if (!newWindow) {