Remap bar and background surfaces when their monitor moves

Hyprland leaves an already-mapped layer surface at its old global
position when its monitor moves within the layout: undocking disables
the internal panel, the external monitor shifts to x=0, and the bar and
background keep rendering at the old offset until unmapped and remapped.
Watch each screen's origin and briefly unmap the window when it moves so
the compositor re-places the surface at the monitor's new origin.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
David Heinemeier Hansson
2026-08-05 17:23:17 +02:00
co-authored by Claude Fable 5
parent b538dd545a
commit 2daeaa7078
4 changed files with 57 additions and 2 deletions
+6 -1
View File
@@ -938,7 +938,12 @@ Item {
component BarPanel: PanelWindow {
id: barWindow
visible: !root.barHidden
visible: !root.barHidden && !remapGuard.remapping
ScreenMoveRemap {
id: remapGuard
window: barWindow
}
anchors {
top: root.position === "top" || root.vertical