fix: try to restore maximised windows to correct display (#92)
fix: App-maximized-2nd-monitor Signed-off-by: Mihai <cristian@mihaimuresan.com> Signed-off-by: Mihai <45673304+mihaicm93@users.noreply.github.com> Co-authored-by: Mihai <cristian@mihaimuresan.com>
This commit is contained in:
@@ -57,11 +57,6 @@ export function createMainWindow() {
|
||||
// hide the options
|
||||
mainWindow.setMenu(null);
|
||||
|
||||
// maximise the window if it was maximised before
|
||||
if (config.windowState.isMaximised) {
|
||||
mainWindow.maximize();
|
||||
}
|
||||
|
||||
// restore last position if it was moved previously
|
||||
if (config.windowState.x > 0 || config.windowState.y > 0) {
|
||||
mainWindow.setPosition(
|
||||
@@ -78,6 +73,11 @@ export function createMainWindow() {
|
||||
);
|
||||
}
|
||||
|
||||
// maximise the window if it was maximised before
|
||||
if (config.windowState.isMaximised) {
|
||||
mainWindow.maximize();
|
||||
}
|
||||
|
||||
// load the entrypoint
|
||||
mainWindow.loadURL(BUILD_URL.toString());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user