fix(backend_detect): use raw zbus for portal check to avoid OnceLock connection poisoning

ashpd caches zbus::Connection in a global OnceLock. When check_portal_available()
created a Screencast proxy, the connection was cached there. When the function
returned and its tokio Runtime dropped, the cached connection became dead.
Subsequent setup_portal() calls reused this dead connection and hung forever.

Fix: replace ashpd Screencast proxy with direct zbus D-Bus interface check,
which does not touch the ashpd global connection cache.

Add examples/test_portal.rs for minimal Portal ScreenCast testing.
This commit is contained in:
dailz
2026-05-27 22:07:11 +08:00
parent 715a9c0bab
commit 55abb5e56d
4 changed files with 100 additions and 18 deletions

1
Cargo.lock generated
View File

@@ -1788,6 +1788,7 @@ dependencies = [
"wayland-client",
"wayland-protocols",
"wayland-protocols-wlr",
"zbus",
]
[[package]]