From 3899f66a8c81d85dfb8f9ad18481bfff110c5d99 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 27 Nov 2026 22:18:32 -0300 Subject: Advance the native macOS clock for delayed leader hints Give the core the host monotonic time in the AppKit pump and animation callback so a Space prefix starts its hint delay and redraws when it expires. Keep scroll and rotation momentum on their existing frame timer. Verified that the native Space-only regression fails before this fix and passes afterward. --- runtime/macos.zig | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'runtime') diff --git a/runtime/macos.zig b/runtime/macos.zig index efb2ddbc..1b0ecd83 100644 --- a/runtime/macos.zig +++ b/runtime/macos.zig @@ -843,6 +843,7 @@ export fn pardes_tick() bool { did = did or drained.count != 0; if (drained.pending) wake(st); } + st.core.advance(@intCast(std.Io.Clock.awake.now(st.io).nanoseconds)); while (st.core.nextEffect()) |effect| { did = true; st.core.perform(effect); @@ -908,17 +909,14 @@ export fn pardes_animation_tick() bool { const st = &(state orelse return false); const now: u64 = @intCast(std.Io.Clock.awake.now(st.io).nanoseconds); + st.core.advance(now); const spend = spendTickTime(st.last_tick_ns, now, st.tick_bank_ns); st.last_tick_ns = now; st.tick_bank_ns = spend.bank_ns; - var changed = false; + var changed = st.core.needs_frame; for (0..spend.steps) |_| { - if (st.core.animationActive()) { - st.core.update(.tick); - changed = true; - } if (st.scroll_coasting) { const spent_now = spendScroll( st, -- cgit v1.3