From 956093be4f3b7a0fe86a523e5f9d9e74b9a77e59 Mon Sep 17 00:00:00 2001 From: salmonik Date: Fri, 21 Aug 2026 03:32:07 +0200 Subject: wm: flush terminal window content on gaining focus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit focus() only composites the title bar — the window content stays stale until the next write. Call term.flush() on Focus(true) so the full window is re-composited immediately when switching to it. --- rsnix/src/tty.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rsnix/src/tty.rs') diff --git a/rsnix/src/tty.rs b/rsnix/src/tty.rs index c44dca8..ad33cb3 100644 --- a/rsnix/src/tty.rs +++ b/rsnix/src/tty.rs @@ -201,6 +201,9 @@ pub fn read_line_from_queue(term: &mut crate::vt::Terminal) -> Option crate::sched::TaskMsg::Focus(gained) => { if gained { crate::vt::set_active(term as *mut crate::vt::Terminal); + // Re-composite the full window so content is visible + // immediately (focus() only redraws the title bar). + term.flush(); } else { crate::vt::set_active(core::ptr::null_mut()); } -- cgit v1.2.3