Skip to content

Commit

Permalink
Fixed issue #195
Browse files Browse the repository at this point in the history
Remove the judgment of Darwin when event 'window-all-closed' occurs. This will close the application on macOS when the last window is closed.
  • Loading branch information
haku-huang authored Dec 7, 2021
1 parent bd1d54d commit 8e87dc2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions window.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ function createWindow () {

app.whenReady().then(createWindow);

app.on('window-all-closed', () => {
if (process.platform !== 'darwin')
app.quit();
app.on('window-all-closed', function() {
app.quit();
});

app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0)
createWindow();
});
});

0 comments on commit 8e87dc2

Please sign in to comment.