mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
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:
@@ -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}.
|
||||
|
||||
@@ -56,6 +56,7 @@ class Workspace extends Model
|
||||
serializeParams: ->
|
||||
paneContainer: @paneContainer.serialize()
|
||||
fullScreen: atom.isFullScreen()
|
||||
maximized: atom.isMaximized()
|
||||
packagesWithActiveGrammars: @getPackageNamesWithActiveGrammars()
|
||||
|
||||
getPackageNamesWithActiveGrammars: ->
|
||||
|
||||
Reference in New Issue
Block a user