Repository navigation
Feat: Window manager and platform window contract for several windows (K1 of #355) - #382
Merged
Merged
Conversation
… windows (#355) The platform-independent half of FR-53 in the renderer, shared by macOS, Linux and Windows: - NodeTable: a Window node is a child of the root only and a node cannot move between windows (both are ProtocolErrors that leave the tree as it was); SetWindowTheme keeps a per-window theme, FocusWindow is queued for the manager. - WindowBackend / PlatformWindow: the contract the OS layers implement, mirroring the fork's WindowPlatform (open with x/y, close, setTitle, setPosition, setContentSize, bounds, focus, isKey, pointerOnScreen, followPointer, supportsMultipleWindows, the listener callbacks and the application reopen). - WindowManager: maps Window nodes to platform windows; applies a property only when its value changed, so a window the user moved is not snapped back; events carry the Window node id; WindowMoved and WindowDrag are coalesced per frame; drag from pointer, drag-over hit test without the dragged window, TearOffKey, RestoreKey matching, WindowUnavailable once, last window policy, ApplicationReopen. - MultiWindowFrames: one collector serves FrameRequests.global, so render_frame runs once per frame however many windows there are, and the batch lands in the one node table. - LocalWindowNodeId names the window in the size class and zoom reports; a single window application keeps node id 0 and never creates a manager. Tests run against a fake window system (MultiWindowTest), named after the FR-53 criteria. The per-OS backends are not part of this change.
b-re-w
marked this pull request as ready for review
October 29, 2026 17:29
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #355 (no Closes: the per-OS backends are a later stage).
The platform-independent half of FR-53 in the renderer, shared by macOS, Linux and Windows through the usual symlinks:
NodeTable:Windowonly under the root, no move between windows (ProtocolError, no crash); per-window theme; queuedFocusWindow.WindowBackend.kt:WindowBackend,PlatformWindow,PlatformWindowListener,ApplicationListener,DropTargets, the contract the OS layers implement (mirrors the fork'sWindowPlatform).WindowManager.kt: Window node to platform window, change-only property application, per-window events, coalesced moves and drags, tear off, restore keys, unavailable, last window policy, reopen.MultiWindowFrames.kt: one collector forFrameRequests.global, onerender_frameper frame for all windows.LocalWindowNodeIdnames the window in size class and zoom reports; single window apps keep node id 0 and never create a manager.MultiWindowTestruns all of it against a fake window system.Not in this change: the real windows (AppKit, Win32, X11), the per-window scene composition, the Rust side (#370 landed).
Draft,
run-heavy-cinot set.