Files
image-workbench-desktop/src-tauri/Cargo.toml
T
qiqi ce44a40f5f release: v3.25.32 全屏工具打开时浏览器网页不再盖住工具(方案 2B)
症状:画布网页节点开着时,打开标注/抠图/矢量/批量导出放大预览等全屏工具,浏览器内容盖在工具上、点不到。

根因:画布网页是原生子 webview(Window::add_child),原生层永远压在 DOM 之上(z-index 无效),只能靠宿主 park。但 canvas-webview.js 的 blocked() 只认宿主三类遮罩(modal-mask/imgpreview/prompt-modal),插件全屏遮罩命名无规律(iwb-editor-overlay/iwb-cutout-overlay/vz-root/iwb-bx-zoom)且源码在独立仓库,穷举不到 → 不 park。

修法(方案 2B,插件零改动):blocked() 增加按「几何+定位」自动检测 body 直接子级里 position:fixed 且覆盖视口≥90% 且可见的浮层,命中即整体 park;保留 BLOCK_SELECTOR 快路径、跳过 #root、扫描 120ms 节流+缓存(rAF ~31fps 不掉帧)。仅改 src/canvas-webview.js(+49/−11),tick() 与下游 park 不动。

验证:node --check / eslint 0 错 / npm run build / cargo check 全过。
未验证:canvas-webview 无单测(本次未补);正确性靠手动测试矩阵;「遮罩是 body 直接子级」已静态确认三插件都有 document.body.appendChild,运行时以实测为准。
本版本暂为 mac arm64 本地测试包,未发布(未 publish-update/release.sh/push/出 win 包),测过再三平台同批上线。
2026-11-19 12:51:21 +08:00

47 lines
1.7 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[package]
name = "image-workbench"
version = "3.25.32"
description = "无限画布 · 生图工作台桌面版"
authors = ["malongan"]
license = ""
repository = ""
edition = "2024"
rust-version = "1.90"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "image_workbench_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
[build-dependencies]
tauri-build = { version = "2.7.4", features = [] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
log = "0.4"
# tray-icon:系统托盘(关闭窗口收进托盘而不是退出)
# tray-icon:系统托盘;image-png:托盘用单色 PNG 模板图标
# unstable:`Manager::get_window`(窗口级句柄,不受子 webview 影响)与 Window::add_child 都在它下面。
# 画布内嵌网页已下线(v3.25.27),但 get_window 仍要留着 —— save_geom/托盘/单实例都靠它,
# 且它比 get_webview_window 更稳(后者一旦窗口里有非同名 webview 就返回 None,见 v3.25.26)。
tauri = { version = "2.12.5", features = ["tray-icon", "image-png", "unstable"] }
url = "2"
tauri-plugin-log = "2"
tauri-plugin-dialog = "2"
tauri-plugin-fs = "2"
tauri-plugin-http = "2"
tauri-plugin-updater = "2"
tauri-plugin-single-instance = "2"
tauri-plugin-notification = "2"
arboard = "3"
image = { version = "0.25", default-features = false, features = ["png"] }
base64 = "0.22"
# 画布内嵌网页的圆角(2026-11-19):WKWebView 是矩形,要给它 backing layer 设
# cornerRadius/masksToBounds 只能走 Objective-C 消息。objc2 0.6 已由 tauri/wry 引入
# (Cargo.lock 里是同一个 0.6.x),这里显式依赖不会多编译一份。
[target.'cfg(target_os = "macos")'.dependencies]
objc2 = "0.6"