mirror-ghostty/macos
Mitchell Hashimoto 9262cc5704
macos: restore window frame on cascadeTopLeft since macOS 15 moves it
Fixes #2565

This appears to be a bug in macOS 15. Specifically on macOS 15 when the
new native window snapping feature is used, `cascadeTopLeft(from: zero)`
will move the window frame back to its prior unsnapped position.

The docs for `cascadeTopLeft(from:)` explicitly say:

> When NSZeroPoint, the window is not moved, except as needed to constrain
> to the visible screen

This is not the behavior we are seeing on macOS 15. The window is on the
visible screen, we're using NSZeroPoint, and yet the window is still
being moved. This does not happen on macOS 14 (but its hard to say
exactly because macOS 14 didn't have window snapping).

This commit works around the issue by saving the window frame before
calling `cascadeTopLeft(from: zero)` and then restoring it afterwards
if it has changed.

I've also filed a radar with Apple for this issue.
2024-11-02 10:16:42 -07:00
..
Assets.xcassets Revert "Revert "Merge pull request #1550 from peteschaffner/titlebar-unzoom-button"" 2024-03-28 10:48:05 +01:00
Ghostty.xcodeproj macos: make move_tab work 2024-10-25 11:54:07 -07:00
Sources macos: restore window frame on cascadeTopLeft since macOS 15 moves it 2024-11-02 10:16:42 -07:00
.gitignore build: LipoStep 2023-02-19 10:44:53 -08:00
Ghostty-Info.plist macos: use a different bundle identifier for debug builds 2024-09-29 16:16:55 -07:00
Ghostty.entitlements macos: add entitlements for basically everything so macos asks 2023-11-23 09:00:20 -08:00
GhosttyDebug.entitlements macos: add Sparkle via Swift PM 2023-12-18 19:09:38 -08:00
GhosttyReleaseLocal.entitlements fix(macos): ReleaseLocal build configuration with "Library Validation" disabled 2023-12-20 16:54:58 -05:00