1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-08-17 06:41:03 +02:00

Merge pull request #990 from JakeStanger/build/feature-fix

build: fix issues with compositor feature flags
This commit is contained in:
Jake Stanger 2025-05-18 14:33:26 +01:00 committed by GitHub
commit d5744f597c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View file

@ -2,7 +2,7 @@
use super::{BindModeClient, BindModeUpdate}; use super::{BindModeClient, BindModeUpdate};
#[cfg(feature = "keyboard+hyprland")] #[cfg(feature = "keyboard+hyprland")]
use super::{KeyboardLayoutClient, KeyboardLayoutUpdate}; use super::{KeyboardLayoutClient, KeyboardLayoutUpdate};
use super::{Visibility, Workspace, WorkspaceUpdate}; use super::{Visibility, Workspace};
use crate::{arc_mut, lock, send, spawn_blocking}; use crate::{arc_mut, lock, send, spawn_blocking};
use color_eyre::Result; use color_eyre::Result;
use hyprland::ctl::switch_xkb_layout; use hyprland::ctl::switch_xkb_layout;
@ -14,6 +14,9 @@ use hyprland::shared::{HyprDataVec, WorkspaceType};
use tokio::sync::broadcast::{Receiver, Sender, channel}; use tokio::sync::broadcast::{Receiver, Sender, channel};
use tracing::{debug, error, info, warn}; use tracing::{debug, error, info, warn};
#[cfg(feature = "workspaces")]
use super::WorkspaceUpdate;
#[derive(Debug)] #[derive(Debug)]
struct TxRx<T> { struct TxRx<T> {
tx: Sender<T>, tx: Sender<T>,

View file

@ -1,11 +1,14 @@
use super::{Visibility, Workspace, WorkspaceUpdate}; use super::{Visibility, Workspace};
use crate::clients::sway::Client; use crate::clients::sway::Client;
use crate::{await_sync, error, send, spawn}; use crate::{await_sync, error, send, spawn};
use color_eyre::Report; use color_eyre::Report;
use swayipc_async::{InputChange, InputEvent, Node, WorkspaceChange, WorkspaceEvent}; use swayipc_async::{InputChange, InputEvent, Node, WorkspaceChange, WorkspaceEvent};
use tokio::sync::broadcast::{Receiver, channel}; use tokio::sync::broadcast::{Receiver, channel};
#[cfg(feature = "workspaces+sway")] #[cfg(feature = "workspaces")]
use super::WorkspaceUpdate;
#[cfg(feature = "workspaces")]
impl super::WorkspaceClient for Client { impl super::WorkspaceClient for Client {
fn focus(&self, id: i64) { fn focus(&self, id: i64) {
let client = self.connection().clone(); let client = self.connection().clone();
@ -112,6 +115,7 @@ impl From<&swayipc_async::Workspace> for Visibility {
} }
} }
#[cfg(feature = "workspaces")]
impl From<WorkspaceEvent> for WorkspaceUpdate { impl From<WorkspaceEvent> for WorkspaceUpdate {
fn from(event: WorkspaceEvent) -> Self { fn from(event: WorkspaceEvent) -> Self {
match event.change { match event.change {