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:
parent
e7390b9e33
commit
d020d5d659
@ -46,6 +46,8 @@ function createMainWindow(options, onAppQuit, setDockBadge) {
|
|||||||
fullscreen: options.fullScreen || undefined
|
fullscreen: options.fullScreen || undefined
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mainWindowState.manage(mainWindow);
|
||||||
|
|
||||||
// after first run, no longer force full screen to be true
|
// after first run, no longer force full screen to be true
|
||||||
if (options.fullScreen) {
|
if (options.fullScreen) {
|
||||||
options.fullScreen = undefined;
|
options.fullScreen = undefined;
|
||||||
@ -170,7 +172,6 @@ function createMainWindow(options, onAppQuit, setDockBadge) {
|
|||||||
maybeHideWindow(mainWindow, event);
|
maybeHideWindow(mainWindow, event);
|
||||||
});
|
});
|
||||||
|
|
||||||
mainWindowState.manage(mainWindow);
|
|
||||||
return mainWindow;
|
return mainWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user