Repository navigation
settings: materials the platform can't draw are listed but disabled - #685
Merged
Merged
Conversation
foxnne
force-pushed
the
settings/materials-available
branch
from
October 20, 2026 01:38
fbd281a to
0f864e1
Compare
On Linux the Window material setting offered Frost, Blur and Liquid Glass and then drew them
as a clear window ("shown as Clear"). A material the platform cannot draw is now listed,
greyed and not selectable, with a tooltip saying why. One place answers which materials a
platform draws and why not the others (backend/src/materials.zig); the backend's
materialKinds and the setting both read it, so the coming Linux blur only flips that answer.
A saved kind that cannot be drawn here falls back to the richest glass below it, else to an
opaque window, never to a clear one; the saved value is left as it is.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
foxnne
force-pushed
the
settings/materials-available
branch
from
October 20, 2026 01:44
0f864e1 to
96ddc9e
Compare
1 of 5 tasks
foxnne
marked this pull request as ready for review
October 20, 2026 02:02
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.
Follow-up to #621, #632, #647, #664. Reported by a Linux user.
What changes
On Linux the Window material setting listed Frost, Blur and Liquid Glass, then said "shown as Clear" and drew a clear window. Now:
settings.zonshared with a Mac keeps.liquid, drawn as the fallback here.backend/src/materials.zig(std-only, tested), from what the backend found at run time (Platform: OS, Liquid Glass, compositor blur).SDLBackend.materialKinds,materialAtand the newmaterialMissingread it;Entry.materialMissingis what the setting and the step command ask; the web offers every kind; a backend that says nothing offers Opaque alone. Linux blur (plans#27) only flipscompositor_blur.fizzy.windowMaterialStep) steps from the kind drawn and skips what cannot be drawn.fizzy.windowMaterialstill saves any kind (the tour's tape sets each), drawn by the same fallback.Interpretation to check: "falls back to the first available" is taken as "richest glass below, else Opaque" rather than "always Opaque", so Windows and older macOS keep frosting by default. Making it always Opaque is a one-line change in
materials.effectiveandMaterial.effective.SDK impact
core/material.zig's fallback rule changes; no boundary shape moved,test-sdk-versionpasses)Verified
Unit tests:
backend-materials-tests(availability per platform, the reasons, the fallback) andfizzy-material-tests(fallback order, never to Clear, Opaque listed first). The saved value staying is by construction (the fallback is computed each frame intocore.material.publish, never written back) and covered by the existing demo test intests/demos.zig.Gates, locally on macOS:
scripts/check-fmt.sh,zig build,zig build test,zig build test-integration,zig build check-web,zig build test-sdk-version.test-integrationtherecheck-webonlyReview (code-review, medium)
Fixed: the platform probe runs once a frame (cached on the backend, cleared in
begin); the step walks from the drawn kind; the saved-not-drawn tooltip shows whenever they differ; a stale doc comment; a one-line wrapper and a tautological test removed.Left: a disabled row is still a menu item that highlights, as
core.widgets.menuRow's disabled rows are (no disabled state in the dropdown's rows); the fallback rule lives incore/material.zigandbackend/src/materials.zig, as the material enum already did, since the backend package can't importcore;Entry.materialMissingneeds a current dvui window, as every command that refreshes does.Follow-ups
Platform.compositor_blur/ the Linux frost answer inmaterials.zig.🤖 Generated with Claude Code