atagen

monolith

public
Star0
Watch0

Commit 0fb670484556

tarball

atagen <boss@atagen.co>2026-10-16 10:39 UTC

3 files changed+5-0
monolith: render the first nested frame before waiting for events

calloop only runs the after-dispatch callback once an event arrives, and the host maps our window only after we attach a buffer. On a quiet start nothing arrived, so the window never appeared until a client connected.
Modified file: crates/monolith/src/commands.rs+1 additions
@@ -166,6 +166,7 @@ impl State {
166166 cmd.env("MONOLITH_SOCKET", sock);
167167 }
168168 let mut child = cmd.spawn().map_err(|e| format!("{program}: {e}"))?;
169+ tracing::info!(pid = child.id(), ?argv, "spawned");
169170 let output = self.layout.active_output();
170171 let tag = output.map_or(self.layout.homeless(), |o| self.layout.launch_tag(o));
171172 self.launches.record(child.id(), output, tag);
Modified file: crates/monolith/src/input.rs+1 additions
@@ -164,6 +164,7 @@ impl Dispatch<wl_keyboard::WlKeyboard, ()> for State {
164164 }
165165 match state.binds.find(mods, &handle.raw_syms()) {
166166 Some(cmd) => {
167+ tracing::debug!(?cmd, "bind");
167168 state.suppressed.push(code);
168169 FilterResult::Intercept(Some(cmd))
169170 }
Modified file: crates/monolith/src/main.rs+3 additions
@@ -50,6 +50,9 @@ fn run(args: &[String]) -> Result<(), Box<dyn std::error::Error>> {
5050 }
5151 }
5252
53+ // calloop only runs the callback after an event, and the host maps us
54+ // only once we attach a buffer, so a quiet start would never show up.
55+ state.after_dispatch();
5356 event_loop.run(None, &mut state, |state| state.after_dispatch())?;
5457 Ok(())
5558 }