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. --- rsnix/src/wm.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'rsnix/src/wm.rs') diff --git a/rsnix/src/wm.rs b/rsnix/src/wm.rs index 05781e8..71c310f 100644 --- a/rsnix/src/wm.rs +++ b/rsnix/src/wm.rs @@ -617,12 +617,10 @@ pub fn spawn_input_pump() -> Option { fn pump_main() { loop { - if focused().is_some() { + if let Some(id) = focused() { + let o = owner(id).unwrap_or(0); while let Some(ev) = crate::ps2::try_poll_key().or_else(crate::uhci::try_poll_key) { - if !handle_key(ev) - && let Some(id) = focused() - && let Some(o) = owner(id) - { + if !handle_key(ev) { let _ = crate::sched::send(o, TaskMsg::Key(ev)); } } -- cgit v1.2.3