Repository navigation
Have windows from an unplugged monitor redraw at their new scale - #670
Closed
oliverlukschander wants to merge 1 commit into
Closed
oliverlukschander wants to merge 1 commit into
oliverlukschander wants to merge 1 commit into
Conversation
Hyprland 0.56.2 tells a window it has left a monitor only while that monitor is still enabled, so the windows of a monitor that's unplugged are never told they left it. Chromium keeps laying such a window out at the scale of the monitor it never left, drawing it in a corner of the window when the monitor it's on now has another scale, until the window next changes size: after a desk monitor at 1.25, a MacBook panel at 3 shows each Chromium window's content in about 40% of its tile. Foot and the others draw at the right scale. This is a workaround until Hyprland or Chromium fix it. Once a removal has reached the clients, each window that was open then gets a pixel more border when its workspace is showing, and its own border back a moment later: a resize nobody sees, after which it draws at the scale of the monitor it's on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Closing: the Mac desktop now lives in upstream Omarchy, whose AGENTS.md asks for an upstream fix before a platform workaround, and I'm not taking this Hyprland/Chromium behaviour there. I keep the hook in my own build; the analysis is in the description above if anyone hits the same thing. |
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.
After a monitor is unplugged, Chromium windows that were on it can go on drawing at its scale, in a corner of the window, until they're resized. This has them redraw at the scale of the monitor they're on now.
Why
CWindow::updateSurfaceScaleTransformDetails). So the windows of a monitor that's unplugged are never told they left it.This is a workaround. Going by Hyprland's source, the cause lies in Hyprland and Chromium.
How
default/hypr/monitor-removal-redraw.lua, loaded right aftermonitor-removal.lua:It doesn't depend on #638, which lists the bug as a known issue.
Testing
test/shell.d/hyprland-monitor-removal-redraw-test.shcovers the timing, windows on hidden workspaces, one nudge per window, and windows opened or closed meanwhile. It,hyprland-monitor-removal-test.shandarchitecture-gates-test.shpass.Built with Claude Code, and tried on my own machine. I can walk through any part of it in review.
🤖 Generated with Claude Code