Skip to content

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

:art: 桌面端重启以后保证窗口最小大小 Fix https://github.com/siyuan-note/siyuan/issues/6041

Liang Ding72806cfbad7d
diff --git a/app/electron/main.js b/app/electron/main.js
index 67845d9ad0..7255242d03 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({