Skip to content

Windows: selected window source records full display instead of the window #420

@crbender

Description

@crbender

Summary

Selecting a specific app window in the source selector can still record the entire display on Windows.

Environment

  • OS: Windows 10/11
  • Build: packaged x64 app
  • Capture mode: native Windows capture (WGC helper available)

Steps to Reproduce

  1. Open the source selector.
  2. Choose a single window:* source.
  3. Start recording.
  4. Review the output.

Actual Result

The recording captures the full monitor instead of the selected window.

Expected Result

When a window source is selected, recording should capture that specific window only.

Root Cause

The Windows native start path builds display-target config (displayId/bounds) and does not pass windowHandle to the WGC helper, even when the selected source is a window.

Proposed Fix

In Windows native recording setup:

  1. Parse window:* source IDs into a window handle.
  2. Set config.windowHandle when valid.
  3. Only populate display targeting fields when no valid window handle exists.

Acceptance Criteria

  1. Selecting window:* results in window-only capture on Windows native path.
  2. Selecting screen:* continues to capture the display.
  3. Regression coverage added for window-handle config selection logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions