From c2885d899c95b9c4a72786940289afd0b3ddbde8 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 13:55:00 -0300 Subject: the cursor's ease leaves the core for the window: the core no longer runs the caret's springs (Pardes.cursor_glide, cursor_view, cursor_crossing, cursor_held, input_ns, draw.zig's glideCursor, focusedCursorBox and PaneFrame) nor hands a quad on (Chrome.cursor_glide, cursor_alpha, cursor_quad, cursor_idle_ms); the window's Caret eases its own quad on critically damped springs, on its own clock, from the cursor and the focused body the Surface shows (a jump glides, its leading corners first and bowing a little on a long one, a step eases, typing keeps up, a scroll or a pane's move carries it with its text), with the default flavour's pace and drawn as a quad only while it moves; the blink stays the window's as it was, now timed from the window's own last key or click; the core's caret tests go (with no motion a focus switch asks for no frames; the caret is its own body; the focused cursor glides a jump; a terminal's cursor lands with scrolling output; focus moved to another column glides; a click that takes focus glides once; focus moving to a pane with no cursor lets the session go idle) and the window's caret has one of its own, the glide tests feeding it as the frame does; a click that takes focus no longer holds the caret for its release; while the caret glides the window asks for frames on the continuous path its glide uses (a step of the loop that cleared it left a frame mid-glide on screen, five GUI goldens caught it); GUI goldens unchanged Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/pardes.zig | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/pardes.zig') diff --git a/src/pardes.zig b/src/pardes.zig index 8204915d..fb5b7f43 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -3367,23 +3367,12 @@ pub const Pardes = struct { theme_file_generation: u32 = 0, theme_file_pane: u8 = 0, chrome: colors.ChromeTheme = colors.initial_chrome, - /// The focused cursor's quad on its springs (animation.CursorGlide), - /// the pane and view origin it was last aimed in, and the last key or - /// click, which a blink holds for. - cursor_glide: animation.CursorGlide = .{}, /// Every drawn frame's timings (FrameStats: the Debug box, PARDES_FRAMES). frames: FrameStats = .{}, /// A pixel shell's own render-time motion is under way (its smooth /// scroll, G6): the core then keeps the continuous path running, so the /// shell draws every loop and a virtual clock moves on, as for a lift. shell_continuous: bool = false, - cursor_view: struct { serial: u32 = 0, line: i64 = 0, origin: [2]f32 = .{ 0, 0 }, inside: bool = true } = .{}, - /// The cursor glides from one pane to another: it may cross the grid. - cursor_crossing: bool = false, - /// A click took focus to another pane and its button is still down: the - /// cursor waits where it was drawn for the release that places it. - cursor_held: bool = false, - input_ns: u64 = 0, native_images: bool = false, /// The shell can take a changed image a few rows at a time (a texture row /// upload, a shared-memory hand-off), so a PDF selection is repainted as @@ -3601,7 +3590,7 @@ pub const Pardes = struct { .local = .{ // A frame, and the animations and timings that make it. "surface", "frames", "chrome", - "cursor_glide", "cursor_view", "cursor_crossing", "cursor_held", "frame_arena", "scratch", + "frame_arena", "scratch", "needs_frame", "present_skipped", "shell_continuous", "native_image_patches", "echo", // Drained by every pump before its digest; a replica's queues @@ -5180,7 +5169,6 @@ pub const Pardes = struct { } switch (ev) { .key, .mouse => { - if (ev == .key or ev.mouse.kind != .motion) p.input_ns = p.now_ns; for (p.panes) |slot| { if (slot) |pane| Messages.dismissMessage(p, pane); } @@ -6878,7 +6866,7 @@ pub const Pardes = struct { /// and its present (vsync) paces it, at the display's rate. `nextWake` /// is for the stepped animations, which count frames of `frame_ns`. pub fn continuous(p: *const Pardes) bool { - return p.cursor_glide.moving() or p.shell_continuous or panes.Pdf.moving(p); + return p.shell_continuous or panes.Pdf.moving(p); } /// For shells that only need a yes or no: macOS, which keeps its own -- cgit v1.3