Repository navigation
Match Battle.net's DPI to the monitor scale on launch (4.5) - #17513
Merged
Merged
Conversation
Hyprland leaves XWayland apps unscaled, and Wine reads its DPI from the prefix registry, so the launcher opened at 100% on HiDPI monitors. omarchy-launch-battlenet now sets LogPixels to the focused monitor's scale x 96 before each launch, and leaves it alone while the prefix's wineserver is running.
Contributor
[Low impact] The PR appears safe to merge. Summary
Reviews (1) · Last reviewed commit: "Match Battle.net's DPI to the monitor sc..." · Reviewed by Greptile |
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.
Backports #17418 to 4.5. On a HiDPI monitor the Battle.net launcher opens at 100% and looks half-size. Hyprland leaves XWayland apps unscaled (
xwayland:force_zero_scaling), and Wine takes its scale from theLogPixelsDPI value in the prefix registry, which stays at Wine's default of 96.omarchy-launch-battlenetnow setsLogPixelsto the focused monitor's scale × 96 before each launch, so a scale change takes effect the next time Battle.net starts. While the prefix's wineserver is running, it leaves the value alone: the running launcher would ignore it, and wineserver writes its own copy back overuser.regon exit.This is a clean cherry-pick of the #17418 squash commit,
24e56174. Both files matchquattrobyte for byte, andtest/shell.d/launch-battlenet-test.shpasses on this branch.Scope and risk
Only Battle.net launches through
omarchy-launch-battlenetare affected. The script rewrites only existingLogPixelslines in the Battle.net prefix'suser.reg, and skips the write if Hyprland reports no focused monitor scale. To undo it, revert this commit; the prefix keeps whatever DPI was last written until it's changed again.