mirror of
https://github.com/YaLTeR/niri.git
synced 2024-09-11 20:37:25 +03:00
Disable screencast when PipeWire is missing
This can cause a panic.
This commit is contained in:
parent
4740682904
commit
e0da101c73
@ -67,7 +67,7 @@ impl DBusServers {
|
||||
dbus.conn_screen_shot = try_start(screenshot);
|
||||
|
||||
#[cfg(feature = "xdp-gnome-screencast")]
|
||||
{
|
||||
if niri.pipewire.is_some() {
|
||||
let (to_niri, from_screen_cast) = calloop::channel::channel();
|
||||
niri.event_loop
|
||||
.insert_source(from_screen_cast, {
|
||||
@ -82,6 +82,8 @@ impl DBusServers {
|
||||
.unwrap();
|
||||
let screen_cast = ScreenCast::new(backend.enabled_outputs(), to_niri);
|
||||
dbus.conn_screen_cast = try_start(screen_cast);
|
||||
} else {
|
||||
warn!("disabling screencast support because we couldn't start PipeWire");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -898,7 +898,11 @@ impl State {
|
||||
}
|
||||
};
|
||||
|
||||
let pw = self.niri.pipewire.as_ref().unwrap();
|
||||
let Some(pw) = &self.niri.pipewire else {
|
||||
error!("screencasting must be disabled if PipeWire is missing");
|
||||
return;
|
||||
};
|
||||
|
||||
match pw.start_cast(
|
||||
to_niri.clone(),
|
||||
gbm,
|
||||
|
Loading…
Reference in New Issue
Block a user