Skip to content

dvui: the demo opens under the app's windows, the main window themed - #7

Closed
foxnne wants to merge 9 commits into
zig-0.17from
dvui/plain-windows
Closed

foxnne wants to merge 9 commits into
zig-0.17from
dvui/plain-windows

Conversation

@foxnne

@foxnne foxnne commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

On fizzy's zig/0.17, every floating window that isn't modal is now an OS window with the OS's title bar in the theme's colour, kept above the main window (fizzyedit/fizzy#480–#483). This brings the dvui example up to date with that:

  • The demo is drawn before the app's own dvui.osWindows. It was drawn last, so its window opened over theirs and, being centred and much larger, hid them.
  • The main window's content has the theme's window background. It was transparent before.
  • The header comment describes what the backend now does: OS title bars, and the demo is an OS window too. On dvui's SDL3 backend, dvui.osWindow still opens a dvui.Window of its own.

The pins are unchanged, as for the rest of this branch: fizzy's check-examples.sh swaps them for its own tree.

Tested: zig build and zig build dvui on macOS, against fizzy zig/0.17 at 78a50195. The window order was seen by hand earlier, on the same code before the split.

🤖 Generated with Claude Code

t and others added 4 commits October 17, 2026 10:24
On fizzy's backend every floating window is now an OS window with the
OS's title bar (fizzyedit/fizzy#480-#483, on zig/0.17). The demo was
drawn last, so its window opened over the app's own and hid them; it is
drawn first now. The main window's content gets the theme's window
background, and the header says what the backend does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The branch's own CI installed Zig 0.16 and failed at build.zig, and on
0.17 its pins (fizzy's 0.16 releases) would fail as well until fizzy's
first 0.17 SDK is released. So it runs fizzy's check-examples.sh on
fizzy's zig/0.17 with this checkout and example-plugin's zig-0.17 in
place of the pins: every shape, the replay app and the dvui app on both
backends, on Zig 0.17. Back to building the pins at the merge (ZIG017).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ain window

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d out

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
t and others added 2 commits October 18, 2026 12:02
"New window" opens an in-app floating window, which on fizzy's backend
drags out into an OS window of its own; "New OS window" opens a
dvui.osWindow. A dropdown and a transparency slider pick what the
windows are made of (opaque, clear, blur, frost, Liquid Glass), the
colour the theme's window colour; the main window draws no fill of its
own, so the material shows through.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
foxnne added a commit to fizzyedit/fizzy that referenced this pull request Oct 18, 2026
Part of the window material (fizzyedit/plans#27, "backend: apply the
effective material to every OS window") and the multi-window plan
(fizzyedit/plans#26). Stacked on #549.

**One decision, one applier** (agreed with fizzy-1d):
- `core.material` decides, and fizzy's Entry publishes the effective
value.
- The backend applies it. Entry hands the same value to the backend each
frame, right after the publish (`setWindowMaterial`).
- `backend/` doesn't depend on `core`, so the backend has a plain-typed
twin: `MaterialKind`, field for field, and `window_material`.

**What the backend does,** for the windows it dresses itself
(`dressPlainWindows`: a plain dvui app's main window and its OS-framed
floats):
- Falls back from the kind asked to what it can show
(`effectiveMaterial`, same order as `core.material`).
- Keeps the theme's window colour as the backdrop, at the opacity asked
(opaque for `none`).
- Under it, the OS's vibrancy: the window's frosted material for frost,
the full-screen-UI one for blur.
- **Liquid is fizzy's own window glass**, not Apple's bare glass: the
same parts fizzy's windows stand on (`windowGlassInstall`: lens, frost
body, plain blur, colour) and the same look each frame
(`glass_look.window` at the material's opacity, the clearing bevel by
the window's size), over a clear backdrop. Choosing another material
removes the parts. The first version, one `NSGlassEffectView` clipped to
the corners (`masksToBounds`), looked unlike fizzy and cost a lot.
- The material follows the backdrop exactly, including through the
full-screen animation (`glass_follow`).
- A float's window opened later takes the same material.

**`glass_look` moves into the backend** so it can use it:
`core/gfx/glass_look.zig` → `backend/src/glass_look.zig`, a std-only
module of its own.
- The backend's build makes one instance per build (`glassLookModule`).
`core` takes that same instance where it is linked beside the backend
(`core_module.addImports`' new argument), since a file may belong to
only one module.
- Web, the tests and the plugin SDK make their own instance from the
file. `repoPath` moves to `core_module` for that.
- `scripts/pack-sdk.sh` vendors the file into the SDK tarball beside
`core/`.

**Not yet:**
- **Fizzy's own windows** (it dresses them itself:
`app_dresses_windows`) don't take the material yet. That's the next step
on plans#27.
- **In-app floating windows** in the matching material: the next step
after this one.
- **Windows and Linux:** `platform.window.plainMaterial` is macOS only.

## SDK impact

- [x] None. The plugin boundary is unchanged. The SDK tarball now
carries `backend/src/glass_look.zig` (checked: `scripts/pack-sdk.sh`
output lists it in `.paths`).

## Verified

- [x] macOS (arm64, Zig 0.17.0): `scripts/check-fmt.sh`, `zig build`,
`zig build test`, `zig build check-tests-reached`, `zig build
check-web`, `zig build test-sdk-version`, `zig build test-integration`
all pass.
- [x] `plugins/image` builds against `sdk/` (a sandbox `FIZZY_PROFILE`).
- [x] By hand on `run-dvui` (fizzyedit/example-app#7): each material and
the transparency slider, on the main window and an OS window.
- [ ] By hand: Liquid Glass's look and cost against the first version,
side by side.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
foxnne and others added 2 commits October 18, 2026 17:59
fizzy pins its Zig 0.17 switch (fizzyedit/fizzy#575), fizzy_sdk and the shader plugin pin sdk-v0.2.30, hello pins example-plugin's 0.17 branch, and the workflow builds with Zig 0.17.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zig-0.17 now builds against fizzy's pinned Zig 0.17 switch and SDK 0.2.30,
and fizzy's zig/0.17 branch this PR's CI checked out is gone (merged to
main). CI takes zig-0.17's steps, and builds the dvui app beside them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zig-0.17 was rewritten (46fd900 became 205018b), moving the example-plugin
pin; the base's pin is kept. This branch still adds only its dvui app and
the CI step that builds it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@foxnne
foxnne deleted the branch zig-0.17 October 19, 2026 03:31
@foxnne foxnne closed this Oct 19, 2026
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