forked from unom/punktfunk
Groundwork for the Windows half of P1, and a dedup of the Linux one. The two shells commit differently: GTK writes once when the dialog closes (so it can hand over a list of touched rows), WinUI writes on every control change (so it can't). `absorb` serves the second shape — give it the effective settings before and after one control fired, and it records the field that moved. That is deliberately NOT the diff-on-save the design rejects. The comparison is against the EFFECTIVE settings, i.e. what the control was actually showing, not against the globals — so setting a value back to whatever the global happens to be still records an override, which is exactly the pin the design wants. It only ever adds; removing an override stays an explicit, separate operation. `clear` is that operation, keyed by the overlay's own field names, with `resolution` as the one alias for the width/height/match-window tri-state a single control drives on every client. The GTK reset path now calls it instead of carrying its own `match` — that second list was already a place where the two could drift, and the next client would have made it a third. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
43 lines
1.4 KiB
Rust
43 lines
1.4 KiB
Rust
//! `punktfunk-client` — the native Linux punktfunk/1 desktop shell (relm4/libadwaita).
|
|
//!
|
|
//! Hosts, pairing/trust, settings, and the desktop library page; every stream (and the
|
|
//! console game library) runs in the spawned `punktfunk-session` Vulkan binary — the
|
|
//! shell never touches video (punktfunk-planning `linux-client-rearchitecture.md`).
|
|
#![forbid(unsafe_code)]
|
|
|
|
// The UI-agnostic plumbing lives in `pf-client-core`, shared with the session binary.
|
|
// Root re-exports keep every `crate::trust`-style path resolving unchanged.
|
|
#[cfg(target_os = "linux")]
|
|
pub use pf_client_core::{discovery, gamepad, library, trust, video, wol};
|
|
|
|
#[cfg(target_os = "linux")]
|
|
mod app;
|
|
#[cfg(target_os = "linux")]
|
|
mod cli;
|
|
// "Create shortcut…" — the desktop-entry writer (design/client-deep-links.md §5).
|
|
#[cfg(target_os = "linux")]
|
|
mod shortcuts;
|
|
#[cfg(target_os = "linux")]
|
|
mod spawn;
|
|
#[cfg(target_os = "linux")]
|
|
mod ui_hosts;
|
|
#[cfg(target_os = "linux")]
|
|
mod ui_library;
|
|
#[cfg(target_os = "linux")]
|
|
mod ui_settings;
|
|
#[cfg(target_os = "linux")]
|
|
mod ui_trust;
|
|
|
|
#[cfg(target_os = "linux")]
|
|
fn main() -> gtk::glib::ExitCode {
|
|
app::run()
|
|
}
|
|
|
|
/// GTK4/SDL3 are Linux turf; this stub keeps `cargo build --workspace` green on macOS
|
|
/// (the Mac client lives in clients/apple).
|
|
#[cfg(not(target_os = "linux"))]
|
|
fn main() {
|
|
eprintln!("punktfunk-client is Linux-only — the macOS client lives in clients/apple");
|
|
std::process::exit(2);
|
|
}
|