Repository navigation
backend: a dvui.osWindow is an OS window of its own, from the one frame - #366
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Part of #281: the dvui-native way to put content in an OS window on fizzy's backend. A plain dvui app now calls
dvui.osWindow(...), dvui's own API, and on fizzy's backend gets an OS window drawn from the onedvui.Window. It needs noviewportscode and no reaching into dvui internals. On any other backend, dvui does what it does today.How
dvui (fork, tag
fizzy-sdk-0.2.23;docs/DEPENDENCIES.mdpatches 7 and 8):dvui.osWindowcrashed on any backend with secondary windows.dvui.Window,dvui.osWindowfalls back to a floating window. That window now takes the requested size, min/max size andid_extra, gets a close button on the window'sopen_flag, and cascades past windows already there (the fallback's own TODOs). The backend also hears of it each frame (Backend.osWindowFloating: its id, the header it moves by, the options).Fizzy's backend:
initWindowSecondary, which it only inherited from dvui's SDL backend, so everydvui.osWindowtakes the fallback.SDLBackend.osWindowFloatingnotes each fallback window as it draws.backend/src/os_windows.zigdoes around the app's frame (inappIterate) what example-app'srun-dvuidid by hand:_rect);viewports.Picture,.appframing);_auto_pos). Opening earlier put it off-screen.Fizzy's own Popout is untouched: it uses
viewportsdirectly and neverdvui.osWindow.os_windowssets screens only when it has windows of its own, so it doesn't override Popout's.Verification
test-sdk-version), so no SDK release is needed for the boundary.zig build,test(533/534),test-integration(375/375),check-web, the Windows and Linux cross-builds,-Dnative-backend=sdl3and the backend's tests (46/46) pass on macOS.scripts/check-examples.shbuilds example-app'smain(whoserun-dvuistill drivesviewportsitself) and example-plugin against this tree, all passing.run-dvuiondvui.osWindow, built against this branch (fizzyedit/example-app, follow-up):🤖 Generated with Claude Code