Per-window effect slots
Purpose
Defines per-window effect slots, where an effect on an application window is data in a theme package with CSS and WGSL rather than a Rust module, landed for window-close, with the window pixels kept in the compositor.
Requirements
Requirement: Window pixels stay in the compositor
The effect SHALL run on the GPU from the package and window pixels SHALL stay in the compositor; no web code, agent tool, generated HTML or plugin panel SHALL get the pixels. Full text: section Goal.
Scenario: Window pixels stay in the compositor
- WHEN a theme package defines a window effect
- THEN the effect runs in the compositor and no web code receives window pixels
Requirement: Effects are data in a theme package
An effect on an application window SHALL be data in a theme package (a folder with CSS and WGSL), not a Rust module, loadable with a reload and no build, restart or new login once a compositor with the slot runs. Landed for window-close only; the other targets did not land. Full text: section Goal.
Scenario: Effects are data in a theme package
- WHEN a new window-close effect folder is added to a theme package
- THEN a reload applies it with no build or restart
Requirement: Effect files
The theme runtime SHALL load theme.json with up to eight effects, each a folder with effect.css and effect.wgsl, and an effect.frag SHALL be ignored: not read and not validated since 2026-11-11. Full text: section What exists.
Scenario: Effect files
- WHEN a package folder contains an effect.frag
- THEN it is ignored and not validated
Requirement: Transactional reload
check, select and reload SHALL compile every pass first and swap the runtime only on success, and an error SHALL keep the last good theme. Full text: section What exists.
Scenario: Transactional reload
- WHEN a reload has a pass that fails to compile
- THEN the last good theme stays
Requirement: Workspace transition pins its programs
A workspace transition SHALL pin its compiled programs until its end, so a reload applies to the next transition. Full text: section What exists.
Scenario: Workspace transition pins its programs
- WHEN a theme is reloaded during a workspace transition
- THEN the running transition keeps its programs and the next one uses the new ones
Status
Doc status: partly landed. Landed: phases 2 to 4 for window-close (manifest v4 slot, reserved transform, opacity and margin parameters, the black-hole-close package; 2026-11-10) and its WGSL twin under the wgpu renderer (window-close ABI v1, 2026-11-10). The built-in package galaxy (native/smithay/themes/galaxy) is the first shipped window-close pass (360 ms, selected through the read-only built-in root of openspec/specs/themes/spec.md, Runtime commands; 2026-11-12); a live black-hole sink kept the built-in close over it until 2026-11-13 (history; see the note below). Landed 2026-11-13 (theme-packs phase 6, steps 6a, 6c and 6d): the window-open slot (manifest v5, the per-window clock, the pass in the plain scene) and the built-in base pack with the default open and the default close; since step 6e the three shipped themes have one too (office a fade and scale of 160 ms, galaxy a point of light of 320 ms, ninja the Shunshin in reverse of 200 ms; none is scaled by closeMs), see openspec/specs/themes/spec.md, Manifest v5. Not landed: the rest of phase 5 (focus, border, rest, and their WGSL). Uncertain: live session, physical GPU and several outputs (see Validation). Checked 2026-11-13.
Note, 2026-11-13: the precedence changed (owner decision "O tema vence", docs/architecture-decisions.md, Window open slot, the black-hole close and the GPU budget). The window-close pass of the active theme now draws while the wallpaper sink is live, at the placement that the sink gives it and for its own duration; the default close draws only when the active theme has no close pass: the pass of the built-in base pack while the sink is live (since step 6d, 2026-11-13; with no sink the window closes at once), else the Rust black hole. Built in phase 4b of theme-packs (theme_over_sink and its pinning tests are gone).
Note, 2026-11-13: until tasks 2.1 and 2.2 of this change (approval of packages) are built, a profile package can draw an open on application windows with no approval, as it can a close; the cap of eight opens at once is the only bound, and the decision "Só os limites atuais" keeps no draw-time budget.
Introduction
Stream A of audit-2026-11-10.md, finding F1. Each phase below says whether it landed. Until a phase lands, its text is a proposal.
Goal
An effect on an application window (open, close, focus, border, rest) is data in a theme
package, not a Rust module. A new effect needs a folder with CSS and WGSL (GLSL until 2026-11-10), a reload and no
build, no restart and no new login, once a compositor with the slot runs. Window pixels stay in
the compositor: the effect runs on the GPU from the package, and no web code, agent tool,
generated HTML or plugin panel gets the pixels.
What exists
- The theme runtime (openspec/specs/themes/spec.md) loads
theme.jsonwith up to eighteffects, each a folder witheffect.cssandeffect.wgsl(aneffect.fragis ignored: not read and not validated since 2026-11-11, step 8).check,selectandreloadcompile every pass first and swap the runtime only on success; an error keeps the last good theme. Before manifest v4 the only target wasoverview-f9, and no product view opens the F9 overview, so those passes drew nowhere (phase 2 changes this; see Authority). - The CSS subset (
effects.rs, openspec/specs/css-window-effects/spec.md) has one.windowbase rule, one.window:overviewstate, unitless--nameparameters (each au_nameuniform, -4..4) andtransitionwith CSS timing functions. - Manifest v3 adds a
workspaceTransitionfolder with typedsettings.json; a transition pins its compiled programs until its end, so a reload applies to the next transition. - The black-hole close (
black_hole.rs, openspec/specs/black-hole-close/spec.md) keeps a bounded snapshot of up to eight visible application windows (1024x768 each, refreshed at most 10 times a second) and, after the actual destruction of a toplevel, draws a 400 ms flight from the snapshot with a fixed shader (since step 6d the shader of thebasepack,effects/close, with the Rust one as the failure fallback). The open reveal is a fixed 700 ms term of the window finish shader (window_finish.rs). An open that falls in a workspace transition, the overview, the lock, the canvas lens, a hidden workspace or off camera, a covering or full screen window, or reduced motion is spent and shows final (open_skips.rs).