File tree 2 files changed +5
-9
lines changed
2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -313,15 +313,6 @@ function createWindowWithBounds (bounds) {
313
313
return newWin
314
314
}
315
315
316
- // Quit when all windows are closed.
317
- app . on ( 'window-all-closed' , function ( ) {
318
- // On OS X it is common for applications and their menu bar
319
- // to stay active until the user quits explicitly with Cmd + Q
320
- if ( process . platform !== 'darwin' ) {
321
- app . quit ( )
322
- }
323
- } )
324
-
325
316
// This method will be called when Electron has finished
326
317
// initialization and is ready to create browser windows.
327
318
app . on ( 'ready' , function ( ) {
Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ const windows = {
22
22
23
23
window . on ( 'closed' , function ( ) {
24
24
windows . removeWindow ( window )
25
+
26
+ // Quit on last window closed (ignoring secondary and hidden windows)
27
+ if ( windows . openWindows . length === 0 && process . platform !== 'darwin' ) {
28
+ app . quit ( )
29
+ }
25
30
} )
26
31
27
32
windows . nextId ++
You can’t perform that action at this time.
0 commit comments