mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
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:
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user