1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-09-15 19:26:58 +02:00

build: decouple workspace and keyboard modules

Fixes #862
This commit is contained in:
Jake Stanger 2025-03-24 12:22:02 +00:00
commit a4eb149816
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
4 changed files with 35 additions and 10 deletions

View file

@ -7,7 +7,7 @@ use std::sync::Arc;
#[cfg(feature = "clipboard")]
pub mod clipboard;
#[cfg(feature = "workspaces")]
#[cfg(any(feature = "keyboard", feature = "workspaces"))]
pub mod compositor;
#[cfg(feature = "keyboard")]
pub mod libinput;
@ -46,7 +46,7 @@ pub struct Clients {
clipboard: Option<Arc<clipboard::Client>>,
#[cfg(feature = "keyboard")]
libinput: HashMap<Box<str>, Arc<libinput::Client>>,
#[cfg(any(feature = "keyboard+sway", feature = "keyboard+hyprland"))]
#[cfg(feature = "keyboard")]
keyboard_layout: Option<Arc<dyn compositor::KeyboardLayoutClient>>,
#[cfg(feature = "cairo")]
lua: Option<Rc<lua::LuaEngine>>,
@ -101,7 +101,7 @@ impl Clients {
Ok(client)
}
#[cfg(any(feature = "keyboard+sway", feature = "keyboard+hyprland"))]
#[cfg(feature = "keyboard")]
pub fn keyboard_layout(&mut self) -> ClientResult<dyn compositor::KeyboardLayoutClient> {
let client = if let Some(keyboard_layout) = &self.keyboard_layout {
keyboard_layout.clone()