Skip to content

Fix: apply gaps to half-tiles when maximize-with-gap is enabled#456

Open
gabriel-kassai wants to merge 1 commit into
ubuntu:mainfrom
gabriel-kassai:fix-half-tile-gaps
Open

Fix: apply gaps to half-tiles when maximize-with-gap is enabled#456
gabriel-kassai wants to merge 1 commit into
ubuntu:mainfrom
gabriel-kassai:fix-half-tile-gaps

Conversation

@gabriel-kassai

Copy link
Copy Markdown

Fixes #448.

Half-tiled windows lost their gaps on the maximized axis because verticalMaximize / horizontalMaximize apply set_maximize_flags(...), and Meta's maximize snaps the window to the full work-area extent, overriding the gapped rect from addGaps(). Quarter-tiles are unaffected (they use the override_constraints path, which preserves gaps); full maximize-with-gap is also unaffected (it already skips window.maximize() when gaps are on).

This makes the vertical/horizontal cases consistent: when maximize-with-gap is enabled they skip the maximize flag and fall through to the override_constraints branch, so half-tiles keep their configured gaps. When maximize-with-gap is off, behaviour is unchanged.

Trade-off (intentional, matches existing behaviour): a gapped half-tile is no longer reported to Meta as vertically/horizontally maximized — it's a normal constrained tile, exactly like a gapped quarter-tile and like the full maximize-with-gap window. Tile-group/restore behaviour is driven by the extension's own tiledRect/untiledRect tracking, not Meta's maximize state.

Testing: with gaps + maximize-with-gap on, half-tiles now show gaps on all four edges; with maximize-with-gap off, half-tiles behave as before. Verified on GNOME Shell 50 / Wayland.

Half-tiled windows lost their gaps on the maximized axis because
verticalMaximize / horizontalMaximize apply set_maximize_flags(...), and
Meta's maximize snaps the window to the full work-area extent, overriding the
gapped rect from addGaps(). Quarter-tiles are unaffected (they use the
override_constraints path, which preserves gaps); full maximize-with-gap is
also unaffected (it already skips window.maximize() when gaps are on).

When maximize-with-gap is enabled, skip the VERTICAL/HORIZONTAL maximize flag
so half-tiles fall through to the same gap-preserving override_constraints path
quarter-tiles use. When maximize-with-gap is off, behaviour is unchanged.

Fixes ubuntu#448
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