feat: add Combined Display Mode#1763
Open
dooyeoung wants to merge 1 commit into
Open
Conversation
Add a setting to treat multiple monitors as a single virtual display, so window actions (half, center, maximize, corners, etc.) operate across all connected monitors at once. Settings window: "Treat multiple monitors as one" checkbox with description, separated by a divider line from other options. Localized via NSLocalizedString with Korean translation in Main.xcstrings. When enabled: - All window calculations receive a combined bounding frame of all monitors - BestEffortWindowMover uses the combined frame to avoid single-screen clamping - Left/Right half, Center, CenterProminently respect the combined frame - Next/Previous Display menu items are hidden Implementation: - Defaults.combinedDisplayMode (BoolDefault) persists the setting - WindowCalculationParameters carries combinedDisplayFrame: CGRect? - WindowManager computes the union of all screen visible frames when enabled Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Owner
|
Thanks for contributing! I actually implemented this in Rectangle Pro and simply didn't have time yet to test it thoroughly, officially release it, and port it to Rectangle. When I implemented it, I had simply adjusted the NSScreen extension in ScreenDetection to have this: func adjustedVisibleFrame(_ ignoreTodo: Bool = false, _ ignoreStage: Bool = false) -> CGRect {
var newFrame = visibleFrame
if !NSScreen.screensHaveSeparateSpaces && Defaults.combinedDisplayMode.enabled {
newFrame = NSScreen.screens.reduce(CGRect.null) { $0.union($1.visibleFrame) }
}
...That avoided touching the WindowManager and other specific calculation files. There might be a reason why Claude took your path instead, but off the top of my head I'm not sure what it would be. Would you mind swapping out your implementation here with this and seeing if it does what you expect? |
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.
Summary
Settings
A new checkbox is added to the Settings window under the display-related options, separated by a divider:
Localized via
NSLocalizedStringwith Korean translation inMain.xcstrings.When enabled, the Next/Previous Display menu items are hidden.
Implementation
Defaults.combinedDisplayMode(BoolDefault) persists the settingWindowCalculationParameterscarries an optionalcombinedDisplayFrame: CGRect?WindowManagercomputes the union of all screen visible frames and passes it through the calculation pipelineCenterCalculation,CenterProminentlyCalculation, andLeftRightHalfCalculationupdated to respect the combined frameBestEffortWindowMoverreceives the combined frame asvisibleFrameOfDestinationScreento prevent single-screen clampingTest plan
🤖 Generated with Claude Code