Skip to content

Commit 4a44f3e

Browse files
author
MutatedGamer
committed
Set parent in createBrowserWindow
1 parent d6e362c commit 4a44f3e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

ElectronNET.Host/api/browserWindows.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ElectronNET.Host/api/browserWindows.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ export = (socket: Socket, app: Electron.App) => {
216216
options = { ...options, webPreferences: { nodeIntegration: true, contextIsolation: false } };
217217
}
218218

219+
if (options.parent) {
220+
options.parent = BrowserWindow.fromId(options.parent.id);
221+
}
222+
219223
// we dont want to recreate the window when watch is ready.
220224
if (app.commandLine.hasSwitch('watch') && app['mainWindowURL'] === loadUrl) {
221225
window = app['mainWindow'];

0 commit comments

Comments
 (0)