Repository navigation
Add an option to snap before reaching outer screen edges - #1901
Merged
Merged
Conversation
kiteretsu903
force-pushed
the
fix/review-early-edge-snap
branch
2 times, most recently
from
October 10, 2026 02:51
06c9dd1 to
6269df1
Compare
Owner
|
A couple of improvements:
|
Contributor
Author
Yep! Both make sense to me. Will apply the fixes |
kiteretsu903
force-pushed
the
fix/review-early-edge-snap
branch
from
October 13, 2026 01:35
6269df1 to
f38a130
Compare
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.
Adds the off-by-default “Snap before reaching screen edges” option. When enabled, an outer edge can activate its snap target within a configurable distance of the edge (20 points by default), so the pointer does not have to reach the physical boundary.
Corner targets retain their existing detection. Shared edges between displays retain their existing trigger margin so that moving a window between displays does not gain an early snap zone. This is checked along the shared portion of an edge, including displays with different sizes or offsets. On exposed outer edges, a positive early-snap distance overrides the configured
snapEdgeMarginvalues, including larger margins.The change is confined to
SnapEdgeDetectionand its setting. It does not change the resulting window size, placement, animation, or Layout Helper behavior. The toggle writes 20 when enabled and 0 when disabled. The stored value is a double, so users can choose a custom distance withdefaults write com.knollsoft.Rectangle snapBeforeReachingEdges -float 30and restart Rectangle. Opening settings or importing configuration preserves custom distances. With the option disabled, the original edge margins apply.Validation
The full branch XCTest suite passed (578 tests, including existing tests), covering fractional distances, override precedence, shared-boundary decisions, toggle behavior, and custom-distance preservation during settings synchronization and configuration import. A physical multi-display drag pass, including crossing partially shared edges and corner behavior, remains pending.
This replaces the corresponding part of #1892.