Full screen window after it is shown and focused

This prevents a blank menu bar from appearing when opening a window
that was previously closed when in full screen mode.

Closes #1144
This commit is contained in:
Kevin Sawicki
2013-11-21 14:50:50 -08:00
parent 2349627e3c
commit c31211dc21
3 changed files with 11 additions and 13 deletions

View File

@@ -186,6 +186,16 @@ class Atom
hide: ->
@getCurrentWindow().hide()
# Private: Schedule the window to be shown and focused on the next tick.
#
# This is done in a next tick to prevent a white flicker from occurring
# if called synchronously.
displayWindow: ->
setImmediate =>
@show()
@focus()
@setFullScreen(true) if @rootView.getState().get('fullScreen')
close: ->
@getCurrentWindow().close()

View File

@@ -127,9 +127,6 @@ class RootView extends View
@command 'pane:reopen-closed-item', =>
@panes.reopenItem()
if @state.get('fullScreen')
setImmediate => atom.setFullScreen(true)
# Private:
serialize: ->
state = @state.clone()

View File

@@ -8,15 +8,6 @@ WindowEventHandler = require './window-event-handler'
windowEventHandler = null
# Schedule the window to be shown and focused on the next tick
#
# This is done in a next tick to prevent a white flicker from occurring
# if called synchronously.
displayWindow = ->
setImmediate ->
atom.show()
atom.focus()
# This method is called in any window needing a general environment, including specs
window.setUpEnvironment = (windowMode) ->
atom.windowMode = windowMode
@@ -58,7 +49,7 @@ window.startEditorWindow = ->
unloadEditorWindow()
false
displayWindow()
atom.displayWindow()
window.unloadEditorWindow = ->
return if not atom.project and not atom.rootView