Repository navigation
Conversation
拖到桌面 = 放回桌面 - 拖动开始时记录本次拖动(是否来自映射格子、路径),后台线程以 8ms 轮询物理按键, 在松开瞬间探测桌面(MappedDragReleaseTracker / MappedDragReleaseTracking 纯状态机), 不再依赖 DropCompleted 时刻的光标与按键状态。 - 桌面命中测试改为三态(空白 / 图标+标签 / 失败,DesktopListViewProbeNativeMethods): 命中被拖项自身图标(显示隐藏项时)不再算「落在图标上」;命中测试失败不再挡住放回。 - 一次手势只判定一次:正常由拖动完成判定;完成早于松开(堆叠弹层关闭)或完成事件缺失 时由松开判定(1.5s 宽限)。 - 每个放弃分支记录 [MappedOrganize] DragToDesktop skip reason=…(附 target/icon/chain)。 重新整理桌面 - 自动归类新文件、映射格子的快速「一键整理」仍跳过「放回桌面」项。 - 整理预览(只映射模式)中放回项按规则归类并默认勾选(文件夹/大文件等仅可选项也自动勾选, 每个预览只勾一次);确认后清除放回标记并映射,取消勾选则保持放回。 - 映射格子空白处右键菜单、映射格子(或含映射格子的标签页组)标题栏「…」菜单新增 「重新整理桌面」,直接打开整理预览。 上游文件改动:FileSurfaceContent.xaml.cs +1 行调用(DragStarting)并调整 1 处调用签名, ContentWidgetWindow.Commands.cs +1 行,DesktopOrganizationTaskView.xaml.cs +1 行。 补充单元测试:MappedDragToDesktopTests、MappedOrganizeReorganizeTests。
GOXF
added a commit
that referenced
this pull request
Nov 8, 2026
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.
问题 1:从映射格子拖到桌面不生效
根因(推测,未在真实桌面复现):#7 在
DropCompleted时刻才读光标并做桌面命中测试。此时 Explorer 已处理完这次放下:DesktopBlankHitTest的 LVM_HITTEST(80ms)超时,而它把「失败」和「落在图标上」都返回false→ 判成「落在图标上」→ 放弃;逐条排查结论:标签页合并组里每个标签各有自己的
WidgetViewModel,IsMappedOrganizeWidget不受影响;launchedFromCompletedDrag只在落到本格子快捷方式上成立;handledInternally只在 DeskBox 自己接收时为 true;dropResult本来就不参与判断;movedPaths取自 DragStarting 的源路径,不为空。修复
BeginMappedDragTracking,一行调用);后台线程 8ms 轮询物理按键(MappedDragReleaseTracker+ 纯状态机MappedDragReleaseTracking),在松开瞬间探测桌面。DesktopListViewProbeNativeMethods:空白 / 图标(读取标签 LVM_GETITEMTEXTW)/ 失败。命中被拖项自身图标视为空白;失败不再阻止(放回前仍检查路径仍在桌面)。[MappedOrganize] DragToDesktop tracking / released / put back / skip reason=…(附target= icon= iconText= hitFailure= chain=)。问题 2:放回项按规则重新整理
上游文件改动
FileSurfaceContent.xaml.cs(+1 行调用、1 处调用参数)、ContentWidgetWindow.Commands.cs(+1 行)、DesktopOrganizationTaskView.xaml.cs(+1 行)。不改 Strings/*.json(文案内联简/繁/英),不新增 bindable 属性。测试
MappedDragToDesktopTests(Evaluate 各原因、标签匹配、松开状态机、接线)、MappedOrganizeReorganizeTests(放回项自动勾选、只勾一次、标记清除、菜单出现条件、接线)。