2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-12-23 02:28:55 +00:00

Fix mainWindow state not managed properly

Need to call manage `mainWindowState.manage(mainWindow)` immediately instead of at the end of `createMainWindow()`, if not certain changes such as maximizing the main window before it has been registered will not be saved.
This commit is contained in:
Jia Hao 2016-03-25 21:06:59 +08:00
parent e7390b9e33
commit d020d5d659

View File

@ -46,6 +46,8 @@ function createMainWindow(options, onAppQuit, setDockBadge) {
fullscreen: options.fullScreen || undefined
});
mainWindowState.manage(mainWindow);
// after first run, no longer force full screen to be true
if (options.fullScreen) {
options.fullScreen = undefined;
@ -170,7 +172,6 @@ function createMainWindow(options, onAppQuit, setDockBadge) {
maybeHideWindow(mainWindow, event);
});
mainWindowState.manage(mainWindow);
return mainWindow;
}