From b5bb5e8ccf71a5755dde95f04440ee9c6aaa18da Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 14:36:54 -0300 Subject: kinds #28, the Life dogfood's fixes: Deadline.every steps a period from when it was due while that is under a period behind and re-arms a period from now when it is further behind or more than one ahead (a restored record's), which Life's catch-up and guard lines were and snake's 150 ms now keep without drift; the tick after a key or a focus is told the clock's now, not the last stepped frame's, which lags it while the next wake is to come (the core's, Kind.step: Life's resume no longer jumps four generations); ops refuses at compile time a word that opens no pane, there being no ctl, and its doc names the functions it handles; reference.typ says how a script's key, tick and size work and that a pane a dump loads is a new pane with a new seed, as the header now does Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/Kind.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Kind.zig') diff --git a/src/Kind.zig b/src/Kind.zig index 66e37852..9785a1a3 100644 --- a/src/Kind.zig +++ b/src/Kind.zig @@ -626,7 +626,10 @@ pub fn step(p: *Pardes) void { // counted by them. const flags = (if (focused) c.PA_FOCUSED else 0) | (if (slot.painted and caps(p, slot).v22) c.PA_FRAMED else 0); slot.painted = false; - if (slot.ops) |o| cl.ret = @bitCast(o.tick.?(slot.st, now, flags)); + // The clock's now for a tick after an event (a key, a focus): the + // stepped frame lags it while the next wake is still to come. + const at = if (slot.next_tick == 1) @max(now, p.clock.now_ns) else now; + if (slot.ops) |o| cl.ret = @bitCast(o.tick.?(slot.st, at, flags)); slot.next_tick = @bitCast(cl.end(prev).ret); p.needs_frame = true; repaint(p, slot, id); -- cgit v1.3