summaryrefslogtreecommitdiffstats
path: root/rsnix/src/wm.rs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* wm: integrate home terminal as window 0 + fix console focus after closesalmonik2026-08-191-201/+241
| | | | | | | | | | | | | | | | | | - 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.
* vt → per-instance Terminal rendering into a pixel buffersalmonik2026-08-171-16/+0
| | | | | | | | | | | - Refactor vt.rs into a per-instance Terminal struct (owned cell/rendered grids, cursor, ANSI parser, scroll state), rendering glyphs into a caller-owned pixel buffer with dirty-region blitting - Add gop buffer primitives (buffer_glyph_px, buffer_shift_up) and keep the legacy vt:: API as thin wrappers around the home terminal - Remove the now-obsolete scroll hook and shadow scroll path - Home terminal renders into its own buffer; window_id stays None until the WM integration lands
* wm: keep windows in place when the console scrolls beneath themsalmonik2026-08-171-0/+16
| | | | | | | The console's batched scroll (gop::shift_up_n) shifts the whole shared shadow, which dragged any composited window pixels up with it. Add a scroll hook so the window manager re-composites every visible window after a console scroll, restoring them at their fixed positions.
* wm: title-bar drag-to-move; stop delivering title-bar gestures to appssalmonik2026-08-171-20/+106
| | | | | | | | | - Track the active mouse gesture (none / window-move / app-stroke) so a press on the title bar becomes a move drag instead of leaking Move events into the app's content - Add move_window (clamped to the canvas, repaint old + new regions) - Always deliver MouseKind::Release so a stroke that ends outside the window still terminates
* Windowed GUI: wm module, input routing, and the paint appsalmonik2026-08-171-0/+592
- Add the wm window-manager facility per ADR 0004: overlapping pixel-surface windows, damage-rectangle compositing, WM-drawn title bar, focus/minimize/close, and F1-F4 keybindings - Add gop shadow compositing primitives and vt::repaint_region so the console stays layer 0 beneath windows - Route mouse (absolute coords, press/release edges) and keyboard (focus-aware input pump) to the focused window - Add the rspaint drawing-program crate (pen, 8 colors, clear) and shell draw/windows/restore commands - Extend TaskMsg with AppMouse/Focus/Close and document the design in CONTEXT.md + ADR 0004