Restore maximized state of window

On Linux and Windows there is a maximized state that isn't the
same as simply restoring the window's size on Mac OS X.
This commit is contained in:
Kevin Sawicki
2014-08-14 14:22:20 -07:00
parent e0ebc661f2
commit 20b44500d1
2 changed files with 9 additions and 1 deletions

View File

@@ -460,7 +460,8 @@ class Atom extends Model
setImmediate =>
@show()
@focus()
@setFullScreen(true) if @workspaceView.fullScreen
@setFullScreen(true) if @workspace.fullScreen
@maximize() if @workspace.maximized and process.platform isnt 'darwin'
# Public: Close the current window.
close: ->
@@ -498,6 +499,12 @@ class Atom extends Model
isFullScreen: ->
@getCurrentWindow().isFullScreen()
maximize: ->
ipc.send('call-window-method', 'maximize')
isMaximized: ->
@getCurrentWindow().isMaximized()
# Public: Get the version of the Atom application.
#
# Returns the version text {String}.

View File

@@ -56,6 +56,7 @@ class Workspace extends Model
serializeParams: ->
paneContainer: @paneContainer.serialize()
fullScreen: atom.isFullScreen()
maximized: atom.isMaximized()
packagesWithActiveGrammars: @getPackageNamesWithActiveGrammars()
getPackageNamesWithActiveGrammars: ->