Linux/X11 HiDPI: full-screen recording overlay is ~2x too large at 200% scale

Open
#2,323 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
linux, rust, tauri

Research direction

Reproduce the full-screen recording overlay on Linux Mint 22.3 with MATE/X11, Xft.dpi=192, and 200% scaling, then trace the overlay's display-size calculation and toolkit entry point. Compare its bounds with the selected display and the GDK_SCALE=1 workaround; done means the overlay covers exactly the display at 200% without shrinking or making the main window unusable.

Written by the indexing model from the issue text.

Description

bug

Version / environment

  • Cap 0.6.0 (.deb, amd64)
  • Linux Mint 22.3, MATE 1.26.2, X11 session
  • Display: eDP-1 2560x1600 (344x215 mm), Intel Arrow Lake graphics (Vulkan, per the Cap log)
  • Xft.dpi = 192; MATE window-scaling-factor = 0 (auto)

What happens
When I choose "record full screen", the blue selection/overlay is about 2x larger than the screen. Cap's main window renders at a normal, readable size.

Workarounds tried

  • Lowering the global desktop scaling makes the overlay correct, but shrinks all UI text on the system, so it isn't practical.
  • Launching with GDK_SCALE=1 (from a terminal): the overlay is correct, but Cap's main window becomes very small and can't be resized.
  • GDK_SCALE=1 GDK_DPI_SCALE=2: overlay still correct, but the window stays small with huge text; buttons unreachable.
  • WINIT_X11_SCALE_FACTOR=1: no visible change (overlay still 2x).
  • Ctrl+ / Ctrl+scroll in the main window: no effect.
  • Settings > Experimental (GPUI preview) does not exist in my build.

Notes

  • The terminal log shows no error or scale-related message at startup. Only unrelated JACK/ALSA and mjpeg warnings.
  • I have not verified whether the overlay window is sized in physical vs. logical pixels, or whether the window toolkit is GTK/WebKit or something else.

Expected
Overlay covers exactly the selected display at 200% desktop scaling, without needing GDK_SCALE=1.

Dominant language
Rust
Stars
22.5k
Forks
1.9k
Avg merge
6h 33m
Merged PRs (30d)
77

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CapSoftware/Cap

All issues in CapSoftware/Cap

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.