diff --git a/Cargo.toml b/Cargo.toml index 0d98c8c1..56b9e2c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -117,7 +117,8 @@ optional = true [features] debug = ["egui", "egui_plot", "smithay-egui", "anyhow/backtrace"] default = ["systemd"] -systemd = ["libsystemd", "logind-zbus"] +logind = ["logind-zbus"] +systemd = ["libsystemd", "logind"] profile-with-tracy = ["profiling/profile-with-tracy", "tracy-client/default"] profile-with-tracy-gpu = ["profile-with-tracy", "smithay/tracy_gpu_profiling"] diff --git a/src/dbus/mod.rs b/src/dbus/mod.rs index e2da75c3..5b9754c3 100644 --- a/src/dbus/mod.rs +++ b/src/dbus/mod.rs @@ -14,7 +14,7 @@ use tracing::{error, warn}; pub mod a11y_keyboard_monitor; use a11y_keyboard_monitor::A11yKeyboardMonitorState; -#[cfg(feature = "systemd")] +#[cfg(feature = "logind")] pub mod logind; mod name_owners; mod power; diff --git a/src/input/mod.rs b/src/input/mod.rs index 519c54d0..a2863d09 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -1600,7 +1600,7 @@ impl State { } InputEvent::Special(_) => {} InputEvent::SwitchToggle { event } => { - #[cfg(feature = "systemd")] + #[cfg(feature = "logind")] if event.switch() == Some(Switch::Lid) && self.common.inhibit_lid_fd.is_some() { let backend = self.backend.lock(); let output = backend diff --git a/src/state.rs b/src/state.rs index 26edade4..5b84492f 100644 --- a/src/state.rs +++ b/src/state.rs @@ -116,7 +116,7 @@ use smithay::{ }; use tracing::warn; -#[cfg(feature = "systemd")] +#[cfg(feature = "logind")] use std::os::fd::OwnedFd; use std::{ @@ -292,7 +292,7 @@ pub struct Common { pub xwayland_shell_state: XWaylandShellState, pub pointer_focus_state: Option, - #[cfg(feature = "systemd")] + #[cfg(feature = "logind")] pub inhibit_lid_fd: Option, pub with_xwayland: bool, @@ -791,7 +791,7 @@ impl State { pointer_focus_state: None, dbus_state, - #[cfg(feature = "systemd")] + #[cfg(feature = "logind")] inhibit_lid_fd: None, with_xwayland, @@ -816,7 +816,7 @@ impl State { } fn update_inhibitor_locks(&mut self) { - #[cfg(feature = "systemd")] + #[cfg(feature = "logind")] { use smithay::backend::session::Session; use tracing::{debug, error, warn};