Repository navigation
Unpin pinned windows before parking; re-pin on restore - #8
Merged
Merged
Conversation
SUPER+W on a pinned window (Omarchy overlay mode, Super+O) reported "parked" but left the window on screen: Hyprland silently no-ops a pinned window's move to a special workspace, so the park's moveSilent did nothing while the model tracked the window as parked. The park cut now disables the pin before the move, and restore re-enables it after the float restore (pin requires a floating window). pinned is carried through the park action, undo effects, redo, journal round-trip, and stranded recovery. lastIpcObject is only refreshed when toplevels are fetched, so a pin applied after the last refresh is invisible to the park snapshot. The unpin decision and the journal's pinned flag therefore come from the fresh park geometry read (hyprctl clients) instead: the cut always waits for that read (including with flight off), and Model.updatePinned corrects the parked action from it before any undo can run. Verified end-to-end in a headless Hyprland box: park moves the pinned window to special:reprieve with pinned=false, undo returns it to its workspace pinned and floating, and the journal persists pinned=true.
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.
Symptom
SUPER+W on a pinned window — e.g. one put into overlay mode with Omarchy's
Super+O(omarchy-hyprland-window-pop, which pins viahl.dsp.window.pin) — reportsparked, the bar counts it, but the window stays exactly where it is. Hyprland silently no-ops a pinned window's move to a special workspace:window.movetospecial:reprievereturnsokand does nothing. The model then tracks a window that was never actually parked.Root cause
snapshotFromHandlenever capturedpinned, and the park cut moved blindly.lastIpcObjectis only refreshed when toplevels are fetched, so even readingipc.pinnedat park time is unreliable: a pin applied after the shell's last refresh (the normal case — the user just pressedSuper+O) is invisible to the snapshot.Fix
hl.dsp.window.pin({ action: "disable" })beforemoveSilent; restore re-enables the pin after the float restore (pin requires a floating window).hyprctl -j clients) — including withflight off— and the unpin decision plus the journal'spinnedflag come from that read, not from the stale snapshot.Model.updatePinnedcorrects the parked action from the read before any undo can run.pinnedis carried throughparkAction,undoEffects,redolive update, journal round-trip (old journals parse as unpinned), and stranded recovery.Tests
updatePinnedcorrection incl. unknown-address no-op.lastIpcObject), park → window lands inspecial:reprievewithpinned=false; undo → back on its workspacepinned=true floating=true; journal persistspinned: true.No behavior change for unpinned windows: the pin dispatches are gated on the read's
pinnedflag.