Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Improve main window position https://github.com/siyuan-note/siyuan/issues/11437

Daniel1e2765962eec
diff --git a/app/electron/main.js b/app/electron/main.js
index 045dcc9b5d..debf13c9fb 100644
--- a/app/electron/main.js
+++ b/app/electron/main.js
@@ -278,10 +278,10 @@ const initMainWindow = () => {
windowState.width = Math.min(defaultWidth, workArea.width);
windowState.height = Math.min(defaultHeight, workArea.height);
}
- if (x > workArea.width) {
+ if (x >= workArea.width * 0.8) {
x = 0;
}
- if (y > workArea.height) {
+ if (y >= workArea.height * 0.8) {
y = 0;
}
}