Repository navigation
Center a popped-out window again when it moves to another monitor - #14549
Conversation
Hyprland carries a floating window to another monitor at its offset from the old monitor's origin, so a window popped out with Super+O lands off-center there, or partly off a smaller or portrait screen. A dispatcher move fires window.move_to_workspace before the window lands, so the center is deferred a loop; a mouse drag has already landed on its monitor by then and keeps where it was dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
[Medium impact] The PR appears safe to merge; no actionable defects were found. SummaryCenters popped-out windows after keyboard moves to another monitor.
The previous-review commits have different merge bases with the target commit, so this review covered the full PR diff. No previous review threads were supplied. Reviews (2) · Last reviewed commit: "Merge quattro into the pop-out centering..." · Reviewed by Greptile |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This had fallen out of merging cleanly with Re-verified at that head on an Omarchy worker running Hyprland 0.56.2, with a second, portrait 1440x2560 output. On Reviewed by Claude Opus 5.5 and by Codex at medium effort as a second opinion; neither found a defect. Codex checked the event timing, the timer and the center dispatcher against Hyprland 0.56.2's source, and found that this handler coexists with the existing This now waits on a maintainer's decision. |
…acom#14549) Hyprland carries a floating window to another monitor at its offset from the old monitor's origin, so a window popped out with Super+O lands off-center there, or partly off a smaller or portrait screen. A dispatcher move fires window.move_to_workspace before the window lands, so the center is deferred a loop; a mouse drag has already landed on its monitor by then and keeps where it was dropped. Co-authored-by: Omarchybot <317366263+omarchybot@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Codex Medium <noreply@openai.com> (cherry picked from commit 60a912b)
A window popped out with Super+O is centered on its monitor when it pops, but moving it to a workspace on another monitor (Super+Shift+N, or the silent Super+Shift+Alt+N) leaves it at the same offset from the new monitor's origin as it had from the old one. Hyprland translates a floating window across monitors that way and never re-centers it. On a monitor of a different size the window lands off-center, and on a smaller or portrait one it hangs partly off the screen: a 1300x900 pop-out centered on a 4K TV lands 1270px in on a 1440px-wide portrait monitor.
default/hypr/pop.lualistens forwindow.move_to_workspaceand, for a window taggedpopwhose destination workspace is on another monitor, centers it there. Hyprland 0.56.2 fires the event for a dispatcher move before the window has landed, whilewindow.monitorstill names the monitor it is leaving, so centering inside the handler would measure the old monitor; the center runs from a 1 ms oneshot timer instead, once the move is done. Moves between workspaces on the same monitor are left alone, as is a popped window dragged onto another monitor with the mouse: by the time a drag fires the event the window is already on its new monitor, so it stays where it was dropped. A window popped with explicitx yarguments is centered too when it changes monitor, since coordinates chosen for one monitor do not carry to another. Windows larger than their new monitor are still not shrunk to fit; that is #9731 and #9699.Reproduced on an Omarchy worker running Hyprland 0.56.2 with a second, portrait 1440x2560 output: on
quattrothe pop-out moved from (240,163) on the first monitor to the same (240,163) offset on the second; with this change it lands centered at (320,1043). Reviewed by Codex at medium effort over two rounds; the second round found nothing open.Fixes #7160