diff --git a/app/index.js b/app/index.js index 4c873c99..91e7c8c4 100644 --- a/app/index.js +++ b/app/index.js @@ -13,6 +13,17 @@ process.on('uncaughtException', function (err) { console.log(err); }) +let darwin = process.platform === 'darwin' + +// Quit when all windows are closed. +app.on('window-all-closed', () => { + // On macOS it is common for applications and their menu bar + // to stay active until the user quits explicitly with Cmd + Q + if (!darwin) { + app.quit() + } +}) + function createWindow () { // Load the previous state with fallback to defaults @@ -49,7 +60,7 @@ function createWindow () { if (willQuitApp) { /* the user tried to quit the app */ win = null; - } else { + } else if(darwin) { /* the user only tried to close the window */ e.preventDefault(); win.hide(); diff --git a/app/package.json b/app/package.json index 7391ef43..58f81ab3 100644 --- a/app/package.json +++ b/app/package.json @@ -3,7 +3,7 @@ "productName" : "Standard Notes", "description": "A standard notes app with an un-standard focus on longevity, portability, and privacy.", "author": "Standard Notes ", - "version" : "0.1.1", + "version" : "0.1.2", "dependencies" : { "electron-window-state": "^4.0.1" } diff --git a/package.json b/package.json index 0213260a..7325aa96 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "standard-notes", - "version": "0.1.1", + "version": "0.1.2", "main": "./app/index.js", "devDependencies": { "electron": "^1.4.14",