Repository navigation
Conversation
Hyprland's xwayland.force_zero_scaling leaves an X11 window in physical pixels, so a fixed layout draws tiny text on a scaled monitor. The app still lays out in logical pixels. The X framebuffer is that size times the focused monitor's scale (BACKPLANE_UI_SCALE overrides; hyprctl supplies the factor otherwise). A fractional scale is resampled bilinearly in linear light. Scale 1 keeps the previous path, including the 64 px dirty blocks.
Author
|
This is my first AI-assisted PR, so if there's a problem fell free to trash it. I needed to be able to read the text on a higher-DPI display and thought I should at least try to give back since I had Grok build me a fix. |
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.
The native window is an X11 client with a fixed pixel layout. On Hyprland with
xwayland.force_zero_scaling, the compositor does not scale that window, so 14 px text stays 14 physical pixels and is hard to read on a scaled monitor.The layout and pointer events stay in logical pixels. The X window and its framebuffer are that size times the monitor scale.
BACKPLANE_UI_SCALEoverrides the factor. When it is unset, the focused monitor'sscale:fromhyprctl monitorsis used. A value near 1, or no Hyprland, keeps the old 1:1 path, including the 64 px dirty blocks. Any other scale (0.5 to 4) resamples the frame bilinearly in linear light, so a fractional factor does not stair-step glyphs.BACKPLANE_SNAPstill writes the logical frame.The web client and the phone apps are unchanged. They already follow CSS and device pixels. This is only the X11 framebuffer.
Checked on a Hyprland session at scale 1.6: the process logged
UI scale 1.6 (window 2240x1440 for a 1400x900 layout), and a glyph edge blended through intermediate grays. That build was thiswin.con the v0.11.1 tree;win.cat that tag is the same as currentmainbefore this change. Bend sources are untouched, sobend PROOF.bendwas not re-run.