Repository navigation
intellihide: Use strict edges in the overlap test - #2735
Merged
Merged
Conversation
The rectangle overlap test was asymmetric: the right and bottom edges used a strict comparison, while the left and top ones were inclusive. A window merely touching the target box from the outside was thus reported as overlapping it. This is visible on multi-monitor setups with an extended dock: a window maximized on a monitor next to the dock one ends exactly where the dock box begins, so intellihide hid the dock for a window that is not even on its monitor. Intellihide is mutually exclusive with the fixed mode, so a dodging dock never claims a mutter strut and the work area always includes the space it covers. Windows actually sitting below the dock hence always extend past its edges, and are still detected when comparing them strictly, as we also used to do before 90e9e8e. Closes: #2680
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused change correctly implements positive-area rectangle intersection without introducing regressions.
Review effort: Balanced
Findings: None
What changed in this PR
Corrects intellihide’s rectangle intersection logic so edge-adjacent windows do not hide the dock.
Changes:
- Uses strict comparisons for left and top overlap boundaries.
- Resolves false positives on adjacent-monitor layouts.
| File | Description |
|---|---|
intellihide.js |
Makes rectangle overlap checks symmetric and strict. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
The rectangle overlap test was asymmetric: the right and bottom edges used a strict comparison, while the left and top ones were inclusive. A window merely touching the target box from the outside was thus reported as overlapping it.
This is visible on multi-monitor setups with an extended dock: a window maximized on a monitor next to the dock one ends exactly where the dock box begins, so intellihide hid the dock for a window that is not even on its monitor.
Intellihide is mutually exclusive with the fixed mode, so a dodging dock never claims a mutter strut and the work area always includes the space it covers. Windows actually sitting below the dock hence always extend past its edges, and are still detected when comparing them strictly, as we also used to do before 90e9e8e.
Closes: #2680