Fix #467 and #206; quit app on window close (#489)

This commit is contained in:
Darin Morrison 2016-07-29 22:12:21 -06:00 committed by Guillermo Rauch
parent 0780f86b47
commit 60fbc122a8

View file

@ -36,12 +36,6 @@ const url = 'file://' + resolve(
console.log('electron will open', url);
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit();
}
});
app.on('ready', () => {
function createWindow (fn) {
let cfg = plugins.getDecoratedConfig();
@ -227,8 +221,11 @@ app.on('ready', () => {
deleteSessions();
cfgUnsubscribe();
pluginsUnsubscribe();
if (windowSet.size === 0) {
win.close();
});
win.on('closed', () => {
if (process.platform !== 'darwin') {
app.quit();
}
});
}