diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-06 14:36:54 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-06 14:53:45 -0300 |
| commit | b5bb5e8ccf71a5755dde95f04440ee9c6aaa18da (patch) | |
| tree | 801403ea35508b571b34b0a750faed47be102f3d /src/Kind.zig | |
| parent | 333cdea69956adda91f462980a18f5bac6548dda (diff) | |
| download | pardes-b5bb5e8ccf71a5755dde95f04440ee9c6aaa18da.tar.gz pardes-b5bb5e8ccf71a5755dde95f04440ee9c6aaa18da.zip | |
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 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/Kind.zig')
| -rw-r--r-- | src/Kind.zig | 5 |
1 files changed, 4 insertions, 1 deletions
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); |
