Repository navigation
fix: correct X11 target overlay sizing at high DPI - #2590
Merged
richiemcilroy merged 5 commits intoOct 24, 2026
Merged
Conversation
Contributor
|
@jatmn is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
jatmn
marked this pull request as ready for review
October 14, 2026 21:09
Member
|
@jatmn thanks for tracking this down, the X11 conversion looks right and stays out of the macOS and Windows paths. One small thing before we merge: could you drop apps/desktop-gpui/docs/x11-overlay-hidpi.png from the branch? It is only referenced by the PR description (which already links it by commit SHA, so the image keeps working), and we would rather not ship it in the repo. Could you also merge main in so the Clippy and Linux Rust test jobs run on the latest head? Thanks! |
This was referenced Oct 20, 2026
Member
|
@greptileai review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2323 in the current GPUI desktop app.
On X11, scap-targets exposes RandR bounds in physical pixels, while GPUI interprets window bounds as logical points. At
Xft.dpi=192, a 2560×1600 display therefore opened a 5120×3200 target overlay, leaving its controls off-screen.Convert X11 capture coordinates to GPUI points for overlay sizing, work-area placement, and window highlights, and convert selected areas back to capture coordinates. Use GPUI's actual X11 scale factor; other backends retain their existing coordinate convention.
Validated on a real X11 server (Xvfb, Debian, software Vulkan):
cargo +1.95.0 fmt --all -- --checkcargo +1.95.0 check --locked -p cap-desktop-gpuiETXTBSY; the complete rerun passed.Mint/MATE hardware and other operating systems were not exercised locally. The existing GPUI X11 two-pixel origin offset is outside this size correction.
Original overlay validation commit:
f0a8217aebc363e1beaa67d43c7727aef22a8e45.Area-camera placement follow-up
Keep the camera-placement crop in GPUI logical coordinates; the native X11 window setter applies DPI scaling. Recording capture coordinates keep their conversion.
Reproduced and verified in native X11 (Xvfb/Openbox, Ubuntu 24.04, software Vulkan):
(3108, 1996), outside the 2560×1600 display and the selected(200, 100, 1600, 1200)region. After the one-line correction it is at(1308, 696)with size460×572, fully inside that same selection.cargo +1.95.0 fmt --all -- --checkandcargo +1.95.0 check --locked -p cap-desktop-gpui.Camera repair reviewed and locally validated at
873e97767e922726173dd49d72d17f9cc4daba59.Maintainer-requested branch refresh
Removed
apps/desktop-gpui/docs/x11-overlay-hidpi.pngfrom the branch and mergedmainat36627a505e53f9f1584ebca8df146fe5738c4d68. The screenshot above remains available at its original commit URL. The original two-file X11 DPI patch is preserved.Validated merged head
4f2fa65b35c98174c464c611d28589e8e1e3aae4on Linux with Rust 1.95.0:cargo check --manifest-path apps/desktop-gpui/Cargo.toml --locked -p cap-desktop-gpuipassed. Root Rust 1.88.0 formatting and formatting of both PR Rust files passed. Full GPUI formatting reports existing import order insettings_pages.rsand indentation insnapshot.rs; both files are unchanged from main and excluded from this repair. Native GUI and full cross-platform tests were not rerun locally for this merge.CI has started on the refreshed head. Under the existing path filters, the GPUI platform jobs run while Clippy and root Rust tests (Linux) are skipped for this GPUI-only diff.


Confidence Score: 5/5
The PR appears safe to merge; no actionable new issues were found.Summary
Corrects X11 target overlays at high DPI.
The target merge bases differ, so this review used the full PR diff. No previous review threads were supplied. No actionable new issues were found. Native GUI checks and tests were not rerun.
Reviews (2) · Last reviewed commit: "Merge branch 'main' into fix/x11-hidpi-o..." · Reviewed by Greptile