diff options
| author | salmonik <salmonik@tuta.io> | 2026-08-21 03:30:35 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-08-21 03:30:35 +0200 |
| commit | b418c26050870b900ff56d5a47f32209795aaf4a (patch) | |
| tree | cdc181c63b2bbd3a3c1f608cbe0faf9a4e86877b /shell/src | |
| parent | wm: F1 spawns a windowed shell — real shell, not a duplicate (diff) | |
| download | rs-dos-b418c26050870b900ff56d5a47f32209795aaf4a.tar.gz rs-dos-b418c26050870b900ff56d5a47f32209795aaf4a.zip | |
v0.5.11: fix terminal focus — toggle ACTIVE on Focus messages
- tty: read_line_from_queue() now takes &mut Terminal and handles
TaskMsg::Focus: Focus(true) sets ACTIVE to the terminal,
Focus(false) clears it. This fixes the bug where the console
shell's gop_print! output was redirected to the soft terminal
even after focus switched away from it.
- shell: run_windowed() passes the terminal through to read_line_from_queue.
- wm: remove noisy per-key debug logging from pump_main.
Diffstat (limited to '')
| -rw-r--r-- | shell/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/src/lib.rs b/shell/src/lib.rs index 6077f35..f2a0e6e 100644 --- a/shell/src/lib.rs +++ b/shell/src/lib.rs | |||
| @@ -97,12 +97,12 @@ pub fn run() -> ! { | |||
| 97 | /// reads from the task's message queue (Fed by the WM input pump) and | 97 | /// reads from the task's message queue (Fed by the WM input pump) and |
| 98 | /// writes to the active terminal (set by the caller via `vt::set_active`). | 98 | /// writes to the active terminal (set by the caller via `vt::set_active`). |
| 99 | /// Returns when the window is closed (Close message or ^D on empty line). | 99 | /// Returns when the window is closed (Close message or ^D on empty line). |
| 100 | pub fn run_windowed() { | 100 | pub fn run_windowed(term: &mut rsnix::vt::Terminal) { |
| 101 | term_println(&alloc::format!("rs-dos v{}", env!("CARGO_PKG_VERSION"))); | 101 | term_println(&alloc::format!("rs-dos v{}", env!("CARGO_PKG_VERSION"))); |
| 102 | loop { | 102 | loop { |
| 103 | rsnix::vt::sync_scroll(); | 103 | rsnix::vt::sync_scroll(); |
| 104 | term_print("> "); | 104 | term_print("> "); |
| 105 | match tty::read_line_from_queue() { | 105 | match tty::read_line_from_queue(term) { |
| 106 | None => return, // window closed | 106 | None => return, // window closed |
| 107 | Some(LineInput::Interrupted) => continue, | 107 | Some(LineInput::Interrupted) => continue, |
| 108 | Some(LineInput::Eof) => return, // ^D in windowed mode = close | 108 | Some(LineInput::Eof) => return, // ^D in windowed mode = close |
