Repository navigation
Conversation
added 2 commits
November 26, 2026 10:15
… to next handle_host_suggest_scale_factor() converted the current physical size back to logical pixels with a scale of 1.0 instead of the scale in use, so a second suggested scale compounded on the first. RustAudio#358 fixed this on master after next branched; this is the same change on next.
…r embedded windows A window with a parent is a host's child (a plug-in's editor, say), and the host knows the scale its own UI is drawn at, which Xft.dpi, one value for the whole X display, may not match (a Wayland-native host, per-monitor scaling). CLAP's set_scale() is documented to override any OS info. Windows without a parent keep the current order: Xft.dpi first, then the suggestion. The window's first size now uses the same rule as scale_factor(), so they agree from the start.
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 second half of #359: for an embedded window (my Godot use case), the host's suggested scale now takes precedence over
Xft.dpi. Windows without a parent keep today's order, so standalone apps see no change.As you pointed out in #359, a Wayland-native host knows the per-monitor scale its own UI is drawn at, which
Xft.dpi(one value for the whole X display) can't express. CLAP'sset_scale()is documented to "override any OS info", and with #361 the host learns whether it did.This builds on #375 (same function): only the second commit is new here...
Also, the window's first size now uses the same rule as
scale_factor(): with noXft.dpiand afallback_scale_factorin the settings, it was created at 1.0 while reporting the fallback scale.Tested on X11 (Xvfb), a 600×400 window suggested 2.0 then 1.5:
Xft.dpiOnly X11 changes; Win32 and macOS are untouched.