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 /rsnix/src/wm.rs | |
| 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 'rsnix/src/wm.rs')
| -rw-r--r-- | rsnix/src/wm.rs | 8 |
1 files changed, 3 insertions, 5 deletions
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<usize> { | |||
| 617 | 617 | ||
| 618 | fn pump_main() { | 618 | fn pump_main() { |
| 619 | loop { | 619 | loop { |
| 620 | if focused().is_some() { | 620 | if let Some(id) = focused() { |
| 621 | let o = owner(id).unwrap_or(0); | ||
| 621 | while let Some(ev) = crate::ps2::try_poll_key().or_else(crate::uhci::try_poll_key) { | 622 | while let Some(ev) = crate::ps2::try_poll_key().or_else(crate::uhci::try_poll_key) { |
| 622 | if !handle_key(ev) | 623 | if !handle_key(ev) { |
| 623 | && let Some(id) = focused() | ||
| 624 | && let Some(o) = owner(id) | ||
| 625 | { | ||
| 626 | let _ = crate::sched::send(o, TaskMsg::Key(ev)); | 624 | let _ = crate::sched::send(o, TaskMsg::Key(ev)); |
| 627 | } | 625 | } |
| 628 | } | 626 | } |
