Skip to content

Tiling rects fixes - #471

Merged
3v1n0 merged 4 commits into
mainfrom
tiling-rects-fixes
Sep 20, 2026
Merged

3v1n0 merged 4 commits into
mainfrom
tiling-rects-fixes

Conversation

@3v1n0

@3v1n0 3v1n0 commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

The maximize flags were applied before move_resize_frame(), which made
mutter keep control of the window geometry. As a result the move to
the other tile was ignored while the window was still flagged as
vertically maximized, so it stayed at its previous x position
(overlapping the neighbouring tile) even though tiledRect reported the
intended tile.

Move and resize the window first and only then communicate the
semi-maximize flags, so mutter just has to adjust the edges of a
window that is already in place.

Fixes the regression introduced in 204c662.

Closes: #448

The maximize flags were applied before move_resize_frame(), which made
mutter keep control of the window geometry. As a result the move to
the other tile was ignored while the window was still flagged as
vertically maximized, so it stayed at its previous x position
(overlapping the neighbouring tile) even though tiledRect reported the
intended tile.

Move and resize the window first and only then communicate the
semi-maximize flags, so mutter just has to adjust the edges of a
window that is already in place.

Fixes the regression introduced in 204c662.
…a edges

addGaps() insets the tile from the work area edges whenever gaps are
enabled, but the semi-maximize decision was still made on the ungapped
rect. So with, for example, a vertical screen gap, a full-height tile
was flagged as vertically maximized even though the window was not
meant to reach the edges. Mutter then resizes it back to the whole
work area and applies the maximized look, overriding the gap.

Decide from the rect that is actually applied, so a window is only
semi-maximized when it still touches both edges of that axis.

Fixes: #448
The Tiling Popup computes the free screen space immediately after
tiling a window, but on Wayland move_resize_frame() is applied
asynchronously, so get_frame_rect() can still report the previous
geometry at that point. Wait for the window's size-changed signal
before collecting the tile group, with a timeout as fallback in case
the resize was applied synchronously before the signal was connected.

The wait is skipped when the window is already at the requested size.
tiledRect is the tile a window was asked to use and can be smaller than
what the window actually occupies when the app cannot shrink below its
minimum size (e.g. terminals or wide apps). Compute the space used for
adapting tiles and for the Tiling Popup from the union of tiledRect and
the real frame, so the next window uses the space that is actually
free.

A tile that would end up smaller than half of the default tile (or that
still overlaps another tile) falls back to the default tile to avoid
snapping into a tiny leftover.
@3v1n0
3v1n0 merged commit 54d078e into main Sep 20, 2026
3 checks passed
@3v1n0
3v1n0 deleted the tiling-rects-fixes branch September 20, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug Report: Top and bottom gaps are missing in vertical maximization tiling

1 participant