summaryrefslogtreecommitdiffstats
path: root/rsdos/src/main.rs
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-08-19 18:46:35 +0200
committersalmonik <salmonik@tuta.io>2026-08-19 18:46:35 +0200
commit09a44f15678f27dd3d07f90e9ed0e71cf0e771ff (patch)
treee9942dd03df3eb16b5b261cb6b0e129390593ef6 /rsdos/src/main.rs
parentvt → per-instance Terminal rendering into a pixel buffer (diff)
downloadrs-dos-09a44f15678f27dd3d07f90e9ed0e71cf0e771ff.tar.gz
rs-dos-09a44f15678f27dd3d07f90e9ed0e71cf0e771ff.zip
wm: integrate home terminal as window 0 + fix console focus after close
- wm rewrite: chrome flag per window, create_home_window for the console (window 0, chrome-less, bottom-pinned, never closed), composite_rect fills desktop background then blits windows bottom-to-top, draw_window_intersect handles chrome-less windows, hit_test returns Content for chrome-less, destroy/move_window no-op for id 0. - vt: add window_params() so main.rs can wire the Terminal to wm window 0. - main.rs: create home terminal window 0 and attach Terminal after wm::init(). - Focus fix: focus(0) now stores CONSOLE sentinel (not raw 0) so focused() returns None when the home terminal has focus. Without this, closing a GUI window left FOCUSED=0, which tty::poll_key() interpreted as 'a GUI app has focus', spinning forever and swallowing all keyboard input.
Diffstat (limited to '')
-rw-r--r--rsdos/src/main.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/rsdos/src/main.rs b/rsdos/src/main.rs
index b147e63..6d2fa4a 100644
--- a/rsdos/src/main.rs
+++ b/rsdos/src/main.rs
@@ -413,6 +413,12 @@ pub unsafe extern "efiapi" fn efi_main(image_handle: Handle, system_table: *mut
413 // Windowed GUI: initialise the window manager and its input pump. 413 // Windowed GUI: initialise the window manager and its input pump.
414 // The console (vt) stays layer 0; GUI apps are windows composited on top. 414 // The console (vt) stays layer 0; GUI apps are windows composited on top.
415 rsnix::wm::init(); 415 rsnix::wm::init();
416 {
417 let t = rsnix::vt::home_terminal();
418 let (buf, w, h) = t.window_params();
419 let id = rsnix::wm::create_home_window(buf as *mut u32, w, h);
420 t.set_window(id);
421 }
416 rsnix::wm::spawn_input_pump(); 422 rsnix::wm::spawn_input_pump();
417 423
418 shell::run(); 424 shell::run();