From 60597ae154b83680385fa40c415aeabc42118b2e Mon Sep 17 00:00:00 2001 From: vasilito Date: Fri, 24 Jul 2026 13:00:10 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20input=20plan=20=E2=80=94=20Stage=205=20?= =?UTF-8?q?blocker=20analysis=20(compositor=20+=20DRM)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Record the two concrete prerequisites for compositor input wiring, found by reading the compositor source: (1) an event-loop restructure — it uses a blocking accept loop, drains keys only reactively, and ClientState stores no UnixStream, so no input source can push wl_keyboard to a client; (2) the desktop cannot run without DRM/Mesa (no /scheme/drm/card0 on mini), so the wiring is unvalidatable until the Mesa EGL/DRI port lands. Defines the exact wiring for when those clear (read /scheme/evdev, set_vt_mode, real XKB keymap fd, keycode = evdev - 8). --- .../docs/INPUT-STACK-LINUX-ALIGNMENT-PLAN.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/local/docs/INPUT-STACK-LINUX-ALIGNMENT-PLAN.md b/local/docs/INPUT-STACK-LINUX-ALIGNMENT-PLAN.md index a61372aa74..58462fd0ae 100644 --- a/local/docs/INPUT-STACK-LINUX-ALIGNMENT-PLAN.md +++ b/local/docs/INPUT-STACK-LINUX-ALIGNMENT-PLAN.md @@ -390,6 +390,30 @@ duplication/ordering faults this structure removes by construction. - Boot check: a test client can `GrabDevice`, receive raw events, `Ungrab`, and the console resumes. **Stage 5 — Wire the compositor via seat (unblocks `redbear-full`).** + +> **Blocker analysis (2026-07-24, from reading `redbear-compositor/source/src/main.rs`):** +> Two concrete prerequisites, neither runtime-testable today: +> 1. **Compositor event-loop restructure.** The compositor uses a *blocking* +> `for stream in self.listener.incoming()` accept loop (`:1409`) and drains key +> events only *reactively* when a client poke arrives (`:2555`). Worse, +> `ClientState` (`:1145`) **does not store the client's `UnixStream`**, so no +> input source can push `wl_keyboard` events to the focused client. Real input +> requires: store per-client stream fds; multiplex the input fd + client +> sockets (poll loop or a dedicated input-reader thread); proactively send +> `wl_keyboard.enter/key/modifiers` to the focused client on input arrival. +> 2. **The desktop cannot run without DRM/Mesa.** The compositor renders via +> `/scheme/drm/card0`; on mini/QEMU there is no DRM card +> ([[full-wayland-build-cascade-2026-07]]), so the compositor never starts and +> nothing here can be validated. This is desktop bring-up, gated on the Mesa +> EGL/DRI port — **not** a continuation of the input-core work. +> +> When those clear, the wiring is: compositor opens `/scheme/evdev` (evdevd's +> Linux-evdev output — reuses evdevd's orbclient→evdev keycode translation, no +> re-implementation), calls inputd `set_vt_mode(vt, graphics=true)` to suppress +> the text console, ships a real XKB keymap fd (replacing the `/dev/null` stub at +> `:3380`), and dispatches `wl_keyboard` to the focused surface (keycode = evdev +> code − 8). + - **Promote `seatd` to a local source package** (per §4b decision): flip `recipe.toml [source]` from `git = jackpot51/seatd` to `path = "source"`; remove the leftover nested `source/.git` (so it's a plain vendored tree like evdevd, not an embedded clone) and the stray `target/` in the recipe dir;