Fix "Toggle Fullscreen" not working

win.setFullScreenable() is necessary from Electron v0.36.6.
fix #37
This commit is contained in:
Yuya Ochiai
2016-02-19 00:59:40 +09:00
parent 3e49f6935b
commit f8f525c6df

View File

@@ -121,10 +121,15 @@ app.on('ready', function() {
window_options = {}; window_options = {};
} }
window_options.icon = path.resolve(__dirname, 'resources/appicon.png'); window_options.icon = path.resolve(__dirname, 'resources/appicon.png');
window_options.fullScreenable = true;
mainWindow = new BrowserWindow(window_options); mainWindow = new BrowserWindow(window_options);
mainWindow.setFullScreenable(true); // fullscreenable option has no effect.
if (window_options.maximized) { if (window_options.maximized) {
mainWindow.maximize(); mainWindow.maximize();
} }
if (window_options.fullscreen) {
mainWindow.setFullScreen(true);
}
// and load the index.html of the app. // and load the index.html of the app.
mainWindow.loadURL('file://' + __dirname + '/browser/index.html'); mainWindow.loadURL('file://' + __dirname + '/browser/index.html');