diff options
| author | salmonik <salmonik@tuta.io> | 2026-08-21 04:04:20 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-08-21 04:04:20 +0200 |
| commit | df13e7bf4d56d0563628472f8716afb01a96cfac (patch) | |
| tree | 2d4ce322416cfeb8d589d1ca50c31ff53be0dc2f /rsnix/src/tty.rs | |
| parent | wm: flush terminal window content on gaining focus (diff) | |
| download | rs-dos-df13e7bf4d56d0563628472f8716afb01a96cfac.tar.gz rs-dos-df13e7bf4d56d0563628472f8716afb01a96cfac.zip | |
wm: 1px focus-colored border + flush full window on focus change
- draw_window_border(): 1px border around every window except the root.
Blue (TITLE_BG_FOCUS) when focused, grey (TITLE_BG) when not.
- focus() / focus_console(): composite the full window area + border pad
on both the old and new focused windows (was title-bar-only before).
- flush(): include border pad in the damage rectangle.
- move_window(): redraw border area at old and new positions.
- Remove redundant term.flush() from tty Focus handler (focus() covers it).
Diffstat (limited to 'rsnix/src/tty.rs')
| -rw-r--r-- | rsnix/src/tty.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/rsnix/src/tty.rs b/rsnix/src/tty.rs index ad33cb3..c44dca8 100644 --- a/rsnix/src/tty.rs +++ b/rsnix/src/tty.rs | |||
| @@ -201,9 +201,6 @@ pub fn read_line_from_queue(term: &mut crate::vt::Terminal) -> Option<LineInput> | |||
| 201 | crate::sched::TaskMsg::Focus(gained) => { | 201 | crate::sched::TaskMsg::Focus(gained) => { |
| 202 | if gained { | 202 | if gained { |
| 203 | crate::vt::set_active(term as *mut crate::vt::Terminal); | 203 | crate::vt::set_active(term as *mut crate::vt::Terminal); |
| 204 | // Re-composite the full window so content is visible | ||
| 205 | // immediately (focus() only redraws the title bar). | ||
| 206 | term.flush(); | ||
| 207 | } else { | 204 | } else { |
| 208 | crate::vt::set_active(core::ptr::null_mut()); | 205 | crate::vt::set_active(core::ptr::null_mut()); |
| 209 | } | 206 | } |
