Browse Source
Merge pull request #668 from mrfelton/fix/window-close-non-darwin
fix(app): quit when window closed on non-darwin
renovate/lint-staged-8.x
JimmyMow
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
4 deletions
-
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() |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|