fix: keep compositor dbus off tokio runtime

This commit is contained in:
Lionel DARNIS 2026-05-24 18:18:51 +02:00
parent 56230f0ade
commit 267fcd80b3
3 changed files with 129 additions and 76 deletions

View file

@ -1,15 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
fn main() {
// libcosmic-yoda enables zbus' `tokio` feature, so zbus 5.14 expects an
// ambient Tokio runtime via Handle::current(). cosmic-comp's loop is not
// async, so hold a runtime guard for the lifetime of run().
let runtime = tokio::runtime::Builder::new_multi_thread()
.enable_all()
.build()
.expect("failed to build tokio runtime");
let _guard = runtime.enter();
if let Err(err) = cosmic_comp::run(Default::default()) {
tracing::error!("Error occured in main(): {}", err);
std::process::exit(1);