Close all windows before installing update.

This commit is contained in:
Cheng Zhao
2014-02-17 14:51:22 +08:00
parent 93687efee9
commit 6b3ff63358
2 changed files with 21 additions and 0 deletions

View File

@@ -50,6 +50,16 @@ window.onerror = (error) ->
else
false
# Enable browser to close window silently.
setTimeout ->
require('ipc').once 'ATOM_SHELL_SILENT_CLOSE', ->
window.onbeforeunload = null
window.close()
# Override default window.close.
window.close = ->
require('remote').getCurrentWindow().close()
# Override default window.open.
window.open = (url, name, features) ->
options = {}