禁用gpu沙盒

This commit is contained in:
lyswhut
2022-11-04 16:41:43 +08:00
parent 9bec54c454
commit 12336148d9
5 changed files with 26 additions and 18 deletions
+2
View File
@@ -62,6 +62,8 @@ export const applyElectronEnvParams = () => {
// https://github.com/electron/electron/issues/22691
app.commandLine.appendSwitch('wm-window-animations-disabled')
app.commandLine.appendSwitch('--disable-gpu-sandbox')
// proxy
if (global.envParams.cmdParams['proxy-server']) {
app.commandLine.appendSwitch('proxy-server', global.envParams.cmdParams['proxy-server'])
+4 -1
View File
@@ -124,8 +124,11 @@ export const createWindow = () => {
skipTaskbar: true,
webPreferences: {
contextIsolation: false,
webSecurity: !global.isDev,
webSecurity: false,
sandbox: false,
nodeIntegration: true,
enableWebSQL: false,
webgl: false,
spellcheck: false, // 禁用拼写检查器
},
})
+4 -1
View File
@@ -78,8 +78,11 @@ export const createWindow = () => {
webPreferences: {
nodeIntegrationInWorker: true,
contextIsolation: false,
webSecurity: !global.isDev,
webSecurity: false,
nodeIntegration: true,
sandbox: false,
enableWebSQL: false,
webgl: false,
spellcheck: false, // 禁用拼写检查器
},
}