Skip to content

fix(windows): QA 浮窗显示时不再抢前台焦点#178

Merged
appergb merged 2 commits into
mainfrom
fix/issue-164-qa-window-no-activate
May 2, 2026
Merged

fix(windows): QA 浮窗显示时不再抢前台焦点#178
appergb merged 2 commits into
mainfrom
fix/issue-164-qa-window-no-activate

Conversation

@appergb
Copy link
Copy Markdown
Collaborator

@appergb appergb commented May 2, 2026

摘要

Closes #164

把 Windows 上 QA 浮窗的显示路径从普通 window.show() 改成 SW_SHOWNOACTIVATE + SWP_NOACTIVATE,避免多轮追问时 QA 浮窗抢成前台,后续抓选区读到自家 webview。

改动

  • show_qa_window 新增 Windows 专用 show_qa_window_no_activate
  • 直接从 WebviewWindow 读取 HWND,不靠窗口标题猜句柄
  • 失败时保留 window.show() fallback,避免把窗口彻底显示不出来

验证

  • cargo check --manifest-path src-tauri/Cargo.toml
  • Windows 语义依赖 CI / 实机验证

@codex review

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @appergb, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@appergb appergb merged commit ae6be2d into main May 2, 2026
2 checks passed
@appergb appergb deleted the fix/issue-164-qa-window-no-activate branch May 2, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[windows] 划词追问第二次按 Option 抓不到选区 — show_qa_window 抢前台焦点

1 participant