Repository navigation
popout: a demo's pointer shows over float, menu and dialog windows - #330
Merged
Merged
Conversation
The pointer's layer sits round its tip (replay.overlay), and what takes no input is drawn last into the topmost window over its middle (Popout.overlaysFrame, viewports.Picture.again). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 of 15 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.
Stacked on #326 (on #324); review those first.
A demo or live tape's pointer was drawn only in the main window. Over a float's OS window, a menu or a dialog, it vanished, so a viewer couldn't see it reach a float's close button, a menu row or a dialog's buttons. Reported by @foxnne.
Why
replay.overlaymade it a subwindow covering the whole window. Popout gives each OS window the subwindows whose middle is in its part of the frame, so the pointer layer always counted as the main window's.windowFramebeforemenuFrame). Dialogs are made indrawRetained, after the pointer was raised, so they stack above it.Changes
sdk/replay/overlay.zig: the pointer's layer is a small rect round its tip, so its middle is where the pointer is. Drawing is still clipped to the screen the pointer is on (dvui.screenFor), not to that rect. Any dvui app that splits its frame across windows by subwindow middle gets the same behaviour.Popout.overlaysFrame, new, last inendFrame: each subwindow that takes no input (mouse_eventsfalse: the pointer and its click ripple, a tooltip) is drawn into the topmost window over its middle. That's a menu's or dialog's window, else a float's. Over none of them, it's left to the main window.windowFramenow leaves such subwindows for this pass, unless they are drawn everywhere (a drag's layer).viewports.Picture.again(and its stand-in): draws more into a picture already handed over this frame, keeping what's there.presentonly names the target; the window copies it when the frame ends.beginis nowclearplusagain.Verification
zig build,test(514/515, 1 skipped),test-integration(358/358),check-web,test-sdk-versionand the Windows cross-build pass on macOS.overlaysFrame(removed before the commit) showed the pointer layer going into the float's window while over it (middle at200354,388, the float's band). The other input-less layer stayed with the main window.🤖 Generated with Claude Code