1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-01 18:51:04 +02:00

fix(hyprland): issues with tracking workspaces

This commit is contained in:
Jake Stanger 2023-01-30 21:56:41 +00:00
parent d78d851858
commit 058c8f4228
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
4 changed files with 164 additions and 125 deletions

View file

@ -191,12 +191,12 @@ impl Module<gtk::Box> for WorkspacesModule {
}
}
WorkspaceUpdate::Focus { old, new } => {
let old = button_map.get(&old.name);
let old = button_map.get(&old);
if let Some(old) = old {
old.style_context().remove_class("focused");
}
let new = button_map.get(&new.name);
let new = button_map.get(&new);
if let Some(new) = new {
new.style_context().add_class("focused");
}
@ -253,7 +253,7 @@ impl Module<gtk::Box> for WorkspacesModule {
}
}
WorkspaceUpdate::Remove(workspace) => {
let button = button_map.get(&workspace.name);
let button = button_map.get(&workspace);
if let Some(item) = button {
container.remove(item);
}