This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 975
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13242 from brave/fix/quit-on-close-buffer-window
When closing last window, make sure buffer window is closed so that app exits
- Loading branch information
Showing
1 changed file
with
10 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -334,6 +334,16 @@ const api = { | |
win.once('closed', () => { | ||
appActions.windowClosed(windowId) | ||
cleanupWindow(windowId) | ||
// if we have a bufferWindow, the 'window-all-closed' | ||
// event will not fire once the last window is closed, | ||
// so close the buffer window if this is the last closed window | ||
// apart from the buffer window | ||
if (!platformUtil.isDarwin() && api.getBufferWindow()) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
bsclifton
Author
Member
|
||
const remainingWindows = api.getAllRendererWindows().filter(win => win !== api.getBufferWindow()) | ||
if (!remainingWindows.length) { | ||
api.closeBufferWindow() | ||
} | ||
} | ||
}) | ||
win.on('blur', () => { | ||
appActions.windowBlurred(windowId) | ||
|
@bsclifton I have a question regarding why the isDarwin check is being performed here. I believe this is what is causing #8164