Conversation
There was a problem hiding this comment.
Pull request overview
该 PR 旨在修复 Tauri 桌面端在部分情况下窗口位置超出显示器可视范围的问题,通过在窗口移动时对位置进行“夹紧”(clamp) 来保证窗口留在当前显示器边界内。
Changes:
- 在
useWindowState中新增基于getCursorMonitor()的窗口位置边界夹紧逻辑,并使用useDebounceFn做防抖处理 - 在窗口移动事件触发时,尝试自动将窗口位置限制在鼠标所在显示器的范围内
- 调整
onChange中对事件payload的处理方式(解构后复用)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…rdinate space Agent-Logs-Url: https://github.com/ayangweb/BongoCat/sessions/c4c8647c-d80a-4f6f-9351-8acca82b21d0 Co-authored-by: ayangweb <75017711+ayangweb@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ayangweb/BongoCat/sessions/fa84cb0e-dd5d-4f31-8243-2ceba8f1df78 Co-authored-by: ayangweb <75017711+ayangweb@users.noreply.github.com>
|
@copilot If the window becomes out-of-bounds due to resize (manual resize, restoring a saved size after monitor resolution/DPI changes, etc.), this code won’t clamp it back onto the monitor. |
This was already addressed in 69045b5. |
但是显示器的分辨率变化的问题,你并没有解决啊?不是有 appWIndow.onScaleChanged 吗?我不知道 dpi 是什么方法 |
|
@copilot 但是显示器的分辨率变化的问题,你并没有解决啊?不是有 appWindow.onScaleChanged 吗?我不知道 dpi 是什么方法 |
Agent-Logs-Url: https://github.com/ayangweb/BongoCat/sessions/41543274-2241-4637-ba60-61264ece8cba Co-authored-by: ayangweb <75017711+ayangweb@users.noreply.github.com>
No description provided.