in native/desktop-linux/src/linux/window_api.rs [21:34]
fn with_window<R: PanicDefault>(
app_ptr: &AppPtr,
window_id: WindowId,
name: &str,
f: impl FnOnce(&SimpleWindow) -> anyhow::Result<R>,
) -> R {
ffi_boundary(name, || {
let app = unsafe { app_ptr.borrow::<Application>() };
let w = app
.get_window(window_id)
.with_context(|| format!("No window found {window_id:?}"))?;
f(w)
})
}