From 74cc46a2383db5538d7e0392e4b79b7287775e9b Mon Sep 17 00:00:00 2001 From: MaxVerevkin Date: Thu, 7 Sep 2023 00:47:28 +0300 Subject: hyprland again --- src/bar.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/bar.rs') diff --git a/src/bar.rs b/src/bar.rs index 2ca9b6c..d616008 100644 --- a/src/bar.rs +++ b/src/bar.rs @@ -32,7 +32,7 @@ pub struct Bar { tags: Vec, layout_name: Option, mode_name: Option, - tags_btns: ButtonManager, + tags_btns: ButtonManager, tags_computed: Vec<(ColorPair, ComputedText)>, layout_name_computed: Option, mode_computed: Option, @@ -119,9 +119,9 @@ impl Bar { x: f64, _y: f64, ) -> anyhow::Result<()> { - if let Some(tag) = self.tags_btns.click(x) { + if let Some(tag_id) = self.tags_btns.click(x) { if let Some(wm) = &mut ss.wm_info_provider { - wm.click_on_tag(conn, self.output.wl, seat, tag, button); + wm.click_on_tag(conn, self.output.wl, seat, *tag_id, button); } } else if let Some((name, instance)) = self.blocks_btns.click(x) { if let Some(cmd) = &mut ss.status_cmd { @@ -212,8 +212,7 @@ impl Bar { continue; }; let comp = compute_tag_label(&tag.name, &ss.config); - self.tags_btns - .push(offset_left, comp.width, tag.name.clone()); + self.tags_btns.push(offset_left, comp.width, tag.id); offset_left += comp.width; self.tags_computed.push((ColorPair { bg, fg }, comp)); } -- cgit v1.3.1