Description
On Windows 11, taking a screenshot of a WebView2-hosted desktop app as a specific window does not create a screenshot or open the screenshot editor. Capturing the containing display succeeds and creates the expected screenshot project.
This appears specific to Cap's Windows window-target selection rather than display capture.
Expected behavior: WebView2-hosted apps can be selected and captured like other windows.
Actual behavior: the window capture produces no screenshot project, while display capture works.
Reproduction
- Open a WebView2-hosted desktop app on Windows.
- Open Cap's screenshot target picker and choose Window, or use the Screenshot current window hotkey with the cursor over that app.
- Select the app and attempt the screenshot.
- Observe that no window screenshot is saved or opened.
- Capture the full display and observe that it succeeds.
Investigation
Both picker and hotkey selection route through scap_targets::Window::get_topmost_at_cursor.
On Windows, that path starts from WindowFromPoint and rejects executable names containing webview2 or msedgewebview2. A WebView2 child or top-level HWND can therefore be rejected before a capture target is produced. The fix should preserve Cap's self-window exclusion while allowing unrelated WebView2-hosted apps.
The screenshot store contains the successful display capture but no corresponding window project. No Windows Cap log directory was present for additional error output.
Additional Context
- Cap version: current
main at d0491b1e59d6ffe4386524ba67047d039e46d58e
- Operating system, version: Windows 11
- Reproducible target: WebView2-hosted desktop application
Acceptance criteria
- WebView2-hosted apps can be selected and captured through the picker.
- The Screenshot current window hotkey works with the cursor over a WebView2-hosted app.
- Cap's own windows and overlays remain excluded.
- Ordinary Win32 window capture and full-display capture remain unchanged.
Description
On Windows 11, taking a screenshot of a WebView2-hosted desktop app as a specific window does not create a screenshot or open the screenshot editor. Capturing the containing display succeeds and creates the expected screenshot project.
This appears specific to Cap's Windows window-target selection rather than display capture.
Expected behavior: WebView2-hosted apps can be selected and captured like other windows.
Actual behavior: the window capture produces no screenshot project, while display capture works.
Reproduction
Investigation
Both picker and hotkey selection route through
scap_targets::Window::get_topmost_at_cursor.On Windows, that path starts from
WindowFromPointand rejects executable names containingwebview2ormsedgewebview2. A WebView2 child or top-level HWND can therefore be rejected before a capture target is produced. The fix should preserve Cap's self-window exclusion while allowing unrelated WebView2-hosted apps.The screenshot store contains the successful display capture but no corresponding window project. No Windows Cap log directory was present for additional error output.
Additional Context
mainatd0491b1e59d6ffe4386524ba67047d039e46d58eAcceptance criteria