Repository navigation
Keep drag-to-snap on the other displays while a window is fullscreen - #1949
Merged
rxhanson merged 3 commits intoNov 3, 2026
Merged
Conversation
Snapping stopped listening for mouse events whenever the frontmost window was fullscreen, and re-checked only on app and Space changes. With separate Spaces per display, a fullscreen window takes over its own display only, so dragging another window of the same app on a second display never snapped, and a drag of another app's window was only picked up part-way through (rxhanson#1260). FullScreenSnapGate records the fullscreen window's display. With more than one display, listening continues and gestures that start on that display are ignored from mouse-down to mouse-up, which is what the absence of listening amounted to for them; the other displays snap as usual. A single display, or an unknown display, still stops listening as before, and display changes re-run the check. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Keeps both sets of tests appended at the end of RectangleTests.swift: the adjacent-display tests from rxhanson#1937 and this branch's fullscreen gate tests. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Keeps this branch's two test classes appended after the Todo reflow tests that rxhanson#1947 added at the end of RectangleTests.swift. Also restores the two closing braces at the end of NewWindowActionManagerTests that the merge of rxhanson#1945 into main dropped; without them the RectangleTests target does not compile on main. Co-Authored-By: Claude Fable 5.1 <[email protected]>
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.
Closes #1260
With a window in fullscreen on one display, dragging a window on another display does not snap: there is no footprint and nothing happens on release. The latest report on the issue describes exactly this on macOS 27.0.1 with Rectangle 2.0.3.
Cause
SnappingManagerstops listening for mouse events whenever the frontmost window is fullscreen (v0.54), and re-checks when the front app or the active Space changes (the v0.55 fix for the same multi-display scenario) or the session becomes active again. With separate Spaces per display, a fullscreen window only takes over its own display, so this leaves two holes:What changes
FullScreenSnapGate, a small value type in SnappingManager.swift, records which display the fullscreen front window is on.checkFullScreen()builds it from the front window's frame and the current display frames, at every moment it did before, plus display changes (below).NSApplication.didChangeScreenParametersNotification) re-run the check, since the display frames feed the gate and a display can come or go, or move, while a window stays fullscreen.isFullScreenremains as a view on the gate, so the existing session tests and any other reader are unchanged. No new preference, noWindowManagerchange.One consequence worth stating: on a multi-display Mac with the Mission Control dragging prevention on, its event tap now stays installed while a fullscreen window is front, so its top-edge filter, unchanged, also sees drags inside the fullscreen window when that display is the main one. All the filter does is keep a drag pinned to the top edge one point below it; the handler ignores those gestures.
Tests
FullScreenSnapGateTestscovers the decision table: no gating without a fullscreen window, a fullscreen window on one of two displays blocks gestures there only, the only display or an unknown window frame still stops listening, and the display showing most of the window is chosen.SnappingManagerFullScreenTestsdriveshandle(event:)with synthesized events: a gesture on the fullscreen display is left alone through mouse-down, drag and mouse-up, a gesture on the other display is tracked, each gesture is judged on its own, a gesture in flight is forgotten when listening stops, an ignored press finishes a gesture whose release was lost, listening continues or stops as described, and a display change re-evaluates the gate.The full
RectangleTestssuite passes: 665 tests, 0 failures, on macOS 27.0.1 / Xcode 27. I have not yet exercised it against a fullscreen window on a two-display Mac; happy to do so and report before merge if you would like.