Files
image-workbench-desktop/src-tauri/tauri.conf.json
T
qiqi f9c700304b fix(canvas-webview): get_webview_window 在有了子 webview 之后永久返回 None
现象:第一个网页节点正常,从第二个开始一律「画布网页启动失败:主窗口不存在」。

根因:tauri 的 get_webview_window 内部要求 is_webview_window()——该窗口下所有
webview 的 label 都必须等于窗口 label。add_child 建出 cwv-xxx 之后这个条件立刻为假,
get_webview_window("main") 从此永远返回 None(最小工程实测:建完子 webview 后
get_webview_window(main)=None、get_window(main)=Some("main"))。

- canvas_webview_ensure 改用 get_window("main"),直接拿 add_child 的宿主 Window
- 同一个坑还悄悄弄坏了窗口几何记忆:save_geom/restore_geom 也用 get_webview_window,
  只要画布上有网页节点,关窗口时尺寸就存不下来 —— 一并改 get_window
- 托盘「显示主窗口」/「隐藏到托盘」/单实例聚焦同样改成 get_window
- ensure 取不到窗口时写 _cwv.log

版本 3.25.26
2026-11-19 00:06:21 +08:00

55 lines
1.8 KiB
JSON

{
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "image-workbench",
"version": "3.25.26",
"identifier": "com.malongan.imageworkbench",
"build": {
"frontendDist": "../dist",
"beforeDevCommand": "npm run build",
"beforeBuildCommand": "npm run lint && npm run build && node scripts/strip-plugins.js"
},
"app": {
"withGlobalTauri": true,
"windows": [
{
"label": "main",
"title": "无限画布",
"width": 1440,
"height": 900,
"minWidth": 1024,
"minHeight": 640,
"resizable": true,
"fullscreen": false,
"center": true,
"dragDropEnabled": false
}
],
"security": {
"csp": "default-src 'self'; script-src 'self' blob:; worker-src 'self' blob:; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https:; font-src 'self' data:; connect-src 'self' ipc: http://ipc.localhost https: blob: data: http://127.0.0.1:30092 http://localhost:30092; object-src 'none'; base-uri 'none'; frame-ancestors 'none'"
}
},
"bundle": {
"active": true,
"targets": "all",
"category": "GraphicsAndDesign",
"shortDescription": "无限画布 · 生图工作台",
"longDescription": "节点式无限画布,本地编排与生成图片,支持系统原生另存为。",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/[email protected]",
"icons/icon.icns",
"icons/icon.ico"
],
"createUpdaterArtifacts": true
},
"plugins": {
"updater": {
"endpoints": [
"https://download.maqiart.eu.org/updates/latest.json"
],
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE3QUU1N0QwQUM5RjE1RjEKUldUeEZaK3MwRmV1RnhjNVhhSlhaSHkvbVRXNDdscHpOa0s0VHF4NHBBQVJBdDQ0dEVlck5FeEsK"
}
}
}