From f65421dbe15a6cae09887882e1f3bde54556a261 Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Mon, 28 Feb 2022 20:20:55 +0530 Subject: [PATCH] SDA-3596 - set the bounds for newly created child window (#1359) --- src/app/child-window-handler.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/child-window-handler.ts b/src/app/child-window-handler.ts index 181df5d5..d3eed0eb 100644 --- a/src/app/child-window-handler.ts +++ b/src/app/child-window-handler.ts @@ -270,8 +270,16 @@ export const handleChildWindow = (webContents: WebContents): void => { ]); browserWin.setFullScreenable(true); browserWin.origin = contextOriginUrl || windowHandler.url; - if (isWindowsOS && browserWin && !browserWin.isDestroyed()) { - browserWin.setMenuBarVisibility(false); + if (browserWin && !browserWin.isDestroyed()) { + browserWin.setBounds({ + x: newWinOptions.x, + y: newWinOptions.y, + width: newWinOptions.width, + height: newWinOptions.height, + }); + if (isWindowsOS) { + browserWin.setMenuBarVisibility(false); + } } });