diff options
Diffstat (limited to 'src/backend')
| -rw-r--r-- | src/backend/mod.rs | 1 | ||||
| -rw-r--r-- | src/backend/tty.rs | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/mod.rs b/src/backend/mod.rs index 64b1b5da..532b8a9c 100644 --- a/src/backend/mod.rs +++ b/src/backend/mod.rs @@ -84,6 +84,7 @@ impl Backend { } } + #[cfg_attr(not(feature = "dbus"), allow(unused))] pub fn connectors(&self) -> Arc<Mutex<HashMap<String, Output>>> { match self { Backend::Tty(tty) => tty.connectors(), diff --git a/src/backend/tty.rs b/src/backend/tty.rs index 403f31ab..16ea4079 100644 --- a/src/backend/tty.rs +++ b/src/backend/tty.rs @@ -924,6 +924,7 @@ impl Tty { } pub fn suspend(&self) { + #[cfg(feature = "dbus")] if let Err(err) = suspend() { warn!("error suspending: {err:?}"); } @@ -1026,6 +1027,7 @@ fn refresh_interval(mode: DrmMode) -> Duration { Duration::from_nanos(refresh_interval) } +#[cfg(feature = "dbus")] fn suspend() -> anyhow::Result<()> { let conn = zbus::blocking::Connection::system().context("error connecting to system bus")?; let manager = logind_zbus::manager::ManagerProxyBlocking::new(&conn) |
