mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
Make zbus optional under "dbus" feature
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user