1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-08-17 14:51:04 +02:00

fix(workspaces): regression due to #572

Fixes #574
This commit is contained in:
Jake Stanger 2024-05-09 17:25:08 +01:00
parent 4695279d69
commit c45ea02a7d
5 changed files with 38 additions and 31 deletions

View file

@ -90,7 +90,7 @@ impl From<Node> for Workspace {
let visibility = Visibility::from(&node);
Self {
id: node.id.to_string(),
id: node.id,
name: node.name.unwrap_or_default(),
monitor: node.output.unwrap_or_default(),
visibility,
@ -103,7 +103,7 @@ impl From<swayipc_async::Workspace> for Workspace {
let visibility = Visibility::from(&workspace);
Self {
id: workspace.id.to_string(),
id: workspace.id,
name: workspace.name,
monitor: workspace.output,
visibility,
@ -141,13 +141,9 @@ impl From<WorkspaceEvent> for WorkspaceUpdate {
WorkspaceChange::Init => {
Self::Add(event.current.expect("Missing current workspace").into())
}
WorkspaceChange::Empty => Self::Remove(
event
.current
.expect("Missing current workspace")
.name
.unwrap_or_default(),
),
WorkspaceChange::Empty => {
Self::Remove(event.current.expect("Missing current workspace").id)
}
WorkspaceChange::Focus => Self::Focus {
old: event.old.map(Workspace::from),
new: Workspace::from(event.current.expect("Missing current workspace")),