Update dependencies

Glib MainContext is now aquired manually because a change in gtk-rs would lead to
a panic when attaching the receiver otherwise, because gtk::init() doesn't
"leak" the default main context anymore.
This commit is contained in:
Tom A. Wagner
2021-05-22 14:00:51 +02:00
parent 24fd54affe
commit dce228ff60
2 changed files with 48 additions and 43 deletions

View File

@@ -54,6 +54,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
env_logger::init();
gtk::init()?;
// Aquire main context so that we can attach the gtk channel later.
let ctx = glib::MainContext::default();
let _guard = ctx.acquire().unwrap();
// Start the pipewire thread with channels in both directions.
let (gtk_sender, gtk_receiver) = glib::MainContext::channel(PRIORITY_DEFAULT);
let (pw_sender, pw_receiver) = pipewire::channel::channel();