Skip to content

feat: add Combined Display Mode#1763

Open
dooyeoung wants to merge 1 commit into
rxhanson:mainfrom
dooyeoung:feature/combined-display-mode
Open

feat: add Combined Display Mode#1763
dooyeoung wants to merge 1 commit into
rxhanson:mainfrom
dooyeoung:feature/combined-display-mode

Conversation

@dooyeoung
Copy link
Copy Markdown

Summary

  • Adds a Combined Display Mode setting that treats multiple monitors as a single virtual display
  • Window actions (left/right half, center, maximize, corners, etc.) operate across all monitors at once
  • Useful for portrait monitors placed side by side where centering across displays is desired

Settings

A new checkbox is added to the Settings window under the display-related options, separated by a divider:

☑ Treat multiple monitors as one
When using multiple monitors, treats them as a single display. Requires System Settings > Desktop & Dock > Displays have separate Spaces to be OFF.

Localized via NSLocalizedString with Korean translation in Main.xcstrings.

When enabled, the Next/Previous Display menu items are hidden.

Implementation

  • Defaults.combinedDisplayMode (BoolDefault) persists the setting
  • WindowCalculationParameters carries an optional combinedDisplayFrame: CGRect?
  • WindowManager computes the union of all screen visible frames and passes it through the calculation pipeline
  • CenterCalculation, CenterProminentlyCalculation, and LeftRightHalfCalculation updated to respect the combined frame
  • BestEffortWindowMover receives the combined frame as visibleFrameOfDestinationScreen to prevent single-screen clamping

Test plan

  • Enable Combined Display Mode in Settings
  • Verify Left Half / Right Half fills the left/right monitor entirely
  • Verify Center places window in the center of the combined display area
  • Verify Maximize fills the combined display area
  • Verify corners (Top Left, Top Right, etc.) work correctly
  • Verify Next/Previous Display menu items are hidden when mode is on
  • Disable Combined Display Mode and verify normal per-monitor behavior is restored

🤖 Generated with Claude Code

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>
@rxhanson
Copy link
Copy Markdown
Owner

rxhanson commented May 20, 2026

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants