From 3488111273764c17a42870484fabc36abb0634a1 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 13:56:13 -0300 Subject: effects out, the core's motion: the view's glide is the frontends' alone, and the core keeps no motion and no clock but its deadlines; glide.zig is a frontend's picture of a scroll, measured on the frame it is about to draw against the last it drew (a body's first line and the text it shows in its region, Region.doc new; the last frame's cells kept by the glide itself), on the frontend's own clock, the tty drawing it at whole rows and the window at the pixel; each frontend draws its own motions' frames from the last frame (the tty's poll presents it again, the window's loop renders it again, as its blink did) and paces its own waits, so the core's continuous path goes (Pardes.continuous and shell_continuous, the pump's one-millisecond wait, the view's drawn fields, the tape's watch of it); the Motion word and its five flavours go (the glide and the caret move at the default's pace, and no switch for reduced motion is left), and animation.zig with them (Motion and Spring gone, Follow now glide.zig's with its test, CursorGlide gone with the core's caret, Blink the window's with its test, Box and layout.panelBox gone, the frame's length now Pardes.frame_ns); a PDF strip no longer glides, its scroll landing at once (its follow, stripAt's motion and Pdf.moving go); the window's glide tests are fed frame by frame as the window feeds them; the window monkey runs by seed, not by flavour, and the 9P monkey loses Motion; the tty wakes a frame at a time while its glide or trail moves, as the core's continuous path woke it; all 109 snapshot goldens and the 16 GUI goldens unchanged; tests gone: a carried spring keeps its speed; a spring settles without overshoot; each flavour is its own motion; a cursor eases a cell at a time (animation.zig's); a PDF strip glides a notch and a page to their marks; a PDF glide renders the pages it crosses Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/views.zig | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/views.zig') diff --git a/src/views.zig b/src/views.zig index 59910f5b..7e087523 100644 --- a/src/views.zig +++ b/src/views.zig @@ -37,7 +37,7 @@ pub const fields = [_][:0]const u8{ "col_tags", "col_serial", "finder", "rects", "col_x", "col_w", "active", "jumps", "njumps", "jcur", "jump_force", - "active_column", "shell_continuous", + "active_column", "native_images", "native_image_patches", "windowed", "drag", "mouse_grab", "window_focused", "focus_told", "hover_col", "hover_row", "pointer_raw_col", "pointer_raw_row", @@ -534,16 +534,11 @@ pub fn deinit(p: *Pardes) void { } } -/// What drawing a view keeps of its own (its animations, its panels as -/// presented), kept from a frame drawn while it was out. -const drawn_fields = [_][:0]const u8{"shell_continuous"}; - /// Each view but the live one drawn and presented, the live one put back /// after exactly as it was: no digested field moves, so a replica that -/// draws nothing (and skips this) stays the same. A view drawn keeps only -/// what its drawing made (`drawn_fields`); whatever its unpark brought -/// inside a changed text is not kept, and is done again when it is next -/// live. Before the live one's frame: the surface after the pump is its. +/// draws nothing (and skips this) stays the same. A view drawn keeps +/// nothing of its drawing: whatever its unpark brought inside a changed +/// text is not kept, and is done again when it is next live. Before the live one's frame: the surface after the pump is its. pub fn drawOthers(p: *Pardes, h: pardes.Host) !void { const live = p.view; const v = h.vtable; @@ -581,7 +576,6 @@ pub const Present = struct { ctx: ?*anyopaque, f: ?*const fn (?*anyopaque, *cons /// and a replica that draws nothing would keep them). fn drawParked(p: *Pardes, k: u8, present: Present) !void { try unparked(p, k, present, drawLive); - copy(&drawn_fields, &p.parked[k].?.view, p); } fn drawLive(present: Present, p: *Pardes) anyerror!void { -- cgit v1.3