SDA-3596 - set the bounds for newly created child window (#1359)

This commit is contained in:
Kiran Niranjan 2022-02-28 20:20:55 +05:30 committed by GitHub
parent 28d4d9680d
commit f65421dbe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -270,8 +270,16 @@ export const handleChildWindow = (webContents: WebContents): void => {
]); ]);
browserWin.setFullScreenable(true); browserWin.setFullScreenable(true);
browserWin.origin = contextOriginUrl || windowHandler.url; browserWin.origin = contextOriginUrl || windowHandler.url;
if (isWindowsOS && browserWin && !browserWin.isDestroyed()) { if (browserWin && !browserWin.isDestroyed()) {
browserWin.setMenuBarVisibility(false); browserWin.setBounds({
x: newWinOptions.x,
y: newWinOptions.y,
width: newWinOptions.width,
height: newWinOptions.height,
});
if (isWindowsOS) {
browserWin.setMenuBarVisibility(false);
}
} }
}); });