Expand description
Native pre-splash for Windows: a borderless layered popup showing the AgentMux brain logo (pulsing) on a solid dark background while CefInitialize runs (200–600 ms cold start).
spawn_splash(dir_hash) is called right after the single-instance
pipe is claimed — before srv spawn, before CEF init (~10 ms into
the launcher process). The returned event name is passed to the
CEF host as AGENTMUX_SPLASH_EVENT; the host signals it from
on_load_end to trigger a smooth fade-out.
§Layout & animation
┌─ SPLASH_SIZE × SPLASH_SIZE ─┐
│ solid BG_COLOR │
│ ┌─ BRAIN_W × BRAIN_H ─┐ │
│ │ brain glyph │ │ ← pulsing alpha 160..220
│ │ (transparent png) │ │
│ └────────────────────┘ │
│ │
└────────────────────────────┘The background is fully opaque and never changes. ONLY the brain
glyph’s alpha pulses (sine wave, 1.1 Hz). Painted via
UpdateLayeredWindow + a pre-multiplied 32-bpp DIB section, so
per-pixel transparency works correctly (the previous
SetLayeredWindowAttributes(LWA_ALPHA) pulsed the whole window
together, which made the background appear to breathe too — see
docs/retro/2026-05-13-splash-icon-and-pulse-target.md).
Structs§
Constants§
- BG_B 🔒
- BG_G 🔒
- BG_R 🔒
- BRAIN_H
- BRAIN_W
- BRAIN_X 🔒
- BRAIN_Y 🔒
- FOOTER_
COLOR 🔒 - Muted footer text color (R, G, B) = #8A8A93.
- FOOTER_
H 🔒 - FOOTER_
LINE_ 🔒GAP - FOOTER_
PAD_ 🔒BOTTOM - FOOTER_
PAD_ 🔒TOP - SPLASH_
H 🔒 - SPLASH_
PADDING 🔒 - SPLASH_
SIZE 🔒 - Brain-region square (brain + border). The card adds the footer band below.
- SPLASH_
W 🔒 - Full card: width = brain-region; height = brain-region + footer band.
Statics§
Functions§
- composite 🔒
- Compose one frame into the DIB: solid BG fill, then the brain
blended on top at
brain_alpha. - fade_
out 🔒 ⚠ - Fade the splash window to transparent over ~160 ms then return. Composite stays the same; only the layered-window constant alpha ramps down, so the whole splash fades uniformly.
- push_
layered 🔒 ⚠ - run_
splash 🔒 ⚠ - spawn_
splash - Spawn the pre-splash thread and return the named Win32 event name
to pass to the CEF host as
AGENTMUX_SPLASH_EVENT. ReturnsNoneif OS calls fail (non-fatal — launcher continues).