diff --git a/src/backend/libinput.rs b/src/backend/libinput.rs index 80d2eb8..4c27a3b 100644 --- a/src/backend/libinput.rs +++ b/src/backend/libinput.rs @@ -555,6 +555,7 @@ impl From for backend::MouseButtonState { } } +#[cfg(feature = "backend_session")] impl SessionObserver for libinput::Libinput { fn pause<'a>(&mut self, _state: &mut StateProxy<'a>) { self.suspend() @@ -568,14 +569,17 @@ impl SessionObserver for libinput::Libinput { /// Wrapper for types implementing the `Session` trait to provide /// a `LibinputInterface` implementation. +#[cfg(feature = "backend_session")] pub struct LibinputSessionInterface(S); +#[cfg(feature = "backend_session")] impl From for LibinputSessionInterface { fn from(session: S) -> LibinputSessionInterface { LibinputSessionInterface(session) } } +#[cfg(feature = "backend_session")] impl libinput::LibinputInterface for LibinputSessionInterface { fn open_restricted(&mut self, path: &Path, flags: i32) -> Result { use nix::fcntl::OFlag;