Only hide on close when focused

This commit is contained in:
Kevin Sawicki
2013-09-20 17:57:23 -07:00
parent f98d06d212
commit 3c080a0d66

View File

@@ -25,7 +25,7 @@ class WindowEventHandler
rootView?.open(pathToOpen, {initialLine}) unless fsUtils.isDirectorySync(pathToOpen)
@subscribe $(window), 'beforeunload', =>
confirmed = rootView?.confirmClose()
atom.hide() if confirmed and not @reloadRequested
atom.hide() if confirmed and not @reloadRequested and remote.getCurrentWindow().isWebViewFocused()
@reloadRequested = false
confirmed
@subscribeToCommand $(window), 'window:toggle-full-screen', => atom.toggleFullScreen()