Detect stacks of maximized windows in the overlap offset and badge - #1813
Draft
MyronKoch wants to merge 1 commit into
Draft
Detect stacks of maximized windows in the overlap offset and badge#1813MyronKoch wants to merge 1 commit into
MyronKoch wants to merge 1 commit into
Conversation
Neither the overlap offset nor the stacked-window badge fired for two maximized windows on top of each other - the case where the buried window is least visible. The offset is gated on positionCycles, which describes whether an action cycles through sizes on repeat; maximize doesn't, but two maximized windows still land on top of each other, so let it through that gate. Both features also skip windows covering the screen, since a maximized window shares its origin with every half and corner placement and would otherwise offset all of them (rxhanson#1766). Narrow that: the offset lifts the exclusion only when the window being placed also covers the screen, and the badge forms a stack from screen-covering windows only when the tiled ones don't - so ordinary placements behave exactly as before.
MyronKoch
marked this pull request as draft
August 11, 2026 19:26
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.
Stacking two maximized windows is the case where you most need to know something is buried — the top window covers the screen completely — but neither the overlap offset (#1762) nor the stacked-window badge (#1795) fires for it. Both quietly skip maximized windows.
Two causes:
The offset never runs for maximize. It's gated on
action.positionCycles, and.maximizeis in that list's exclusion set.positionCyclesdescribes whether an action cycles through sizes on repeat — which maximize doesn't — but it's consumed in exactly one place: this gate. Maximize doesn't cycle, yet two maximized windows still land exactly on top of each other, so the offset is let through explicitly.Screen-covering windows are skipped by both features. That exclusion is deliberate and load-bearing: a maximized window shares its origin with every half/corner placement, so matching one would offset all of them (Fix false positive overlap detection for half/third actions #1766). But it only needs to hold while the window being placed is smaller. Two windows that both cover the screen and share an origin are a genuine stack:
Placing a half onto a maximized window still ignores it, so #1766 stays fixed.
Note the offset needs somewhere to shift into, which gaps provide (maximize applies gaps unless
applyGapsToMaximizeis disabled). With no gaps a maximized window is flush to the screen edges and the existing clamping leaves it where it is — no offset, no harm.Four unit tests cover the badge's new stack selection, including that a lone maximized window can't inflate the count.