2020-03-20 20:28:31 +00:00
|
|
|
const { app, BrowserWindow } = require('electron');
|
2019-01-15 20:35:53 +00:00
|
|
|
|
2020-03-20 20:28:31 +00:00
|
|
|
let handled = false;
|
2019-01-15 20:35:53 +00:00
|
|
|
|
|
|
|
if (app.commandLine.hasSwitch('handle-event')) {
|
|
|
|
app.on('window-all-closed', () => {
|
2020-03-20 20:28:31 +00:00
|
|
|
handled = true;
|
|
|
|
app.quit();
|
|
|
|
});
|
2019-01-15 20:35:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
app.on('quit', () => {
|
2020-03-20 20:28:31 +00:00
|
|
|
process.stdout.write(JSON.stringify(handled));
|
|
|
|
process.stdout.end();
|
|
|
|
});
|
2019-01-15 20:35:53 +00:00
|
|
|
|
2020-02-03 22:43:22 +00:00
|
|
|
app.whenReady().then(() => {
|
2020-03-20 20:28:31 +00:00
|
|
|
const win = new BrowserWindow();
|
|
|
|
win.close();
|
|
|
|
});
|