Skip to content

FIX: modal windows disappeared when dragged to a different space - #6

Merged
lanewei120 merged 1 commit into
bambulab:masterfrom
latu-bambulab:fix/mac-modal-windows-disappeared
Sep 10, 2026
Merged

FIX: modal windows disappeared when dragged to a different space#6
lanewei120 merged 1 commit into
bambulab:masterfrom
latu-bambulab:fix/mac-modal-windows-disappeared

Conversation

@latu-bambulab

Copy link
Copy Markdown
Contributor

Why

The commented-out original logic is [parentNSWindow addChildWindow:m_macWindow ordered:NSWindowAbove].
addChildWindow:ordered: establishes a parent-child window relationship at the AppKit level; the child window and parent window are bound to the same Mission Control Space, and the drawing context (backing store) is associated with the screen where the parent window resides.
When the parent window remains on Screen A and the modal child window is dragged to Screen B, AppKit attempts to maintain the constraint that the child window stays above the parent. However, since the parent window is not present on Screen B to serve as a reference, the window server cannot establish the necessary relative compositing relationship there; consequently, the child window is either repositioned back near the parent or fails to composite on Screen B entirely, appearing blank or disappearing.

How

By removing the addChildWindow code, the modal dialog becomes an independent top-level window, no longer bound to the parent window's screen, position, or Space.

@lanewei120
lanewei120 merged commit 3f4b248 into bambulab:master Sep 10, 2026
0 of 14 checks passed
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.

2 participants