fix: 修復多螢幕工作列定位溢出消失、副螢幕時鐘區辨識與跨螢幕流暢拖曳 - #76
Open
abab5601 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 變更摘要 (Summary)
本修復解決了在 Windows 多螢幕(Multi-Monitor)環境下,Widget 移動至副螢幕 (
Shell_SecondaryTrayWnd) 時會超出螢幕邊界而「消失」的問題,並優化了副螢幕控制項偵測、跨螢幕流暢拖曳與選單切換。🛠️ 主要修復與改進 (Key Fixes)
副螢幕控制項動態辨識 (
native_interop.rs):TrayNotifyWnd),新增了副螢幕時鐘與系統區控制項(Taskbar.SecondaryTrayHostControl、TrayClockWClass、ClockButton)的辨識邏輯。修復副螢幕視窗消失與定位 Bug (
window.rs):position_at_taskbar()中原本寫死TrayNotifyWnd的問題,改為統一調用tray_left_for_taskbar(),解決副螢幕計算x座標溢出導致視窗跑出螢幕外消失的 Bug。支援流暢跨螢幕拖曳 (
window.rs):WM_MOUSEMOVE拖曳邏輯。當滑鼠拖曳穿越螢幕邊界時,會即時重新將 Widget 附著(Re-parent)到對應螢幕的工作列上,提供流暢的跨螢幕拖曳體驗。新增「螢幕 / Taskbar」右鍵選單 (
window.rs):Screen 1 (Primary)、Screen 2等),讓多螢幕使用者能一鍵將 Widget 切換至目標螢幕。🧪 驗證測試 (Verification)
cargo check與cargo build --release編譯通過,無任何 Error。