Skip to content

fix(capture): fix window crop on stacked displays - #195

Merged
jsattler merged 1 commit into
mainfrom
190-windows-selection-recording-crop-issue-1
Aug 29, 2026
Merged

jsattler merged 1 commit into
mainfrom
190-windows-selection-recording-crop-issue-1

Conversation

@jsattler

@jsattler jsattler commented Aug 29, 2026 •

Copy link
Copy Markdown
Owner

SCContentFilter.pointPixelScale reports the main display's scale for a window on a display arranged above the primary one, because such a display has a negative Y origin in the global CoreGraphics space. On a 2x built-in with a 1x external above it that yields 2.0 instead of 1.0, so the stream was configured at twice the size ScreenCaptureKit renders and the recording gained blank padding to the right of and below the content.

Resolve a window's scale from the display it actually occupies instead, and set scalesToFit for window captures: independent window capture is the one mode where the configured width and height are only a buffer size, not a resize instruction.

AI usage: Opus 5; Used AI to analyze and fix the bug.

Closes #190

`SCContentFilter.pointPixelScale` reports the main display's scale for a
window on a display arranged above the primary one, because such a display
has a negative Y origin in the global CoreGraphics space. On a 2x built-in
with a 1x external above it that yields 2.0 instead of 1.0, so the stream
was configured at twice the size ScreenCaptureKit renders and the recording
gained blank padding to the right of and below the content.

Resolve a window's scale from the display it actually occupies instead, and
set `scalesToFit` for window captures: independent window capture is the one
mode where the configured width and height are only a buffer size, not a
resize instruction.

Closes #190
@jsattler jsattler linked an issue Aug 29, 2026 that may be closed by this pull request
5 of 7 tasks
@jsattler
jsattler merged commit f546108 into main Aug 29, 2026
3 checks passed
@jsattler
jsattler deleted the 190-windows-selection-recording-crop-issue-1 branch August 29, 2026 21:33
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 selection recording crop issue

1 participant