Add fullscreen class to body when in full screen

Add a `fullscreen` class to body when full screen is triggered, as suggested
by @orderedlist in #1694
This commit is contained in:
Alfred Xing
2014-05-08 20:36:46 -07:00
parent 38bd996996
commit 839cad0c2a

View File

@@ -473,6 +473,7 @@ class Atom extends Model
# Public: Set the full screen state of the current window.
setFullScreen: (fullScreen=false) ->
ipc.send('call-window-method', 'setFullScreen', fullScreen)
if fullScreen then document.body.classList.add("fullscreen") else document.body.classList.remove("fullscreen")
# Public: Is the current window in full screen mode?
isFullScreen: ->