Repository navigation
Conversation
仅当 DeskBox.exe 位于本地 git 克隆内(向上找到同时含 .git 与 scripts/fork-dev-update.ps1 的仓库根)时启用,正式安装版完全不受影响。 - Directory.Build.targets:Debug 构建时 git rev-parse,把提交 sha/分支写入 AssemblyMetadata(ForkGitSha/ForkGitBranch);取不到时运行时读 .git。 - 启动后及每 30 分钟匿名请求 GitHub commits/dev,比较远端最新 sha, 有新提交时发更新通知(沿用现有更新提示样式,点击打开 关于)。 - 设置「关于→更新详情」显示「本地测试版:当前 <短sha>,有新提交 …」与 「更新并重启」按钮;点「检查更新」时同时检查该通道。 - 「更新并重启」以独立可见窗口运行 fork-dev-update.ps1 后退出 DeskBox; 脚本新增 -GraceSeconds(先等 DeskBox 自行退出),失败时 Read-Host 暂停。 - 新增 ForkDevUpdateTests:仓库根探测、sha 比较、正式安装版不启用等。
映射项本身就在桌面文件夹里,拖到桌面对资源管理器是同文件夹移动(无操作), 项仍被隐藏、仍留在格子里。现在拖放完成时用光标位置判断目标: - 落在系统桌面空白处(Progman/WorkerW 下的 SHELLDLL_DefView/SysListView32, 多显示器均可;必须属于资源管理器进程、不是 DeskBox 自己的窗口)时, 对拖动的项(支持多选)执行「放回桌面」:取消映射、去掉 DeskBox 加的隐藏属性、 标记留在桌面。 - 通过桌面 IFolderView.SelectAndPositionItems 把图标放到松手位置 (第一个居中于光标,其余向下排成一列);开启「自动排列图标」时跳过。 - 落在桌面图标上(文件夹/回收站)、其他文件夹、其他格子,以及移动模式格子, 保持上游原行为;按 Esc 取消或仍按住鼠标键时不触发。 只新增文件,上游文件仅在 CompleteDragItemsSession 加一处调用。 附纯逻辑单元测试(目标窗口类名判定、放回路径集合、图标位置)。
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.
问题
在映射格子里把项拖出到桌面没有任何效果:映射项本身就在桌面文件夹里,拖到桌面对资源管理器是同文件夹移动(无操作),项仍被隐藏、仍留在格子里。
改动
CompleteDragItemsSession)时用光标位置判断目标。落在系统桌面空白处(Progman/WorkerW下的SHELLDLL_DefView/SysListView32,多显示器均可;须属于资源管理器进程,DeskBox 自己的窗口——包括嵌入 WorkerW 的格子——不算)时,对拖动的项(支持多选)执行「放回桌面」:取消映射、去掉 DeskBox 加的隐藏属性、标记留在桌面(与右键「放回桌面」同一KeepOnDesktop),并显示同样的提示。IFolderView.SelectAndPositionItems(IShellWindows → SID_STopLevelBrowser → QueryActiveShellView),第一个居中于光标,其余向下排成一列、到工作区底部换列;开启「自动排列图标」时跳过(「将图标与网格对齐」仍会吸附)。函数指针调 vtable,无 RCW,AOT 安全。文件
新增:
FileSurfaceContent.MappedDragToDesktop.cs、Services/MappedDragToDesktopPolicy.cs(纯逻辑)、Services/MappedDragToDesktopTarget.cs(窗口探测)、Services/MappedDragToDesktopPlacement.cs(STA 轮询摆放)、Platform/DesktopIconPlacementNativeMethods.cs、tests/.../MappedDragToDesktopTests.cs。上游文件只改
FileSurfaceContent.xaml.cs一处调用(+6 行);未改Strings/*.json(复用 fork 内联文案)。测试
单元测试:目标窗口类名判定(桌面/资源管理器文件夹窗口/任务栏/DeskBox 自身/非 shell 进程)、是否放回、放回路径集合(去重、规范化、过滤不存在与非桌面路径)、图标位置计算。
已知限制
Base 说明
分支基于
dev(含 #5、#6),为避免指向custom时 diff 混入 #5(35 个文件),base 设为feat/organize-mode-setting;diff 中仍会含 #6 与 dev 脚本的改动,本 PR 自身改动见最后一个提交。