Browse Source

fix(app): quit when window closed on non-darwin

On darwin, we keep the app running and just hide it when the window is
closed as that is the standard convention. On linux and windows the app
should be quit when the window is closed.

This resolves an issue where on linux/windows the app would remain open
when the window is closed, with no way to properly quit it short of
doing a force quit.
renovate/lint-staged-8.x
Tom Kirkpatrick 7 years ago
parent
commit
ddbdf01aba
No known key found for this signature in database GPG Key ID: 72203A8EC5967EA8
  1. 7
      app/lib/zap/controller.js

7
app/lib/zap/controller.js

@ -119,11 +119,10 @@ class ZapController {
// When the window is closed, just hide it unless we are force closing.
this.mainWindow.on('close', e => {
if (this.mainWindow.forceClose) {
return
if (process.platform === 'darwin' && !this.mainWindow.forceClose) {
e.preventDefault()
this.mainWindow.hide()
}
e.preventDefault()
this.mainWindow.hide()
})
}

Loading…
Cancel
Save