pub(crate) async fn detach_window(
state: &AppState,
window_id: &str,
) -> Result<Option<String>, String>Expand description
A workspace switch closes window window_id (user_workspace_switch):
the window’s row goes, as CloseWindow drops it, and its contents stay
for the caller to keep. The host closes the OS window afterwards; that
close then finds nothing left to do. Returns the contents when no other
window shows them.