Skip to content

fix(recording): apply the resolution limit to X11 display and area capture - #3065

Merged
richiemcilroy merged 3 commits into
CapSoftware:mainfrom
yashranaway:fix/linux-capture
Oct 24, 2026
Merged

richiemcilroy merged 3 commits into
CapSoftware:mainfrom
yashranaway:fix/linux-capture

Conversation

@yashranaway

@yashranaway yashranaway commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

on x11, display and area recordings ignored the max resolution setting and always recorded at the native size, so a 4k screen with a 1080p cap still produced a 4k file. wayland and the other platforms already scale down to the limit.

the x11 source now grabs the full display or area as before and hands the grabber the constrained output size, so the existing frame scaler downsizes it, same as the pipewire path. window capture is untouched since it follows the window's own geometry. tests run against a dedicated 800x600 xvfb display and cover display, area and the encoded file, ignored by default like the other x11 capture tests.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

X11 display and area capture now keep the full capture region while scaling frames to the selected resolution limit. Window capture keeps its existing sizing.

  • X11 display and area recordings now fit the chosen resolution limit.

Reviews (2) · Last reviewed commit: "test(recording): hold the shared display..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

@yashranaway is attempting to deploy a commit to the Cap Software Inc Team on Vercel.

A member of the Team first needs to authorize it.

Comment thread crates/recording/src/sources/screen_capture/linux/x11_tests.rs Outdated
@richiemcilroy

Copy link
Copy Markdown
Member

Thanks, the capture change looks right. One test issue:

  1. The three new ignored tests all paint the shared root window with paint_display() and then capture it. cargo test -- --ignored runs them in parallel by default, so one test can repaint (red, then the right half blue) while another is capturing, and fail the blue-pixel check even when capture is correct. Please hold a shared static mutex across painting and capture in each test, or document and enforce --test-threads=1.

Once that's in, we'll re-run the Greptile review. It needs a 5/5 plus green CI to merge.

@yashranaway

Copy link
Copy Markdown
Contributor Author

@greptileai review

@yashranaway

Copy link
Copy Markdown
Contributor Author

@richiemcilroy done in 56b1aa5. the tests now share an async mutex that each one holds from paint_display() until its last capture, so they can't repaint each other. i ran all three in parallel on an 800x600 xvfb display and they pass. greptile is 5/5.

@richiemcilroy
richiemcilroy merged commit f8d1aff into CapSoftware:main Oct 24, 2026
47 of 49 checks passed
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.

2 participants