Merge pull request #1142 from psjostrom/revert-api-window-opts-change

fix: Revert "Changed API for getWindowOpts"
This commit is contained in:
psjostrom 2020-12-08 12:50:44 +01:00 committed by GitHub
commit 858adb4cf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -913,6 +913,9 @@ export class WindowHandler {
resizable: false,
fullscreenable: false,
},
{
devTools: isDevEnv,
},
);
if (
@ -1040,6 +1043,9 @@ export class WindowHandler {
resizable: false,
fullscreenable: false,
},
{
devTools: isDevEnv,
},
);
if (
@ -1171,6 +1177,9 @@ export class WindowHandler {
show: false,
fullscreenable: false,
},
{
devTools: isDevEnv,
},
);
const focusedWindow = BrowserWindow.getFocusedWindow();
if (focusedWindow && windowExists(focusedWindow) && isWindowsOS) {
@ -1247,6 +1256,9 @@ export class WindowHandler {
autoHideMenuBar: true,
resizable: false,
},
{
devTools: isDevEnv,
},
);
opts.parent = window;
this.basicAuthWindow = createComponentWindow('basic-auth', opts);
@ -1303,6 +1315,9 @@ export class WindowHandler {
fullscreenable: false,
autoHideMenuBar: true,
},
{
devTools: isDevEnv,
},
);
// This prevents creating multiple instances of the
// notification configuration window
@ -1416,6 +1431,9 @@ export class WindowHandler {
title: 'Screen Sharing Indicator - Symphony',
closable: false,
},
{
devTools: isDevEnv,
},
),
...{ winKey: streamId },
};
@ -1524,6 +1542,9 @@ export class WindowHandler {
transparent: true,
alwaysOnTop: true,
},
{
devTools: isDevEnv,
},
);
if (
@ -1877,7 +1898,7 @@ export class WindowHandler {
*/
private getWindowOpts(
windowOpts: Electron.BrowserWindowConstructorOptions,
webPreferences?: Electron.WebPreferences,
webPreferences: Electron.WebPreferences,
): ICustomBrowserWindowConstructorOpts {
const defaultPreferencesOpts = {
...{
@ -1885,7 +1906,6 @@ export class WindowHandler {
nodeIntegration: isNodeEnv,
contextIsolation: isNodeEnv ? false : this.contextIsolation,
backgroundThrottling: this.backgroundThrottling,
devTools: isDevEnv,
},
...webPreferences,
};