From b418c26050870b900ff56d5a47f32209795aaf4a Mon Sep 17 00:00:00 2001 From: salmonik Date: Fri, 21 Aug 2026 03:30:35 +0200 Subject: v0.5.11: fix terminal focus — toggle ACTIVE on Focus messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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. --- shell/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shell/src/lib.rs') 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() -> ! { /// reads from the task's message queue (Fed by the WM input pump) and /// writes to the active terminal (set by the caller via `vt::set_active`). /// Returns when the window is closed (Close message or ^D on empty line). -pub fn run_windowed() { +pub fn run_windowed(term: &mut rsnix::vt::Terminal) { term_println(&alloc::format!("rs-dos v{}", env!("CARGO_PKG_VERSION"))); loop { rsnix::vt::sync_scroll(); term_print("> "); - match tty::read_line_from_queue() { + match tty::read_line_from_queue(term) { None => return, // window closed Some(LineInput::Interrupted) => continue, Some(LineInput::Eof) => return, // ^D in windowed mode = close -- cgit v1.2.3