Bug
On Windows, the Cap recording UI appears as a black rectangle in studio mode recordings, starting from the second recording session. The first recording may be unaffected if the Cap window wasn't visible at capture start.
Root cause
Window exclusion is gated entirely to macOS in apps/desktop/src-tauri/src/recording.rs:
#[cfg(target_os = "macos")]
let excluded_windows = { ... resolve_window_ids(...) };
// later:
#[cfg(target_os = "macos")]
{
builder = builder.with_excluded_windows(excluded_windows.clone());
}
resolve_window_ids in window_exclusion.rs is also #[cfg(target_os = "macos")] only. On Windows, with_excluded_windows is never called, so Cap's own UI is always captured.
Expected behaviour
Cap's own windows (recording controls, camera overlay, etc.) should be excluded from the screen capture on Windows, matching the macOS behaviour.
Steps to reproduce
- Open Cap on Windows
- Start a studio mode recording
- Stop and open the editor — first recording may look fine
- Start a second studio mode recording while the Cap UI is visible
- Stop and check the recording — Cap UI appears as a black rectangle
Fix needed
Implement window exclusion for Windows using the appropriate screen capture API (Windows Graphics Capture / DXGI). The exclusion list is already built and available in general_settings::default_excluded_windows() — it just needs to be wired up for the Windows capture pipeline.
Relevant files:
apps/desktop/src-tauri/src/recording.rs:874-893 — macOS-only exclusion block
apps/desktop/src-tauri/src/window_exclusion.rs — resolve_window_ids is macOS-only
Bug
On Windows, the Cap recording UI appears as a black rectangle in studio mode recordings, starting from the second recording session. The first recording may be unaffected if the Cap window wasn't visible at capture start.
Root cause
Window exclusion is gated entirely to macOS in
apps/desktop/src-tauri/src/recording.rs:resolve_window_idsinwindow_exclusion.rsis also#[cfg(target_os = "macos")]only. On Windows,with_excluded_windowsis never called, so Cap's own UI is always captured.Expected behaviour
Cap's own windows (recording controls, camera overlay, etc.) should be excluded from the screen capture on Windows, matching the macOS behaviour.
Steps to reproduce
Fix needed
Implement window exclusion for Windows using the appropriate screen capture API (Windows Graphics Capture / DXGI). The exclusion list is already built and available in
general_settings::default_excluded_windows()— it just needs to be wired up for the Windows capture pipeline.Relevant files:
apps/desktop/src-tauri/src/recording.rs:874-893— macOS-only exclusion blockapps/desktop/src-tauri/src/window_exclusion.rs—resolve_window_idsis macOS-only