diff --git a/src/clients/compositor/hyprland.rs b/src/clients/compositor/hyprland.rs index d17baf6..4745255 100644 --- a/src/clients/compositor/hyprland.rs +++ b/src/clients/compositor/hyprland.rs @@ -2,7 +2,7 @@ use super::{BindModeClient, BindModeUpdate}; #[cfg(feature = "keyboard+hyprland")] use super::{KeyboardLayoutClient, KeyboardLayoutUpdate}; -use super::{Visibility, Workspace, WorkspaceUpdate}; +use super::{Visibility, Workspace}; use crate::{arc_mut, lock, send, spawn_blocking}; use color_eyre::Result; use hyprland::ctl::switch_xkb_layout; @@ -14,6 +14,9 @@ use hyprland::shared::{HyprDataVec, WorkspaceType}; use tokio::sync::broadcast::{Receiver, Sender, channel}; use tracing::{debug, error, info, warn}; +#[cfg(feature = "workspaces")] +use super::WorkspaceUpdate; + #[derive(Debug)] struct TxRx { tx: Sender, diff --git a/src/clients/compositor/sway.rs b/src/clients/compositor/sway.rs index 1de3536..ba984c6 100644 --- a/src/clients/compositor/sway.rs +++ b/src/clients/compositor/sway.rs @@ -1,11 +1,14 @@ -use super::{Visibility, Workspace, WorkspaceUpdate}; +use super::{Visibility, Workspace}; use crate::clients::sway::Client; use crate::{await_sync, error, send, spawn}; use color_eyre::Report; use swayipc_async::{InputChange, InputEvent, Node, WorkspaceChange, WorkspaceEvent}; use tokio::sync::broadcast::{Receiver, channel}; -#[cfg(feature = "workspaces+sway")] +#[cfg(feature = "workspaces")] +use super::WorkspaceUpdate; + +#[cfg(feature = "workspaces")] impl super::WorkspaceClient for Client { fn focus(&self, id: i64) { let client = self.connection().clone(); @@ -112,6 +115,7 @@ impl From<&swayipc_async::Workspace> for Visibility { } } +#[cfg(feature = "workspaces")] impl From for WorkspaceUpdate { fn from(event: WorkspaceEvent) -> Self { match event.change {