Files
cinny-desktop/src-tauri/build.rs
T
jaredandClaude Opus 5.5 1674fd273f feat(overlay): in-game voice overlay window, Windows (#25)
While you're in a call and Lotus isn't the focused window, a small
always-on-top, click-through window lists everyone in the call, lights
up whoever is speaking, and shows your own mute / deafen / PTT state.

- A separate window, nothing injected into the game: no anti-cheat
  surface. Never takes focus (focusable(false), WS_EX_NOACTIVATE,
  SW_SHOWNOACTIVATE) and ignores the mouse.
- Its page is three static files served by the binary over the
  `lotusoverlay` custom protocol, with a strict CSP (no network) and no
  IPC (no capability names the window). Rust pushes state in as a JSON
  literal; the page renders with textContent only.
- New `set_overlay_state` command (main window only) takes the call
  snapshot from cinny's `useTauriOverlay`. Sanitised: bounded list and
  names, known corner. Placed in the chosen corner of the foreground
  window's monitor, DPI-scaled.
- Windows only; a no-op elsewhere (Linux has no in-app calls yet, #21).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
2026-11-09 17:24:01 -05:00

50 lines
1.7 KiB
Rust

fn main() {
// Tauri 2.11+ only lets a page call app commands that a capability allows
// (GHSA-7gmj-67g7-phm9). Declaring them here generates an `allow-<name>`
// permission for each; capabilities/migrated.json grants them to the app's
// own origin (http://localhost:44548) and nothing else, so the call page
// (http://127.0.0.1:44548) and remote frames still get no IPC.
// Keep this list in sync with `generate_handler!` in src/lib.rs.
tauri_build::try_build(tauri_build::Attributes::new().app_manifest(
tauri_build::AppManifest::new().commands(&[
"check_for_update",
"flash_window",
"focus_main_window",
"get_close_behavior",
"get_focus_assist",
"get_start_minimized",
"get_tray_dnd",
"global_hotkeys_supported",
"has_tray_host",
"install_update",
"resolve_close_request",
"secure_session_clear",
"secure_session_get",
"secure_session_set",
"secure_session_supported",
"send_notification",
"set_badge_count",
"set_call_active",
"set_close_behavior",
"set_custom_chrome",
"set_global_hotkeys",
"set_jump_list",
"set_overlay_state",
"set_smtc_call_state",
"set_start_minimized",
"set_taskbar_progress",
"set_thumbbar",
"set_tray_call_state",
"set_tray_unread",
"set_tray_update_ready",
"show_rich_toast",
"update_install_kind",
"window_close",
"window_minimize",
"window_start_drag",
"window_toggle_maximize",
]),
))
.expect("failed to run tauri-build");
}