fix(fullscreen): Restore fullscreen if app was closed in fullscreen

Fixes #671
This commit is contained in:
Juan Tejada 2016-01-12 15:11:46 -08:00
parent a03e8f704b
commit 48ea9e6198

View file

@ -575,7 +575,8 @@ class NylasEnvConstructor extends Model
browserWindow = @getCurrentWindow()
{x, y, width, height} = browserWindow.getBounds()
maximized = browserWindow.isMaximized()
{x, y, width, height, maximized}
fullScreen = browserWindow.isFullScreen()
{x, y, width, height, maximized, fullScreen}
# Set the dimensions of the window.
#
@ -627,6 +628,7 @@ class NylasEnvConstructor extends Model
dimensions = @getDefaultWindowDimensions()
@setWindowDimensions(dimensions)
@maximize() if dimensions.maximized and process.platform isnt 'darwin'
@setFullScreen(true) if dimensions.fullScreen
storeWindowDimensions: ->
dimensions = @getWindowDimensions()