mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Merge pull request #12645 from atom/as-fix-app-not-quitting-on-windows-and-linux
Fix app not quitting on win32 and linux when closing the last window
This commit is contained in:
@@ -122,12 +122,12 @@ class AtomApplication
|
||||
|
||||
# Public: Removes the {AtomWindow} from the global window list.
|
||||
removeWindow: (window) ->
|
||||
if @windows.length is 1
|
||||
@windows.splice(@windows.indexOf(window), 1)
|
||||
if @windows.length is 0
|
||||
@applicationMenu?.enableWindowSpecificItems(false)
|
||||
if process.platform in ['win32', 'linux']
|
||||
app.quit()
|
||||
return
|
||||
@windows.splice(@windows.indexOf(window), 1)
|
||||
@saveState(true) unless window.isSpec
|
||||
|
||||
# Public: Adds the {AtomWindow} to the global window list.
|
||||
|
||||
Reference in New Issue
Block a user