diff options
| author | salmonik <salmonik@tuta.io> | 2026-08-17 20:28:48 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-08-17 20:28:48 +0200 |
| commit | 7bd3459f4f8bae69509202e5aa0dbd04a42c656f (patch) | |
| tree | 20ce28490635941d3dd88df5732300e3a0689d51 /rsnix/src/wm.rs | |
| parent | Terminal-app design (ADR 0005) + disk-write controller (diff) | |
| download | rs-dos-7bd3459f4f8bae69509202e5aa0dbd04a42c656f.tar.gz rs-dos-7bd3459f4f8bae69509202e5aa0dbd04a42c656f.zip | |
vt → per-instance Terminal rendering into a pixel buffer
- 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
Diffstat (limited to '')
| -rw-r--r-- | rsnix/src/wm.rs | 16 |
1 files changed, 0 insertions, 16 deletions
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() { | |||
| 90 | CASCADE_Y = 0; | 90 | CASCADE_Y = 0; |
| 91 | } | 91 | } |
| 92 | FOCUSED.store(CONSOLE, Ordering::Relaxed); | 92 | FOCUSED.store(CONSOLE, Ordering::Relaxed); |
| 93 | // When the console scrolls, re-composite windows so they stay put. | ||
| 94 | gop::set_scroll_hook(redraw_windows); | ||
| 95 | } | 93 | } |
| 96 | 94 | ||
| 97 | /// The focused window, or `None` if the console has focus. | 95 | /// The focused window, or `None` if the console has focus. |
| @@ -663,20 +661,6 @@ pub fn spawn_input_pump() -> Option<usize> { | |||
| 663 | crate::sched::spawn(pump_main, "wm-input") | 661 | crate::sched::spawn(pump_main, "wm-input") |
| 664 | } | 662 | } |
| 665 | 663 | ||
| 666 | /// Re-composite every visible window. Called after the console scrolls so | ||
| 667 | /// windows stay in place while the text layer beneath them shifts. | ||
| 668 | pub fn redraw_windows() { | ||
| 669 | unsafe { | ||
| 670 | for i in 0..ZLEN { | ||
| 671 | let id = ZORDER[i]; | ||
| 672 | let w = WINDOWS[id]; | ||
| 673 | if w.used && w.state == WinState::Visible { | ||
| 674 | composite_rect(w.x, w.y, w.w, w.h + TITLE_BAR_H); | ||
| 675 | } | ||
| 676 | } | ||
| 677 | } | ||
| 678 | } | ||
| 679 | |||
| 680 | fn pump_main() { | 664 | fn pump_main() { |
| 681 | loop { | 665 | loop { |
| 682 | if focused().is_some() { | 666 | if focused().is_some() { |
