Skip to content

fix(linux): prevent Wayland HUD clipping at larger text scales - #1649

Open
IdrisGit wants to merge 1 commit into
getopenscreen:mainfrom
IdrisGit:fix/wayland-hud-gtk-scaling
Open

IdrisGit wants to merge 1 commit into
getopenscreen:mainfrom
IdrisGit:fix/wayland-hud-gtk-scaling

Conversation

@IdrisGit

@IdrisGit IdrisGit commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Temporarily default OpenScreen’s UI scale to 1 on native Wayland to prevent the recording bar from being clipped. XWayland, explicit scale overrides, and desktop settings are unchanged. The trade-off is that OpenScreen ignores GTK text scaling until we ship the Chromium fix, already in Electron 46 alpha, and retest on Hyprland.

Related issue

Refs #1648

Type of change

  • Bug fix

Release impact

  • Patch

Desktop impact

  • Linux

Screenshots / video

No attachment; reproduction steps are in #1648.

Testing

  • Verified --force-device-scale-factor=1 on Hyprland 0.56.2 with GTK text scale 1.1818.
  • Lint and both TypeScript checks passed. Full suite passed: 5,790 tests passed, 1 skipped (CI=true, Wayland session variables unset, four workers).

Summary by CodeRabbit

  • Bug Fixes
    • Fixed display scaling in Wayland sessions by applying a default scale factor when none is specified. Existing scale-factor settings are preserved, and X11 behavior is unchanged.

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Wayland startup configuration now adds --force-device-scale-factor=1 when the Wayland backend is in use and the switch is not already present. Tests cover explicit platform values and preservation of an existing scale factor.

Changes: Wayland scale factor

Layer / File(s) Summary
Configure and test the Wayland scale factor
electron/wayland.ts, electron/wayland.test.ts
The configuration adds the scale factor when the Wayland backend is in use and the switch is absent. Tests cover default and explicit platform settings, Wayland feature switches, and preservation of an existing value.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • Issue 1648 reports Wayland HUD clipping and identifies --force-device-scale-factor=1 as a workaround. This change adds that scale factor for the Wayland backend.
Merge Risk: Minimal · up to e6b87

This change defaults the UI scale to 1 on native Wayland to prevent recording bar clipping. XWayland, explicit scale overrides and desktop settings are unchanged. Merge risk is minimal. The trade-off is that GTK text scaling is ignored on native Wayland until the Chromium fix lands.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the fix and its scope: it prevents Wayland HUD clipping at larger text scales on Linux. The changeset defaults the device scale factor to 1 on native Wayland, which matches the title. …
Description check Passed The description follows the template. It has a Summary that explains the Wayland scale default and its trade-off. It links the related issue with Refs #1648, which is correct for a partial fix. It mar…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the fix and its scope: it prevents Wayland HUD clipping at larger text scales on Linux. The changeset defaults the device scale factor to 1 on native Wayland, which matches the title. The title is specific and follows the conventional-commit style.

Full details: Description check

Explanation

The description follows the template. It has a Summary that explains the Wayland scale default and its trade-off. It links the related issue with Refs #1648, which is correct for a partial fix. It marks the Bug fix, Patch, and Linux boxes. It has no screenshot, but it explains why none is attached. The Testing section lists the Hyprland check and the test suite results. The template's Related issue wording and Fixes # line were adapted to Refs, which is acceptable here. The Summary and Testing sections are clear.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 41219e40-1f74-4a72-9c54-77d21bf43096
Commits

Reviewing files that changed from the base of the PR and between 128ab63 and e6b87ff.

Files selected for processing: 2

  • electron/wayland.test.ts
  • electron/wayland.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

This branch has not been deployed

No deployments
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.

1 participant