Skip to content

macOS: refine new-window behaviors#11161

Open
bo2themax wants to merge 5 commits into
ghostty-org:mainfrom
bo2themax:fix-9310
Open

macOS: refine new-window behaviors#11161
bo2themax wants to merge 5 commits into
ghostty-org:mainfrom
bo2themax:fix-9310

Conversation

@bo2themax
Copy link
Copy Markdown
Member

@bo2themax bo2themax commented Mar 4, 2026

This fixes #9310, rc is that we're saving lastCascadePoint, but not updating it when a window moves; it only updates when a new window opens.

In fact, cascading only makes sense when there's an existing window in this screen; when there is no window in this screen, we only need to restore the last frame we saved.

The first two commits solve the new-window behaviors mentioned in #9310, and the third commit changes LastWindowPosition to save and restore frame information by screen id, and added some tests for it

Last commit skips saving the native full-screen window frame, which makes sense to me after reading the comment here.

2026-03-04.15-07-01.mov

AI Disclosure

AI proofread my comments.

@bo2themax bo2themax requested a review from a team as a code owner March 4, 2026 14:23
@bo2themax bo2themax changed the title macOS: refine new-window behaviours macOS: refine new-window behaviors Mar 4, 2026
@bo2themax bo2themax force-pushed the fix-9310 branch 3 times, most recently from c611f0c to a0e918b Compare March 5, 2026 14:25
@mitchellh mitchellh added this to the 1.4.0 milestone Mar 5, 2026
@mitchellh
Copy link
Copy Markdown
Contributor

Too many changes, going to push to 1.4!

mitchellh added a commit that referenced this pull request Mar 12, 2026
Added test case for cascading **without moving previous window**, #11161
will follow up for more accurate cascading after this.

Fixed window cascading after last pr, now we should perform cascading
**after** showing the window.
@ghostty-bot ghostty-bot Bot added the os/macos label Mar 25, 2026
@bo2themax bo2themax force-pushed the fix-9310 branch 2 times, most recently from 2e46a9a to 8558641 Compare April 30, 2026 16:25
@bo2themax bo2themax force-pushed the fix-9310 branch 2 times, most recently from 84b6720 to 2146d5e Compare May 12, 2026 07:19
@adonh

This comment was marked as duplicate.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS: new windows/tabs always open on primary monitor, moving existing windows

3 participants