Repository navigation
Keep the tiling's places when a workspace switches to floating - #18142
Open
LOLCATATONIA wants to merge 13 commits into
Open
LOLCATATONIA wants to merge 13 commits into
LOLCATATONIA wants to merge 13 commits into
Conversation
Super + arrows put the window in that half, then a quarter (KWin's rules), and towards the edge it is against already they maximize it; anywhere but a floating workspace they move focus as before. Dragging a window to a side edge snaps it to that half, near a corner to a quarter, and to the top edge maximizes, with an outline of the target drawn by a new shell plugin; on an edge shared with another monitor it snaps only after a pause. A snapped window dragged away gets its size back, and a window too large for a tile is left as it is. The drags come from the titlebars plugin's hyprbars.drag_* events. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A window the floating mode opens beside snapped ones goes into the one tile they leave free: the right half beside a left half, the fourth quarter beside three. With the screen filled exactly, the half used last makes room, keeping its top (or left) quarter. Closing a window on a quarter gives its space back to the window sharing its half. Only snapped windows are arranged, never while one is maximized, and nothing else moves windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Floating a tiled workspace sized every window the same and centred them in a cascade, a pile of cards. Each window now keeps the box tiling gave it: near a half or quarter (within 5%) it becomes that snapped tile, any other box on screen stays as it is, and one off the screen, such as a scrolling column, joins the snapped windows as a new window would, on the half on its side. Dragged away, a kept window takes the mode's comfortable size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 8, 2026
LOLCATATONIA
marked this pull request as ready for review
November 8, 2026 10:27
Contributor
[Medium impact] The PR appears safe to merge; both previous findings are addressed. SummaryKeeps tiled windows in place when their workspace switches to floating, with snapping for nearby halves and quarters.
|
Beside a shorter monitor only part of an edge is shared, so a drag could enter a zone where the edge is outer, snapping at once, and slide on into the part the other monitor shares without leaving the zone: the early return kept the snap, and letting go there skipped the pause meant for crossing over. The drag now keeps whether the edge under the pointer is shared, and starts over when that changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A snap from maximized first waits for the window's own size, and an arrow pressed meanwhile read the window as it was, not the tile already asked for: Left then Up gave the top half. A pending placement now carries its tile, and the next arrow starts from it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # test/shell.d/hyprland-floating-workspaces-test.sh
On the first switch to floating in a session the titlebars plugin is only asked for, and Hyprland loads it on the next config pass: windows kept in place then took their whole tile, and the titlebar added afterwards stuck out above it, so they no longer counted as snapped. The height now comes from Omarchy's own titlebar setting rather than from the plugin. An app that draws its own frame (Chromium, Omarchy's browser) gets no titlebar at all, so it is tagged where that rule is made, and keeps its whole tile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the first switch to floating in a session, windows are kept in place before the titlebars plugin is in and before the rule marking apps that draw their own frame applies, so a browser was left room for a titlebar it never gets. Once the plugin is in, a window snapping placed whose box would be its tile with the titlebar the other way round goes back into that tile; a window already in its tile, or resized by hand, stays as it is. Checked with Chromium in a nested Hyprland through the layout toggle's own reload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Whether the edge under the pointer is shared is now asked on every motion in a zone; the monitor layout behind it stays put during a drag, so it is read once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…our's A closing window has lost its titlebar, so its tile was measured with a snapped neighbour's decorations, which miss when one of them is a browser drawing its own frame. It is now measured with the neighbour's decorations, then with a titlebar more or less; the two differ by far less than any two tiles, so at most one fits. Tested both ways round. 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.
What changes
Stacked on #18141 (snapping), so its commits show here too.
Switching a workspace to floating with
Super + Lresets every window to the same comfortable size and centres them in a cascade, a pile of cards; #17876 and #17971 ask for windows to keep their size and place. With snapping (#18141) in, each window can keep the box tiling gave it:workspace-modes.luareads every window's box before any of them floats and offers each to snapping (o.snap.adopt); a window snapping can't keep is placed as before. This doesn't touch what happens to windows moved between workspaces, only the switch itself.Verification
./test/all: see Snap windows on floating workspaces #18141 (run on the whole stack).hyprland-floating-workspaces-test.shgoes from 62 to 66 checks, with a half kept as a tile, its restore size, one restore tag, and a window off the screen joining the half on its side. It fails with the old cascade. Three more: the first switch with the plugin still loading, an app with its own frame keeping its whole tile, and a snapped window whose titlebar changed going back into its tile.Super + Lcycle dwindle, scrolling, floating brings all three into tiles with none overlapping, the column off the screen joining the half on its side, and each window with one restore size.workspace-modes.lua; the tests pass on the merge.Screenshots
Not recorded separately: the windows keep the layout tiling gave them, which is what the screen showed before the switch. The snapping PR (#18141) has a recording of what it builds on. Happy to add a screenshot if it helps.
🤖 Generated with Claude Code