Two gaps, both found on the shared Linux/Windows console UI. **The settings tabs only moved for a gamepad.** They were bound to the shoulder buttons and to PgUp/PgDn, and the legend spells PgUp/PgDn out only when NO pad is attached — so with a controller plugged in a keyboard user had nothing to find, and a mouse or a touchscreen could not change section at all. The root cause was wider than the strip: `SkiaOverlay::handle_event` matched only `KeyDown` and `TextInput`, so every mouse button, wheel and touch contact fell past the console into the run loop, which routes pointer input exclusively at `stream.capture` — `None` while you are browsing. Nothing in the console had ever been clickable. Making just the pills answer would not have helped either: the settings screen is opened with X from home, so a mouse could not reach it. So the console gets a real pointer path: - `Overlay::handle_pointer` carries mouse/touch in SWAPCHAIN PIXELS. The run loop converts (it owns the window, hence the display scale, and mouse coordinates are logical while fingers are normalised); the console then hit-tests the very rects it drew last frame. Only DIRECT touch devices are offered — an indirect trackpad already drives the mouse. - Widgets act on the PRESS, not the release. The list and both carousels scroll the focused item toward the centre, so what you pressed has slid out from under your finger by the time it lifts; press-to-act has no such race and there is no drag gesture to compete with. - The hint bar became the pointer's button bar. It is already the console's only on-screen statement of what the face buttons do, and a pointer has none — so its Confirm/Back/Secondary/Tertiary pills are clickable on every screen, which is what puts Settings and Library within reach of a mouse at all. - Tab / Shift+Tab change section; PgUp/PgDn still do, and the keyboard legend now reads "Tab". - Right-click is Back everywhere, EXCEPT at the root: B there quits the launcher and a right-click is far easier to fire by accident. Quitting stays explicit. **Host cards had no menu.** Every other client hangs Wake / Copy link / Edit / Forget off a host card; the console could add a host and connect to one, and that was all — so a renamed machine or a fat-fingered address stayed wrong forever unless you opened a desktop shell. UP on a saved tile now opens that host's menu, the same gesture the Android console uses, on the one direction a horizontal carousel leaves free. - `ConsoleCmd::UpdateHost` edits the stored host IN PLACE. Removing and re-adding would silently drop the fingerprint, the learned MAC, the pinned cards and the profile binding — that is a rename, not a re-pair. - `ConsoleCmd::ForgetHost` drops it; if it is still advertising it returns as a discovered, unpaired row, which is the honest state. - Forget arms on the first press and fires on the second. The other clients forget outright; a console is driven by a thumbstick from across a room. - A pinned profile card offers only Unpin. It is a shortcut, not a second host, and offering to forget the host from it would blur exactly the distinction a pin draws. - "Edit…" REPLACES the menu on the stack rather than stacking over it, so Back from the editor doesn't land on a menu describing the host as it was before the edit. Verified in the pf-lxcheck2 container (this crate compiles to nothing on macOS — a bare `cargo check` there is vacuous): plain build and `clippy --all-targets` clean under `-D warnings`, 72 tests pass. Seven are new, and cover the reported bug directly — a press on a pill selects that tab, and each tab still keeps its own cursor when a pointer is what switched it.
47 lines
1.9 KiB
Rust
47 lines
1.9 KiB
Rust
//! The Skia console UI (punktfunk-planning `linux-client-rearchitecture.md` §6): an
|
|
//! [`Overlay`](pf_presenter::overlay::Overlay) implementation rendering on the
|
|
//! PRESENTER's Vulkan device into offscreen RGBA images the presenter composites as one
|
|
//! premultiplied quad. Skia never touches the swapchain, and nothing here runs while
|
|
//! the overlay has nothing to show — the §6.1 invariants live or die in this crate.
|
|
//!
|
|
//! The console is a full couch shell now — home (host carousel), the game library
|
|
//! coverflow, settings, add-host, and PIN pairing, with screen transitions, per-pad
|
|
//! button glyphs, and a controller keyboard (suppressed on Steam Deck, where Steam's
|
|
//! own keyboard types through SDL text input) — plus the in-stream chrome: stats OSD,
|
|
//! capture hint, start banner.
|
|
|
|
// Unsafe-proof program: every `unsafe {}` in the Skia/Vulkan overlay carries a `// SAFETY:` proof.
|
|
#![deny(clippy::undocumented_unsafe_blocks)]
|
|
|
|
#[cfg(any(target_os = "linux", windows))]
|
|
mod anim;
|
|
#[cfg(any(target_os = "linux", windows))]
|
|
mod glyphs;
|
|
#[cfg(any(target_os = "linux", windows))]
|
|
pub mod library;
|
|
#[cfg(any(target_os = "linux", windows))]
|
|
pub mod model;
|
|
#[cfg(any(target_os = "linux", windows))]
|
|
mod pointer;
|
|
#[cfg(any(target_os = "linux", windows))]
|
|
mod screens;
|
|
#[cfg(any(target_os = "linux", windows))]
|
|
mod shell;
|
|
#[cfg(any(target_os = "linux", windows))]
|
|
mod skia_overlay;
|
|
#[cfg(any(target_os = "linux", windows))]
|
|
mod theme;
|
|
#[cfg(any(target_os = "linux", windows))]
|
|
mod widgets;
|
|
|
|
#[cfg(any(target_os = "linux", windows))]
|
|
pub use library::{LibraryGame, LibraryPhase, LibraryShared};
|
|
#[cfg(any(target_os = "linux", windows))]
|
|
pub use model::{
|
|
ConsoleBus, ConsoleCmd, ConsoleShared, HostRow, PairPhase, ProfileChip, WakeStatus,
|
|
};
|
|
#[cfg(any(target_os = "linux", windows))]
|
|
pub use shell::ConsoleOptions;
|
|
#[cfg(any(target_os = "linux", windows))]
|
|
pub use skia_overlay::{ConsoleEntry, ConsoleHandles, SkiaOverlay};
|