fix killall steam not working

This commit is contained in:
Olivier Gagnon
2021-12-14 22:34:09 -05:00
parent 5b38ee3cfb
commit e3a0caf50f
2 changed files with 6 additions and 5 deletions

View File

@@ -9,14 +9,15 @@ if (greenworks.init()) {
const debug = false;
function createWindow() {
function createWindow(killall) {
const win = new BrowserWindow({
show: false,
});
win.removeMenu();
win.maximize();
win.loadFile("index.html");
noScripts = killall ? { query: { noScripts: killall } } : {};
win.loadFile("index.html", noScripts);
win.show();
if (debug) win.webContents.openDevTools();
@@ -75,7 +76,7 @@ function createWindow() {
if (intervalID) clearInterval(intervalID);
win.webContents.forcefullyCrashRenderer();
win.close();
createWindow();
createWindow(true);
},
},
],
@@ -110,5 +111,5 @@ function createWindow() {
}
app.whenReady().then(() => {
createWindow();
createWindow(false);
});