mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Hide window before doing unload work.
In this way we can give user the feeling of quick close even though the unloading could take some time.
This commit is contained in:
@@ -202,6 +202,9 @@ window.atom =
|
||||
focus: ->
|
||||
remote.getCurrentWindow().focus()
|
||||
|
||||
hide: ->
|
||||
remote.getCurrentWindow().hide()
|
||||
|
||||
exit: (status) ->
|
||||
@sendMessageToBrowserProcess('exit', [status])
|
||||
|
||||
|
||||
@@ -57,7 +57,10 @@ window.startEditorWindow = ->
|
||||
atom.activatePackages()
|
||||
keymap.loadUserKeymaps()
|
||||
atom.requireUserInitScript()
|
||||
$(window).on 'unload', -> unloadEditorWindow(); false
|
||||
$(window).on 'unload', ->
|
||||
atom.hide()
|
||||
unloadEditorWindow()
|
||||
false
|
||||
$(window).focus()
|
||||
|
||||
window.startConfigWindow = ->
|
||||
@@ -70,7 +73,10 @@ window.startConfigWindow = ->
|
||||
deserializeConfigWindow()
|
||||
atom.activatePackageConfigs()
|
||||
keymap.loadUserKeymaps()
|
||||
$(window).on 'unload', -> unloadConfigWindow(); false
|
||||
$(window).on 'unload', ->
|
||||
atom.hide()
|
||||
unloadConfigWindow()
|
||||
false
|
||||
$(window).focus()
|
||||
|
||||
window.unloadEditorWindow = ->
|
||||
|
||||
Reference in New Issue
Block a user