diff --git a/app/electron/main.js b/app/electron/main.js index 67845d9ad..7255242d0 100644 --- a/app/electron/main.js +++ b/app/electron/main.js @@ -149,10 +149,10 @@ const boot = () => { windowState.width = Math.min(defaultWidth, workArea.width) windowState.height = Math.min(defaultHeight, workArea.height) } - if (x > workArea.width || x < 0) { + if (x > workArea.width) { x = 0 } - if (y > workArea.height || y < 0) { + if (y > workArea.height) { y = 0 } } @@ -162,6 +162,12 @@ const boot = () => { if (windowState.height < 300) { windowState.height = 300 } + if (x < 0) { + x = 0 + } + if (y < 0) { + y = 0 + } // 创建主窗体 mainWindow = new BrowserWindow({