From e605b3614a87936bf7d0873eb41193d52de6d8b1 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Sat, 13 Jun 2026 19:57:45 +0900 Subject: Slice 10 c2/d1 fix: dock previews were blank (RML/RCSS authoring bugs) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Real-seat (nested) showed the dock compositing but slots blank. Three bugs in the inline dock document, all caught in the live RmlUi log: - never bound — RmlUi interpolates {{ }} only in TEXT, not attributes, so it tried to load a texture literally named "{{ row.preview }}". Fixed with data-attr-src="row.preview". - font-family: sans-serif -> "No font face defined" (substrate only loads Noto Sans). Fixed to the loaded face. - transform-origin: top left -> RCSS parse error. Fixed to RmlUi-valid syntax. Verified real-seat: minimizing two foot windows shows two preview cards in the dock with the actual window snapshots visible; the live log is free of the three [rmlui] errors. Super+M works repeatedly with >1 window ("works once" was the single-window no-op: nothing left to focus/minimize). Suites green build + asan. --- packages/ext-stage-dock/src/extension.cpp | 33 ++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/packages/ext-stage-dock/src/extension.cpp b/packages/ext-stage-dock/src/extension.cpp index 823da21..82814e2 100644 --- a/packages/ext-stage-dock/src/extension.cpp +++ b/packages/ext-stage-dock/src/extension.cpp @@ -73,8 +73,12 @@ struct Slot { // rounded like the Stage-Manager reference. d1 ADDS the RCSS animation on top of // c2's static document — without touching the data model (same "slots" list, // same per-row preview/title/restore bindings). data-model "ui" (the substrate -// default). {{ row.preview }} is the Preview source_uri(); data-event-click -// delivers the row index to restore(). +// default). The img src is the Preview source_uri(), bound via +// `data-attr-src="row.preview"` — RmlUi interpolates {{ }} only in TEXT, so an +// element attribute must use the data-attr- attribute-binding form +// (verified against vendored RmlUi 6.2: data_binding/options samples). The +// title is TEXT, so {{ row.title }} is correct there. data-event-click delivers +// the row index to restore(). // // d1 animation (RCSS, RMLUi 6.2; verified against the vendored source): // @@ -95,16 +99,20 @@ struct Slot { // the element is instanced, which is exactly when dirty("slots") grows the // list — so a new minimize animates its card in with no extra binding. // -// transform-origin keeps the slot scaling toward its own top so the grow reads -// as "into the dock", within what a left-strip surface can convey (the literal -// cross-screen flight needs an input-transparent overlay — report change-req). +// transform-origin keeps the slot scaling toward its own top-left so the grow +// reads as "into the dock", within what a left-strip surface can convey (the +// literal cross-screen flight needs an input-transparent overlay — report +// change-req). RmlUi 6.2's `transform-origin` is an X-then-Y-then-Z shorthand +// whose X axis takes only {left,center,right} (or length/percent) — so the +// CSS-style `top left` is a parse error (top is not a valid X keyword). We use +// the unambiguous percentage form `0% 0%` (= top-left); `left top` also parses. constexpr const char* kDockRml = R"RML(