Three window-management primitives land in lcars_theme.sg that complete the interactive LCARS WM layer: lcars_resize (border_rect + resize handles + drag-feedback overlay), lcars_snap_zones (bitmask edge indicators for window snapping, called per drag-move), and lcars_focus_chrome (two-tone window chrome for focused vs. background windows). sigil-drivers adds the Intel 8042 PS/2 controller (keyboard + mouse, x86 CLS_INPUT). A CODEC-PASS x86 also lands via a hand-built RLE test that works around the cc0.seed bootstrap bug. (sigil-video 36d078a, 52205de, 8a5f47b; sigil-drivers b0f782a)
lcars_resize — drag-resize overlay (36d078a)
Three drawing primitives together handle drag-resize feedback:
lcars_border_rect(fb,pitch,x,y,w,h,bw,color) — hollow rectangle via 4 fill_span strips. The resize/focus ring primitive. Fills top, bottom, left, right bands; interior is untouched.lcars_resize_handle(fb,pitch,fbw,fbh,cx,cy,sz,color) — filled corner square at (cx,cy). Called 4× by resize_feedback at each window corner.lcars_resize_feedback(fb,pitch,fbw,fbh,rx,ry,rw,rh) — full drag-resize overlay: 2px orange border + 4 tan corner handles. OS calls per mouse-move during drag. GPU path: gpu_submit (CAP_ACCEL; silicon-pending); SW: lcars_fill_rect fill_span rows.Test: border_rect top/bot/left/right strips verified + hollow interior confirmed; resize_feedback: handle pixel=tan, border=orange, interior=0. LCARS-RESIZE-PASS (all 8 oracles ok).
lcars_snap_zones — edge snap indicators (52205de)
lcars_snap_zones(fb,pitch,fbw,fbh,zones,zone_w) is called per drag-move when a window nears a screen edge. The zones argument is a bitmask:
- Bit 0 (left): blue vertical bar at left screen edge
- Bit 1 (right): blue vertical bar at right screen edge
- Bit 2 (top): orange horizontal bar at top screen edge
- Bit 3 (maximize): gold center-top indicator
zones=0 clears all indicators. The compositor calls lcars_snap_zones on each drag-move event and again with zones=0 on drop, so indicators never persist after the drag ends.
Test: 4 zone configurations (left-only, left+right, top, maximize). All 7 oracles ok. LCARS-SNAP-PASS.
lcars_focus_chrome — two-tone window chrome (8a5f47b)
lcars_focus_chrome(fb,pitch,fbw,fbh,wx,wy,ww,bh,focused) repaints the chrome region of a window based on focus state. Only the chrome band is repainted — no full window redraw needed on focus change.
Test: 6 oracles (pill + title + accent for each focus state). LCARS-FOCUS-PASS.
LCARS WM API surface — 14 public functions
core/lcars_theme.sg now exposes 14 public functions covering the full LCARS WM layer:
| Function | Purpose |
|---|---|
lcars_fill_rect / lcars_fill_circle / lcars_fill_qcircle_br | Primitives |
lcars_hbar / lcars_elbow | Bar primitives |
lcars_border_rect / lcars_resize_handle | Resize primitives |
lcars_panel_header / lcars_label | Desktop chrome |
lcars_progress / lcars_data_strip | Data widgets |
lcars_window_chrome / lcars_wchrome_title / lcars_focus_chrome | Window chrome |
lcars_statusbar | Bottom bar |
lcars_resize_feedback / lcars_snap_zones | Interactive WM |
i8042 PS/2 controller — sigil-drivers (b0f782a)
The Intel 8042 is the PS/2 controller found in every x86 PC — it manages both the keyboard and mouse interfaces via two separate channels. This is the second real port-I/O driver in sigil-drivers after the MC146818A RTC (ports 0x70/0x71). Together they wire the x86 real-hardware boot's two most essential non-MMIO peripherals.
The driver is live-verified on real QEMU 8042 via actual I/O port access:
- Self-test (command
0xAA) → response0x55— PASS - SYS bit set in CCB (Command/Control Byte)
- Keyboard interface test (
0xAB) →0x00(OK) - Mouse interface test (
0xA9) →0x00(OK) - CCB read/write round-trip confirmed
- Non-blocking key poll via IBF status
CLS_INPUT dispatcher handles OP_INIT / PROBE / READ / CTL. Status polling uses integer division (no bitwise ops, matching the Sigil constraint). State mapped at 0x820000. x86-runverify PASS.
CODEC-PASS workaround (36d078a)
tests/test_codec.sg lands alongside lcars_resize. The cc0.seed bootstrap carries a LSRA nested-loop bug (even after the source fix in 63e04cc) because the old seed compiled the new cc0.sg — a chicken-and-egg that cannot be broken by patching the source alone.
Workaround: hand-build the 3-run RLE stream with poke32 (no nested loops), making the test LSRA-immune. Tests covered: codec_rle_decode round-trip, hal_bind routing (HW→1, CPU→0), frames_match. CODEC-PASS hw=ok cpu=ok match=ok.