From f8f525c6df3e60f6bd6e08413bd7f2e1b5e5eebe Mon Sep 17 00:00:00 2001 From: Yuya Ochiai Date: Fri, 19 Feb 2016 00:59:40 +0900 Subject: [PATCH] Fix "Toggle Fullscreen" not working win.setFullScreenable() is necessary from Electron v0.36.6. fix #37 --- src/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.js b/src/main.js index c071f3fe..8dd38c02 100644 --- a/src/main.js +++ b/src/main.js @@ -121,10 +121,15 @@ app.on('ready', function() { window_options = {}; } window_options.icon = path.resolve(__dirname, 'resources/appicon.png'); + window_options.fullScreenable = true; mainWindow = new BrowserWindow(window_options); + mainWindow.setFullScreenable(true); // fullscreenable option has no effect. if (window_options.maximized) { mainWindow.maximize(); } + if (window_options.fullscreen) { + mainWindow.setFullScreen(true); + } // and load the index.html of the app. mainWindow.loadURL('file://' + __dirname + '/browser/index.html');