Fix: apply gaps to half-tiles when maximize-with-gap is enabled#456
Open
gabriel-kassai wants to merge 1 commit into
Open
Fix: apply gaps to half-tiles when maximize-with-gap is enabled#456gabriel-kassai wants to merge 1 commit into
gabriel-kassai wants to merge 1 commit into
Conversation
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
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 #448.
Half-tiled windows lost their gaps on the maximized axis because
verticalMaximize/horizontalMaximizeapplyset_maximize_flags(...), and Meta's maximize snaps the window to the full work-area extent, overriding the gapped rect fromaddGaps(). Quarter-tiles are unaffected (they use theoverride_constraintspath, which preserves gaps); full maximize-with-gap is also unaffected (it already skipswindow.maximize()when gaps are on).This makes the vertical/horizontal cases consistent: when
maximize-with-gapis enabled they skip the maximize flag and fall through to theoverride_constraintsbranch, so half-tiles keep their configured gaps. Whenmaximize-with-gapis 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/untiledRecttracking, not Meta's maximize state.Testing: with gaps +
maximize-with-gapon, half-tiles now show gaps on all four edges; withmaximize-with-gapoff, half-tiles behave as before. Verified on GNOME Shell 50 / Wayland.