mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00

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.