Add orderly shutdown on window close

This commit is contained in:
2026-06-16 17:37:00 -04:00
parent 44bad7b70b
commit 33e3998e7c
4 changed files with 92 additions and 3 deletions
+6
View File
@@ -11,6 +11,10 @@ pub enum CoreCommand {
/// for a NEW room; it's ignored when joining (the label rides in the ticket).
Join { name: String, ticket: String, room_name: String, input_device: Option<String>, output_device: Option<String>, echo_cancellation: bool, avatar: crate::avatar::Avatar },
Leave,
/// Orderly app shutdown: finalize recordings, leave any active room, stop local
/// audio/screen-share work, close the persistent network stack, then ack with
/// [`UiEvent::ShutdownComplete`].
Shutdown,
ToggleMute,
/// Change our avatar (W4) and re-announce it to the room over presence.
SetAvatar(crate::avatar::Avatar),
@@ -126,5 +130,7 @@ pub enum UiEvent {
/// Discoverable. Distinct from a user-driven change so the GUI knows to update
/// without having issued the command itself.
PresenceModeReverted { mode: PresenceMode },
/// Core finished orderly app shutdown and the GUI can exit.
ShutdownComplete,
Error(String),
}