Skip to content

Feat: Window manager and platform window contract for several windows (K1 of #355) - #382

Merged
b-re-w merged 2 commits into
developfrom
feat/fr53-kotlin-core
Oct 29, 2026
Merged

b-re-w merged 2 commits into
developfrom
feat/fr53-kotlin-core

Conversation

@b-re-w

@b-re-w b-re-w commented Oct 29, 2026

Copy link
Copy Markdown
Member

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: Window only under the root, no move between windows (ProtocolError, no crash); per-window theme; queued FocusWindow.
  • WindowBackend.kt: WindowBackend, PlatformWindow, PlatformWindowListener, ApplicationListener, DropTargets, the contract the OS layers implement (mirrors the fork's WindowPlatform).
  • 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 for FrameRequests.global, one render_frame per frame for all windows.
  • LocalWindowNodeId names the window in size class and zoom reports; single window apps keep node id 0 and never create a manager.
  • MultiWindowTest runs 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-ci not set.

… 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
b-re-w marked this pull request as ready for review October 29, 2026 17:29
@b-re-w b-re-w added the run-heavy-ci Run the heavy CI workflows on this pull request's head label Oct 29, 2026
@b-re-w
b-re-w merged commit 90f68f0 into develop Oct 29, 2026
48 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-heavy-ci Run the heavy CI workflows on this pull request's head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant