From 7bd3459f4f8bae69509202e5aa0dbd04a42c656f Mon Sep 17 00:00:00 2001 From: salmonik Date: Mon, 17 Aug 2026 20:28:48 +0200 Subject: vt → per-instance Terminal rendering into a pixel buffer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Refactor vt.rs into a per-instance Terminal struct (owned cell/rendered grids, cursor, ANSI parser, scroll state), rendering glyphs into a caller-owned pixel buffer with dirty-region blitting - Add gop buffer primitives (buffer_glyph_px, buffer_shift_up) and keep the legacy vt:: API as thin wrappers around the home terminal - Remove the now-obsolete scroll hook and shadow scroll path - Home terminal renders into its own buffer; window_id stays None until the WM integration lands --- rsnix/src/wm.rs | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'rsnix/src/wm.rs') diff --git a/rsnix/src/wm.rs b/rsnix/src/wm.rs index 1326696..be74f9a 100644 --- a/rsnix/src/wm.rs +++ b/rsnix/src/wm.rs @@ -90,8 +90,6 @@ pub fn init() { CASCADE_Y = 0; } FOCUSED.store(CONSOLE, Ordering::Relaxed); - // When the console scrolls, re-composite windows so they stay put. - gop::set_scroll_hook(redraw_windows); } /// The focused window, or `None` if the console has focus. @@ -663,20 +661,6 @@ pub fn spawn_input_pump() -> Option { crate::sched::spawn(pump_main, "wm-input") } -/// Re-composite every visible window. Called after the console scrolls so -/// windows stay in place while the text layer beneath them shifts. -pub fn redraw_windows() { - unsafe { - for i in 0..ZLEN { - let id = ZORDER[i]; - let w = WINDOWS[id]; - if w.used && w.state == WinState::Visible { - composite_rect(w.x, w.y, w.w, w.h + TITLE_BAR_H); - } - } - } -} - fn pump_main() { loop { if focused().is_some() { -- cgit v1.2.3