feat: 任务栏图标嵌入、窗口置顶钉子与进程资源采样
- build.rs + embed-resource 嵌入 icon.ico:gpui 从 exe 资源 ID 1 加载窗口类图标,此前缺失导致任务栏显示系统默认图标 - 标题栏新增钉子按钮:sysmon::set_topmost 经 raw-window-handle 取 HWND 调 SetWindowPos(HWND_TOPMOST),Pin/PinOff 图标随状态切换 - sysmon 模块:CPU 时间差分、工作集/峰值/提交内存、线程/句柄采样 与运行时长基准(Windows 实现,其余平台返回空采样)
This commit is contained in:
@@ -52,3 +52,18 @@ sentry = { version = "0.49", default-features = false, features = [
|
||||
"reqwest",
|
||||
"rustls",
|
||||
] }
|
||||
|
||||
# 窗口置顶(raw HWND + SetWindowPos)与进程资源采样
|
||||
raw-window-handle = "0.6"
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
windows = { version = "0.58", features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_System_Threading",
|
||||
"Win32_System_ProcessStatus",
|
||||
"Win32_System_Diagnostics_ToolHelp",
|
||||
"Win32_UI_WindowsAndMessaging",
|
||||
] }
|
||||
|
||||
# 嵌入窗口图标(gpui 从 exe 资源 ID 1 加载,缺失则任务栏显示默认图标)
|
||||
[target.'cfg(target_os = "windows")'.build-dependencies]
|
||||
embed-resource = "3"
|
||||
|
||||
Reference in New Issue
Block a user