Skip to content

automation: a demo's captions and bar stay in the main window - #642

Merged
foxnne merged 1 commit into
mainfrom
automation/overlay-main-window
Oct 19, 2026
Merged

foxnne merged 1 commit into
mainfrom
automation/overlay-main-window

Conversation

@foxnne

@foxnne foxnne commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

While a demo tape plays, an OS window over the main one (a dialog's, as About Fizzy or the "unsaved changes before quitting?" prompt; a menu's; a float's) no longer draws the tape's caption inside itself, cut off at its bottom edge. The captions, key pills, the transport bar and the "Catching up" pill stay in the main window; the demo's pointer still goes over whatever window it is on.

Cause: the popout code hands every layer that takes no input to whichever OS window its middle is over (Popout.overlaysFrame). That is what the demo's pointer wants, so it is drawn on the dialog it clicks in, but the tape overlay's captions and bar are layers of the same kind, so one whose middle fell inside a dialog's window was taken from the main window and drawn in the dialog.

Fix: the overlay's layers other than the pointer (and a callout placed beside what the pointer acts on, which goes where that is) are marked as the main window's this frame (core.screens.markMain, beside markEverywhere/markCarried), and overlaysFrame leaves them to the main window. windowFrame (floats) and menuFrame already took no such layer.

The bar, now drawn under a dialog's OS window rather than over it, would still have taken presses at its rects meant for that window. The app hands the player its OS windows' rects each frame (replay.Player.Transport.covered, filled from Popout.windowsShown only while a tape is loaded); a press there goes to the window, and the bar's hover clears.

Not done (review): folding markEverywhere/markCarried/markMenu/markMain into one generic helper. dvui checks a data entry's type name in debug, and markMenu is called by plugins built against older core, so renaming its type would trip that.

Touches the same app/automation/overlay.zig as #637, in a different place (the layer definition); either rebases trivially over the other.

SDK impact

  • Core-only or additive: reaches plugins at the next SDK release (core.screens.markMain/isMain, new; no fingerprint move)

Verified

  • macOS: sandbox profile, main window 900×480, tour started then About Fizzy opened while the title card shows (its middle inside the dialog's window). With this change's check disabled the card was drawn inside the About window, cut at its edges, and gone from the main window (the bug); with it, the card is drawn in the main window behind the dialog and the About window shows only itself. Captured per OS window with screencapture -l. After the review fixes: same check, and paused so the bar shows; it sits under the About window in the main window. After the review fixes: same check, and paused so the bar shows; it sits under the About window in the main window. Gates: check-fmt, zig build, test, test-integration (81/81 steps), check-web.
  • Windows:
  • Linux:
  • Web: no OS windows there; unchanged.

🤖 Generated with Claude Code

While a tape played, an OS window over the main one (a dialog's, as About
Fizzy or the unsaved-changes prompt; a menu's; a float's) drew the tape's
caption inside itself, cut at its edge. The popout code hands every layer
that takes no input to whichever OS window its middle is over
(`Popout.overlaysFrame`), which is right for the demo's pointer and wrong
for the captions, keys and bar: they are the stage's. Each of those layers
is now marked as the main window's (`core.screens.markMain`), and
`overlaysFrame` leaves them to it. The pointer, and a callout beside what
it acts on, still go into the window they are over.

The bar, left under a dialog's window, no longer takes the presses meant
for that window: the app hands the player its OS windows' rects each frame
(`replay.Player.Transport.covered`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@foxnne
foxnne force-pushed the automation/overlay-main-window branch from e1ec3ce to b30c48c Compare October 19, 2026 15:01
@foxnne
foxnne marked this pull request as ready for review October 19, 2026 15:43
@foxnne
foxnne merged commit b2f6701 into main Oct 19, 2026
11 checks passed
@foxnne
foxnne deleted the automation/overlay-main-window branch October 19, 2026 15:44
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.

1 participant