{{ message }}
Repository navigation
fix: keep a window's place while it is minimized, hidden or in fullscreen - #595
Open
joonhoekim wants to merge 1 commit into
Open
joonhoekim wants to merge 1 commit into
joonhoekim wants to merge 1 commit into
Conversation
joonhoekim
force-pushed
the
fix/keep-window-place
branch
2 times, most recently
from
October 17, 2026 18:13
99b0f11 to
6961d5c
Compare
…reen A window that left its layout for a while came back next to whatever was selected, at default sizes, and a hidden app's windows could come back in the workspace on screen instead of their own. The engine now keeps a workspace's layouts from before a window left and puts them back when only windows have left since, or else puts the window after its old neighbor, in every layout mode. Adding a window to a layout now reports a layout change, so the windows on screen make room for it at once, and a window placed in a workspace that is not shown is moved off screen instead of staying where it was drawn.
joonhoekim
force-pushed
the
fix/keep-window-place
branch
from
October 17, 2026 19:05
6961d5c to
cfecc6c
Compare
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.

TL;DR
A window that leaves its layout for a while (minimized, hidden with its app, or in native fullscreen, including browser video fullscreen) now comes back to the same place at the same size, in every layout mode, and to the workspace it left.
Refs #520; covers #541, #479 and #511. #504 is already handled by
scrolling.preserve_window_sizes.Problem
A returning window goes through the new-window path, so it is inserted next to the current selection with default sizes. Minimizing (and hiding, which Rift treats as minimizing) also clears the workspace assignment, so the window can come back in whichever workspace is on screen.
Approach
New module
layout_engine/engine/departures.rs, called fromremove_window_internalandadd_window_to_layout:preview_cloneof its workspace's layout system from before the first window that is still away left.Notes
Testing
departures.rsfor every layout mode, several windows returning in any order, a resized split after a minimize, the neighbor fallback, the workspace of a minimized window, and the layout pass a returning window asks for. They fail without the change.cargo +nightly fmt --all --check,cargo check --locked,cargo test(the only failure,empty_active_space_membership_during_wake_race_does_not_blank_known_active_windows, also fails onmainon this machine).