summaryrefslogtreecommitdiff
path: root/src/river_protocols
diff options
context:
space:
mode:
Diffstat (limited to 'src/river_protocols')
-rw-r--r--src/river_protocols/status.rs8
-rw-r--r--src/river_protocols/status/dispatch.rs8
2 files changed, 15 insertions, 1 deletions
diff --git a/src/river_protocols/status.rs b/src/river_protocols/status.rs
index 50c85e0..f19ac5f 100644
--- a/src/river_protocols/status.rs
+++ b/src/river_protocols/status.rs
@@ -96,6 +96,14 @@ pub trait RiverStatusHandler: Sized {
output_status: &RiverOutputStatus,
urgent: u32,
);
+
+ fn views_tags_updated(
+ &mut self,
+ conn: &Connection,
+ qh: &QueueHandle<Self>,
+ output_status: &RiverOutputStatus,
+ tags: Vec<u32>,
+ );
}
#[derive(Debug, Clone)]
diff --git a/src/river_protocols/status/dispatch.rs b/src/river_protocols/status/dispatch.rs
index d38037d..65d6e0c 100644
--- a/src/river_protocols/status/dispatch.rs
+++ b/src/river_protocols/status/dispatch.rs
@@ -79,7 +79,13 @@ where
match event {
Event::FocusedTags { tags } => data.focused_tags_updated(conn, qh, &status, tags),
Event::UrgentTags { tags } => data.urgent_tags_updated(conn, qh, &status, tags),
- Event::ViewTags { tags: _ } => (),
+ Event::ViewTags { tags } => {
+ let tags = tags
+ .chunks_exact(4)
+ .map(|bytes| u32::from_ne_bytes(bytes.try_into().unwrap()))
+ .collect();
+ data.views_tags_updated(conn, qh, &status, tags);
+ }
}
}
}