From c6f3af41422249dd7406f9a9d1ca93d1c99f45f4 Mon Sep 17 00:00:00 2001 From: Jake Stanger Date: Fri, 16 May 2025 22:33:54 +0100 Subject: [PATCH] refactor: improvements to feature flags --- src/clients/compositor/mod.rs | 3 +++ src/config/mod.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/clients/compositor/mod.rs b/src/clients/compositor/mod.rs index 8d07ddc..d58ceaf 100644 --- a/src/clients/compositor/mod.rs +++ b/src/clients/compositor/mod.rs @@ -179,9 +179,11 @@ impl Visibility { } #[derive(Debug, Clone)] +#[cfg(feature = "keyboard")] pub struct KeyboardLayoutUpdate(pub String); #[derive(Debug, Clone)] +#[cfg(feature = "workspaces")] pub enum WorkspaceUpdate { /// Provides an initial list of workspaces. /// This is re-sent to all subscribers when a new subscription is created. @@ -214,6 +216,7 @@ pub enum WorkspaceUpdate { } #[derive(Clone, Debug)] +#[cfg(feature = "bindmode")] pub struct BindModeUpdate { /// The binding mode that became active. pub name: String, diff --git a/src/config/mod.rs b/src/config/mod.rs index daf9ae9..39d2713 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -3,7 +3,7 @@ mod r#impl; mod layout; mod truncate; -#[cfg(any(feature = "bindmode"))] +#[cfg(feature = "bindmode")] use crate::modules::bindmode::Bindmode; #[cfg(feature = "cairo")] use crate::modules::cairo::CairoModule;