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:
parent
7d2f296ca7
commit
897d706983
1 changed files with 5 additions and 5 deletions
|
|
@ -57,11 +57,6 @@ export function createMainWindow() {
|
||||||
// hide the options
|
// hide the options
|
||||||
mainWindow.setMenu(null);
|
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
|
// restore last position if it was moved previously
|
||||||
if (config.windowState.x > 0 || config.windowState.y > 0) {
|
if (config.windowState.x > 0 || config.windowState.y > 0) {
|
||||||
mainWindow.setPosition(
|
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
|
// load the entrypoint
|
||||||
mainWindow.loadURL(BUILD_URL.toString());
|
mainWindow.loadURL(BUILD_URL.toString());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue