Repository navigation
Resize adjacent snapped windows with a draggable divider - #1907
Open
kiteretsu903 wants to merge 33 commits into
Open
kiteretsu903 wants to merge 33 commits into
kiteretsu903 wants to merge 33 commits into
Conversation
kiteretsu903
force-pushed
the
fix/review-window-dividers
branch
3 times, most recently
from
October 14, 2026 01:46
706710b to
0ba8225
Compare
kiteretsu903
force-pushed
the
fix/review-window-dividers
branch
from
November 22, 2026 05:15
af695ef to
9f7dd7c
Compare
This was referenced Nov 22, 2026
kiteretsu903
marked this pull request as ready for review
November 22, 2026 05:16
kiteretsu903
force-pushed
the
fix/review-window-dividers
branch
from
November 22, 2026 06:27
9f7dd7c to
efe8e7d
Compare
Allow a delegate to decline placement before committing action history. Include the achieved frame in the completion notification so Fit can record the final size of a snap that crosses displays.
# Conflicts: # Rectangle/Managers/WindowManager.swift
# Conflicts: # Rectangle/Managers/WindowManager.swift # RectangleTests/BlurMaterialTests.swift
# Conflicts: # RectangleTests/BlurMaterialTests.swift
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 opt-in Drag dividers to resize adjacent windows under Adjacent Windows, off by default. Hovering between an adjacent snapped pair shows a handle at the actual boundary—including unequal splits from Fit—and works with Fit disabled. Dragging previews the split and commits both window sizes on release, double-clicking requests an equal split within minimum sizes, and pressing Escape cancels an active drag or rolls back an in-flight resize. This PR builds on #1904's
BlurSurfaceViewrenderer and #1903's achieved-frame completion notification and command identity.Behavior
footprintBlurfrommainand preservesblurMaterialfrom #1904Why WindowManager, ShortcutManager, and hooks change
Divider requires deeper coordination than Fit because it resizes two windows asynchronously over Accessibility, issued AX calls cannot be recalled, and Restore bypasses move delegates. Pairing, drag tracking, capture, and preview remain inside the Divider module, while the coordination layer integrates with
WindowManagerandShortcutManagerto order execution, publish history, and transfer write ownership. Divider and cooperative resize use these contracts today; another internal feature can participate in the same coordination path while keeping its own policy and interaction logic in its module:WindowActionDispatcher(injected intoShortcutManager)ShortcutManager.WindowPlacementCoordinatorandWindowWriteFenceWindowManager. Its policy and interaction logic remain in that feature.WindowManagerDelegate.additionalWriteTargets(in candidates:)(default[])CooperativeMovefilters current external reservations (candidates) to those it may also touch during cooperative placement or source cleanup, so a command on focused window C still waits when it would also write neighbor B.WindowManagerDelegate.moveDidAccept()(default no-op)CooperativeMovecommits planned side-split state only after admission and waiting finish.While an external writer is active,
SnappingManageralso moves fullscreen AX checks off the main thread with generation and frontmost-app guards so app activation stays responsive for other apps.I would appreciate your feedback on whether this coordination boundary and hook placement fit the extension model you want for
WindowManagerandShortcutManager.Enhanced transitions
To hide sequential two-window resizing and intermediate flicker on release, an optional Enhanced transitions toggle under Adjacent Windows (macOS 14+, gated by explicit Screen Recording permission) uses ScreenCaptureKit to capture one temporary screenshot at drag start, excluding Rectangle's own overlays and covering the pair plus a shadow margin. Separate moving guides render above that frozen image, holding the pair visually steady until both window writes are acknowledged and then fading out.
Capture is asynchronous and optional: if permission is denied, unavailable, or the screenshot arrives after release, the normal live guide continues to work. The captured image remains transient in memory, with no saved image or audio recording.
Verification
Review order
Review the Divider changes on top of #1903. Merge in order: #1904 → #1903 → #1907. If the prerequisite PRs are squash-merged, replay this layer on the resulting
mainbefore merging it.Demo
10-window-dividers.mp4