Repository navigation
fix: tabbed and stacked groups go back to the split direction they had - #567
Open
mattchristenson wants to merge 1 commit into
Open
mattchristenson wants to merge 1 commit into
mattchristenson wants to merge 1 commit into
Conversation
Toggling a split container to tabbed or stacked and back (Super+Shift+T / S) changed its direction: windows above each other came back side by side, and the other way round. Leaving a group always took a direction from the monitor's shape (determineSplitLayout()), not from the container. A container now remembers its split direction when it becomes a tabbed or stacked group (Node.setGroupLayout()), and every way back to a split restores it (Node.restoreSplitLayout()): both toggles, auto-exit of a tab group left with one window, a group left with one child, and turning the tabbed/stacked features off. The monitor's shape is still the fallback for a group that never was a split. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #563.
Change.
Node.layoutis now an accessor. Whenever a split container becomes tabbed or stacked, wherever that happens (toggles, drag and drop, settings), it remembers its split direction (splitLayout).Node.restoreSplitLayout(fallback)returns to that direction, or tofallbackif there is none. Every way back to a split uses it:resetLayoutSingleChild();setGroupLayout(layout, false)): the one a toggle wraps around a window sitting directly on the workspace, and the one a drop on a window's centre creates. For those, the monitor's shape (determineSplitLayout()) stays the fallback.Testing.
scenarios/17_stack_tab_switching.py: 17.1 (stacked) and 17.2 (tabbed) fail onmain, where a vertical split comes back horizontal, and pass with this PR. That is 2/13 onmainand 4/13 on this branch; the other checks belong to the related PRs. On a build with all of them, scenario 17 passes 13/13. That build was also run in a real GNOME Shell 50 session (Ubuntu, 7680×2160) through the harness's real-session runner. Every other scenario is unchanged.prettier@2.7.1 --checkis clean.Merging note. #557 (stale tab bars) renames
parentNodetoexistParentin the auto-exit block ofremoveNode(). Whichever PR merges second needs the one-lineexistParent.restoreSplitLayout(...)there.🤖 Generated with Claude Code