mirror of
https://github.com/YaLTeR/niri.git
synced 2024-09-11 20:37:25 +03:00
Compare commits
2 Commits
4740682904
...
c3327d36da
Author | SHA1 | Date | |
---|---|---|---|
|
c3327d36da | ||
|
e0da101c73 |
@ -38,6 +38,7 @@ use smithay::reexports::calloop::timer::{TimeoutAction, Timer};
|
||||
use smithay::reexports::calloop::{Dispatcher, LoopHandle, RegistrationToken};
|
||||
use smithay::reexports::drm::control::{
|
||||
self, connector, crtc, property, Device, Mode as DrmMode, ModeFlags, ModeTypeFlags,
|
||||
ResourceHandle,
|
||||
};
|
||||
use smithay::reexports::gbm::Modifier;
|
||||
use smithay::reexports::input::Libinput;
|
||||
@ -1812,13 +1813,13 @@ fn surface_dmabuf_feedback(
|
||||
|
||||
fn find_drm_property(
|
||||
drm: &DrmDevice,
|
||||
crtc: crtc::Handle,
|
||||
resource: impl ResourceHandle,
|
||||
name: &str,
|
||||
) -> Option<(property::Handle, property::RawValue)> {
|
||||
let props = match drm.get_properties(crtc) {
|
||||
let props = match drm.get_properties(resource) {
|
||||
Ok(props) => props,
|
||||
Err(err) => {
|
||||
warn!("error getting CRTC properties: {err:?}");
|
||||
warn!("error getting properties: {err:?}");
|
||||
return None;
|
||||
}
|
||||
};
|
||||
@ -1833,13 +1834,13 @@ fn find_drm_property(
|
||||
|
||||
fn get_drm_property(
|
||||
drm: &DrmDevice,
|
||||
crtc: crtc::Handle,
|
||||
resource: impl ResourceHandle,
|
||||
prop: property::Handle,
|
||||
) -> Option<property::RawValue> {
|
||||
let props = match drm.get_properties(crtc) {
|
||||
let props = match drm.get_properties(resource) {
|
||||
Ok(props) => props,
|
||||
Err(err) => {
|
||||
warn!("error getting CRTC properties: {err:?}");
|
||||
warn!("error getting properties: {err:?}");
|
||||
return None;
|
||||
}
|
||||
};
|
||||
|
@ -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