Files
Stefan ArentzandClaude Opus 4.8 b2665e73a2 Mouse plan M3: host input drives the mouse
Phase M3 of plans/20260721-01: the host pointer moves the emulated mouse,
from both frontends. Coordinate model revised to absolute/mapped (recorded
in the plan): the SDL window pointer and the RFB pointer each map their pixel
proportionally into the mouse's clamp window through one `Two::feed_mouse_pixel`
path — no cursor grab, testable headlessly, friendlier for a windowed
emulator. The device keeps `move_by` for a possible future relative mode.

- mouse.rs: `Mou::move_by` (relative integrate), `set_button`, `clamp()`
  getter; `set_host` deduped.
- two.rs: `has_mouse`, `feed_mouse_delta` (relative), `feed_mouse_pixel`
  (absolute pixel -> clamp window). SDL `run` loop feeds the device on
  MouseMotion / MouseButton events (window content area -> clamp); the RFB
  serve path routes a PointerEvent to the mouse when a card is present
  (mask bit0 = button), else the old paddle-0 fallback stands.

Gates: feed_mouse_delta integrates and clamps; feed_mouse_pixel maps a pixel
into the window; an RFB PointerEvent moves the emulated mouse and its button.
cargo fmt / clippy -D warnings / cargo test (380 pass, golden-BMP intact — no
mouse in those configs, so no cursor and no render delta).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 01:13:41 -04:00
..