Changed API for getWindowOpts

This commit is contained in:
psjostrom 2020-12-04 13:42:34 +01:00
parent b4f1ffa8a5
commit 5557c115c3

View File

@ -896,9 +896,6 @@ export class WindowHandler {
resizable: false,
fullscreenable: false,
},
{
devTools: isDevEnv,
},
);
if (
@ -1017,9 +1014,6 @@ export class WindowHandler {
resizable: false,
fullscreenable: false,
},
{
devTools: isDevEnv,
},
);
if (
@ -1096,9 +1090,6 @@ export class WindowHandler {
show: false,
fullscreenable: false,
},
{
devTools: isDevEnv,
},
);
const focusedWindow = BrowserWindow.getFocusedWindow();
if (focusedWindow && windowExists(focusedWindow) && isWindowsOS) {
@ -1207,9 +1198,6 @@ export class WindowHandler {
autoHideMenuBar: true,
resizable: false,
},
{
devTools: isDevEnv,
},
);
opts.parent = window;
this.basicAuthWindow = createComponentWindow('basic-auth', opts);
@ -1266,9 +1254,6 @@ export class WindowHandler {
fullscreenable: false,
autoHideMenuBar: true,
},
{
devTools: isDevEnv,
},
);
// This prevents creating multiple instances of the
// notification configuration window
@ -1382,9 +1367,6 @@ export class WindowHandler {
title: 'Screen Sharing Indicator - Symphony',
closable: false,
},
{
devTools: isDevEnv,
},
),
...{ winKey: streamId },
};
@ -1493,9 +1475,6 @@ export class WindowHandler {
transparent: true,
alwaysOnTop: true,
},
{
devTools: isDevEnv,
},
);
if (
@ -1832,7 +1811,7 @@ export class WindowHandler {
*/
private getWindowOpts(
windowOpts: Electron.BrowserWindowConstructorOptions,
webPreferences: Electron.WebPreferences,
webPreferences?: Electron.WebPreferences,
): ICustomBrowserWindowConstructorOpts {
const defaultPreferencesOpts = {
...{
@ -1840,6 +1819,7 @@ export class WindowHandler {
nodeIntegration: isNodeEnv,
contextIsolation: isNodeEnv ? false : this.contextIsolation,
backgroundThrottling: this.backgroundThrottling,
devTools: isDevEnv,
},
...webPreferences,
};