fix fullscreen on Windows

The win.isFullScreen() state takes a second to update so we should just
pass the state manually into onToggleFullScreen().
This commit is contained in:
Feross Aboukhadijeh
2016-03-07 21:46:17 -08:00
parent 7c68be4fd4
commit 0cca67a436
4 changed files with 25 additions and 19 deletions

View File

@@ -42,8 +42,8 @@ function createMainWindow (menu) {
win.on('blur', menu.onWindowHide)
win.on('focus', menu.onWindowShow)
win.on('enter-full-screen', menu.onToggleFullScreen)
win.on('leave-full-screen', menu.onToggleFullScreen)
win.on('enter-full-screen', () => menu.onToggleFullScreen(true))
win.on('leave-full-screen', () => menu.onToggleFullScreen(false))
win.on('close', function (e) {
if (process.platform === 'darwin' && !isQuitting) {