Skip to content

Match Battle.net's DPI to the monitor scale on launch - #17418

Merged
ryanrhughes merged 3 commits into
quattrofrom
battlenet-match-dpi
Nov 4, 2026
Merged

ryanrhughes merged 3 commits into
quattrofrom
battlenet-match-dpi

Conversation

@ryanrhughes

Copy link
Copy Markdown
Collaborator

On a HiDPI monitor the Battle.net launcher opens at 100%, so it looks half-size. Hyprland leaves XWayland apps unscaled (xwayland:force_zero_scaling), and Wine scales them from the LogPixels DPI value in its prefix registry. Our prefix keeps Wine's default of 96, and nothing changes it to match the monitor.

omarchy-launch-battlenet now sets LogPixels from the focused monitor's scale before each launch: scale × 96, so 2 becomes 192 and 1.6 becomes 154. Battle.net's Chromium UI follows that value, so text stays sharp. Because the value is set on every launch, a scale change takes effect the next time Battle.net starts. Wine only reads the DPI at startup, so it can't follow a change while the launcher is open.

The DPI is left alone while the prefix's wineserver is running. The running launcher would ignore the new value, and wineserver writes its in-memory registry back over user.reg when it exits.

I also tried Proton's Wayland driver (PROTON_ENABLE_WAYLAND=1). It didn't help: the launcher was still drawn at 96 DPI, and the window class changed from steam_app_battlenet, so the Battle.net window rules stopped matching.

Tested on a 4K monitor at scale 2. Battle.net was half-size before this change; after it, the registry reads 192 and the launcher opens at the right size from the menu.

@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Battle.net now matches Wine's DPI to the focused monitor's scale before launch, unless its prefix is already running.

  • Battle.net uses the focused monitor's scale when it starts.

Reviews (3) · Last reviewed commit: "Redirect the Battle.net test's wineserve..." · Reviewed by Greptile

Comment thread bin/omarchy-launch-battlenet Resolved
Comment thread test/shell.d/launch-battlenet-test.sh Resolved
@ryanrhughes
ryanrhughes merged commit 24e5617 into quattro Nov 4, 2026
3 checks passed
@ryanrhughes
ryanrhughes deleted the battlenet-match-dpi branch November 4, 2026 04:40
ryanrhughes added a commit that referenced this pull request Nov 4, 2026
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.

(cherry picked from commit 24e5617)
cursor Bot pushed a commit to mark-groves/omarchy that referenced this pull request Nov 4, 2026
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.
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
cursor Bot pushed a commit to mark-groves/omarchy that referenced this pull request Nov 5, 2026
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.
omarchybot added a commit to Bartok9/omarchy that referenced this pull request Nov 17, 2026
quattro added DPI matching to omarchy-launch-battlenet (omacom#17418, omacom#18286) and a launch-battlenet-test.sh of its own. The DPI match now runs only on the path that actually launches, so focusing an open window or refusing a windowless tree leaves user.reg alone. The guard's tests join quattro's file in its style: a real windowless process stands in for the hidden tree, so pgrep is no longer stubbed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

2 participants