Rectangle
Rectangle copied to clipboard
Maximize screen moves window to screen of origin
- [ ] This is a new bug that hasn't been documented in a closed issue or in the Readme.
macOS version: 15.1.1 (24B91)
Rectangle version: Version 0.85 (91)
Logs if applicable (In Rectangle menu, hold option, "View Logging..."): 2024-12-17T12:05:31+01:00: AXEnhancedUserInterface was enabled, will disable before resizing 2024-12-17T12:05:31+01:00: AX sizing proposed: (1470.0, 855.0), result: (1470.0, 855.0) 2024-12-17T12:05:31+01:00: AX position proposed: (225.0, 125.0), result: (225.0, 125.0) 2024-12-17T12:05:31+01:00: AX sizing proposed: (1470.0, 855.0), result: (1470.0, 855.0) 2024-12-17T12:05:31+01:00: nextDisplay | display: (0.0, 0.0, 1920.0, 1055.0), calculatedRect: (225.0, 125.0, 1470.0, 855.0), resultRect: (225.0, 125.0, 1470.0, 855.0), srcScreen: Built-in Retina Display, destScreen: PLX2481H, resultScreen: PLX2481H 2024-12-17T12:05:32+01:00: AXEnhancedUserInterface was enabled, will disable before resizing 2024-12-17T12:05:32+01:00: AX sizing proposed: (1470.0, 855.0), result: (1470.0, 855.0) 2024-12-17T12:05:32+01:00: AX position proposed: (228.0, 1117.0), result: (228.0, 1117.0) 2024-12-17T12:05:32+01:00: AX sizing proposed: (1470.0, 855.0), result: (1470.0, 855.0)
Description
There is a reported bug that "move to another screen" does not move the window maximized when screens have different resolutions. To overcome this, I want then to maximize the screen. However, it does not work every time. Instead, the window moves back to original screen and maximizes there.
Scenario
- Open new Chrome window (for example) on Mac built in screen -> It is open in maximized mode (not fullscreen)
- Move window to secondary monitor (control+option+command+left) (I have only one, the PLX2481H) -> window moves but is not maximized
- Maximize the window (control+option+backspace) -> the window moves to Mac built in screen maximized
P.S. The scenario works correctly if we switch screens. So if I:
- open window on the external display (it's maximized)
- move to built in (it's maximized)
- then move back to external display - then the window is not maximized (however it's a bit bigger than if it's other way around)
- maximize the window - the window correctyl maximizes
Thanks for reporting with details. It's possible that the move is being tripped up by the AXEnhancedUserInterface noted in the logs. I'll take a look.
I never was able to reproduce this one. Do you still experience this issue? After reading back through this, one thing worth noting is that control+option+backspace is the default shortcut for restore, not for maximize. Either way, the default behavior of Rectangle is to automatically maximize when moving across displays if the window is already maximized, and if that's not happening then I suspect it has to do with interference by another app (and hence the AXEnhancedUserInterface).
Yes, I still experience this issue in the same way as described originally. It's the question of on What display the window originates. Thank you for reviewing it and the notice about restore X maximize. I will look up the maximize shortcut and see if it works the same.
Odesláno z aplikace Outlook pro iOShttps://aka.ms/o0ukef
Od: Ryan Hanson @.> Odesláno: Monday, June 23, 2025 1:31:28 AM Komu: rxhanson/Rectangle @.> Kopie: martinmastny @.>; Author @.> Předmět: Re: [rxhanson/Rectangle] Maximize screen moves window to screen of origin (Issue #1529)
[https://avatars.githubusercontent.com/u/13651296?s=20&v=4]rxhanson left a comment (rxhanson/Rectangle#1529)https://github.com/rxhanson/Rectangle/issues/1529#issuecomment-2994524239
I never was able to reproduce this one. Do you still experience this issue? After reading back through this, one thing worth noting is that control+option+backspace is the default shortcut for restore, not for maximize. Either way, the default behavior of Rectangle is to automatically maximize when moving across displays if the window is already maximized, and if that's not happening then I suspect it has to do with interference by another app (and hence the AXEnhancedUserInterface).
— Reply to this email directly, view it on GitHubhttps://github.com/rxhanson/Rectangle/issues/1529#issuecomment-2994524239, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BNYVW77MRKJCZXMHSMEMSP33E44FBAVCNFSM6AAAAABTYHCEDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSOJUGUZDIMRTHE. You are receiving this because you authored the thread.Message ID: @.***>
I tried the scenario with suggested maximize shortcut (control+option+enter). It works:
- Open new Chrome window (for example) on Mac built in screen -> It is open in maximized mode (not fullscreen)
- Move window to secondary monitor (control+option+command+left) (I have only one, the PLX2481H) -> window moves but is not maximized
- Maximize the window (control+option+enter) -> the window maximizes on the secondary monitor
I believe I am having the same issue and I can reproduce it every time. Here are my steps:
- Open app (any app that can be maximized - Finder, Browser, TextEdit etc.)
- Drag app to Display 1 with your mouse (if it’s not already there). Classic PC mouse, not magic mouse --> This sort of “assigns/stickies” the app to Display 1
- (Optional: Resize the app by dragging its corners to a unique shape that is easy to remember. For example really wide, but not very tall window. - This will make sense later)
- Maximize the app on Display 1 by double clicking its title bar —> Works as expected, app is maximized, remains on Display 1
- Use the “Next Display” shortcut to move the app to Display 2 —> The app will be moved to Display 2, but will usually be resized, but will be slightly off, and usually will not be maximized properly. (Hence step 6)
- Attempt to maximize the app (on Display 2) by double clicking its title bar —> The app will unexpectedly move back to Monitor 1 and it will restore its original size and placement from step 3 (wide and short window).
- Maximize the app (which is now back on Display 1) —> This will work as expected, it maximizes the app on Display 1
Ways to avoid triggering the bug:
When moving windows between Displays, avoid using the “Next Display” Rectangle shortcut. Instead, move the app manually over with your mouse (this seems to assign/sticky the app to that specific Display). After this, double clicking on the title bar will properly maximize the app on said Display, and it will NOT unexpectedly move back to the previous Display.
Notes:
Tested with Mac internal screen + external monitor. It does not matter which one corresponds to Display 1 or 2. You can start on either one and make it move unexpectedly to the other one. The screens have different resolutions. I couldn't test on matching resolutions.
Settings I tried which didn’t help:
- Adjusting Dock position
- Adjusting whether Dock is hidden
- Adjusting Display arrangement (Displays side by side vs on top of each other)
My settings that might be relevant:
System Settings -> Windows
Drag windows to screen edges to tile ❌
Drag windows to menu bar to fill screen ❌
Hold Option key while dragging windows to tile ❌
Tiled windows have margins ❌
System Settings -> Mission Control
Automatically rearrange Spaces based on most recent use ✅
When switching to an application, switch to a Space with open windows for the application ✅
Group windows by application ✅
Displays have separate Spaces ❌
Drag windows to top of screen to enter Mission Control ❌
Rectangle:
Snap windows by dragging ✅
Restore windows size when unsnapped ❌
Repeated commands: do nothing
Remove key keyboard restrictions: ✅
Move cursor along with window across displays: ✅
Double click window title bar to maximize: ✅
Example log:
- App maximized on External Display
- App moved to Internal Display via "Next Display" shortcut
- Attempted to maximize app on Internal Display
- App unexpectedly moved back to External display
2025-07-26T19:58:22+02:00: AX sizing proposed: (1920.0, 1055.0), result: (1768.0, 767.0)
2025-07-26T19:58:22+02:00: AX position proposed: (0.0, 25.0), result: (0.0, 25.0)
2025-07-26T19:58:22+02:00: AX sizing proposed: (1920.0, 1055.0), result: (1920.0, 1055.0)
2025-07-26T19:58:22+02:00: maximize, display: (0.0, 0.0, 1920.0, 1055.0), calculatedRect: (0.0, 25.0, 1920.0, 1055.0), resultRect: (-0.0, 25.0, 1920.0, 1055.0), srcScreen: DELL P2717H, destScreen: DELL P2717H, resultScreen: DELL P2717H
2025-07-26T19:58:25+02:00: AX sizing proposed: (1710.0, 1069.0), result: (1710.0, 1055.0)
2025-07-26T19:58:25+02:00: AX position proposed: (86.0, 1123.0), result: (86.0, 1123.0)
2025-07-26T19:58:25+02:00: AX sizing proposed: (1710.0, 1069.0), result: (1710.0, 1069.0)
2025-07-26T19:58:25+02:00: nextDisplay, display: (86.0, -1112.0, 1710.0, 1069.0), calculatedRect: (86.0, 1123.0, 1710.0, 1069.0), resultRect: (86.0, 1123.0, 1710.0, 1069.0), srcScreen: DELL P2717H, destScreen: Built-in Retina Display, resultScreen: Built-in Retina Display
2025-07-26T19:58:30+02:00: AX sizing proposed: (1628.0, 516.0), result: (1628.0, 516.0)
2025-07-26T19:58:30+02:00: AX position proposed: (152.0, 313.0), result: (152.0, 313.0)
2025-07-26T19:58:30+02:00: AX sizing proposed: (1628.0, 516.0), result: (1628.0, 516.0)
Displays: DELL P2717H - 1920x1080 Internal Display - 1710x1112
Versions: MacOS 15.5 Rectangle 0.87
Thanks @Daeron08 for your detailed report.
- Use the “Next Display” shortcut to move the app to Display 2 —> The app will be moved to Display 2, but will usually be resized, but will be slightly off, and usually will not be maximized properly. (Hence step 6)
This is still the piece of this puzzle that I cannot reproduce. Rectangle's logic when moving displays will check if it was last maximized, and if so then it will maximize on the next display. Is your log here specifically for this scenario (the maximize, then the next display of step 5)? When it reaches the next display here and is not maximized, what is the size/position of the window relative to the screen?
I tried to record both screens, my key and mouse presses as well the Rectangle log. Hopefully it helps. Shift Option Arrow is my Next Display key.
https://i.imgur.com/bC9j2ab.mp4
2025-07-27T13:51:08+02:00: AX sizing proposed: (1710.0, 1069.0), result: (1617.0, 979.0)
2025-07-27T13:51:08+02:00: AX position proposed: (86.0, 1123.0), result: (86.0, 1123.0)
2025-07-27T13:51:08+02:00: AX sizing proposed: (1710.0, 1069.0), result: (1710.0, 1069.0)
2025-07-27T13:51:08+02:00: maximize, display: (86.0, -1112.0, 1710.0, 1069.0), calculatedRect: (86.0, 1123.0, 1710.0, 1069.0), resultRect: (86.0, 1123.0, 1710.0, 1069.0), srcScreen: Built-in Retina Display, destScreen: Built-in Retina Display, resultScreen: Built-in Retina Display
2025-07-27T13:51:12+02:00: AX sizing proposed: (1920.0, 1055.0), result: (1710.0, 1055.0)
2025-07-27T13:51:12+02:00: AX position proposed: (0.0, 25.0), result: (0.0, 25.0)
2025-07-27T13:51:12+02:00: AX sizing proposed: (1920.0, 1055.0), result: (1796.0, 1055.0)
2025-07-27T13:51:12+02:00: nextDisplay, display: (0.0, 0.0, 1920.0, 1055.0), calculatedRect: (0.0, 25.0, 1920.0, 1055.0), resultRect: (-0.0, 25.0, 1796.0, 1055.0), srcScreen: Built-in Retina Display, destScreen: DELL P2717H, resultScreen: DELL P2717H
2025-07-27T13:51:18+02:00: AX sizing proposed: (1576.0, 334.0), result: (1576.0, 334.0)
2025-07-27T13:51:18+02:00: AX position proposed: (179.0, 1213.0), result: (179.0, 1213.0)
2025-07-27T13:51:18+02:00: AX sizing proposed: (1576.0, 334.0), result: (1576.0, 334.0)
https://i.imgur.com/pYhre48.mp4
2025-07-27T13:54:32+02:00: AX sizing proposed: (1920.0, 1055.0), result: (1602.0, 929.0)
2025-07-27T13:54:32+02:00: AX position proposed: (0.0, 25.0), result: (0.0, 25.0)
2025-07-27T13:54:32+02:00: AX sizing proposed: (1920.0, 1055.0), result: (1920.0, 1055.0)
2025-07-27T13:54:32+02:00: maximize, display: (0.0, 0.0, 1920.0, 1055.0), calculatedRect: (0.0, 25.0, 1920.0, 1055.0), resultRect: (-0.0, 25.0, 1920.0, 1055.0), srcScreen: DELL P2717H, destScreen: DELL P2717H, resultScreen: DELL P2717H
2025-07-27T13:54:35+02:00: AX sizing proposed: (1710.0, 1069.0), result: (1710.0, 1055.0)
2025-07-27T13:54:35+02:00: AX position proposed: (86.0, 1123.0), result: (86.0, 1123.0)
2025-07-27T13:54:35+02:00: AX sizing proposed: (1710.0, 1069.0), result: (1710.0, 1069.0)
2025-07-27T13:54:35+02:00: nextDisplay, display: (86.0, -1112.0, 1710.0, 1069.0), calculatedRect: (86.0, 1123.0, 1710.0, 1069.0), resultRect: (86.0, 1123.0, 1710.0, 1069.0), srcScreen: DELL P2717H, destScreen: Built-in Retina Display, resultScreen: Built-in Retina Display
2025-07-27T13:54:40+02:00: AX sizing proposed: (1492.0, 252.0), result: (1492.0, 252.0)
2025-07-27T13:54:40+02:00: AX position proposed: (318.0, 151.0), result: (318.0, 151.0)
2025-07-27T13:54:40+02:00: AX sizing proposed: (1492.0, 252.0), result: (1492.0, 252.0)
2025-07-27T13:54:48+02:00: AX sizing proposed: (1920.0, 1055.0), result: (1602.0, 929.0)
2025-07-27T13:54:48+02:00: AX position proposed: (0.0, 25.0), result: (0.0, 25.0)
2025-07-27T13:54:48+02:00: AX sizing proposed: (1920.0, 1055.0), result: (1920.0, 1055.0)
2025-07-27T13:54:48+02:00: maximize, display: (0.0, 0.0, 1920.0, 1055.0), calculatedRect: (0.0, 25.0, 1920.0, 1055.0), resultRect: (-0.0, 25.0, 1920.0, 1055.0), srcScreen: DELL P2717H, destScreen: DELL P2717H, resultScreen: DELL P2717H
2025-07-27T13:54:50+02:00: AX sizing proposed: (1492.0, 252.0), result: (1492.0, 252.0)
2025-07-27T13:54:50+02:00: AX position proposed: (318.0, 151.0), result: (318.0, 151.0)
2025-07-27T13:54:50+02:00: AX sizing proposed: (1492.0, 252.0), result: (1492.0, 252.0)
Note that in this one the window appears to be properly maximized after the "Next Display" shortcut, but I suspect it it's not actually the case. You can see in the other video that after the shortcut the window is not properly maximized. Presumably has something to do with the resolution differences between the two displays.
Here are the videos in higher resolution in case you need it: https://www.mediafire.com/file/t48ld0low23zaaj/aa.mkv/file https://www.mediafire.com/file/9tzlbvb6olghibp/bb.mkv/file