From 2e22fd567ccee7b67ca2c46f901a7c953c4f96d2 Mon Sep 17 00:00:00 2001 From: faumaray Date: Tue, 27 Oct 2026 13:49:15 +0300 Subject: [PATCH] docs/media.md: the portal capture no longer needs a tokio runtime to start The Portal note said `start` needs a tokio runtime because zbus runs on it. Since the move of ashpd to `async-io` (e325b65) zbus runs every connection on an I/O thread of its own, whichever thread builds it, and the note in portal.rs says so (corrected in ed49c28); this record was not among the four the gate listed and had been left behind. `stop` is the one that needs the runtime, and only to close the portal session in the background (elsewhere the session closes with the connection): the note now says both. Co-Authored-By: Claude Sonnet 5.5 --- docs/media.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/media.md b/docs/media.md index c9cc6fc..eb4d3e8 100644 --- a/docs/media.md +++ b/docs/media.md @@ -869,9 +869,12 @@ Notes: covered by other windows may be stale. MIT-SHM needs a local server with MIT-SHM 1.2; otherwise GetImage is used. The only `unsafe` here is mapping our memfd (`capture/x11/shm.rs`). -- Portal: `start` needs a tokio runtime (zbus runs on it) and may show the - desktop's picker. Choices persist with `PersistMode::ExplicitlyRevoked`: store - `PortalCapture::restore_token()` (e.g. in `voelin-store` settings) and pass it to +- Portal: `start` runs on any executor (ashpd uses zbus's `async-io`, with an + I/O thread of its own, in every binary of the workspace) and may show the + desktop's picker; `stop` closes the portal session only inside a tokio + runtime (elsewhere the session closes with the connection). Choices persist + with `PersistMode::ExplicitlyRevoked`: store `PortalCapture::restore_token()` + (e.g. in `voelin-store` settings) and pass it to `PortalCapture::with_restore_token` next time. The cursor is embedded when the portal supports it. Buffers: DMA-BUFs are offered first (a mandatory modifier property we fixate: the sink's tiled modifiers, best