mirror of
https://gitlab.freedesktop.org/pipewire/helvum
synced 2026-03-15 03:26:10 +08:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user