summaryrefslogtreecommitdiff
path: root/src/wm_info_provider/ext_workspace_unstable.rs
diff options
context:
space:
mode:
authorMaxVerevkin <maxxverrr@gmail.com>2023-04-17 13:38:20 +0300
committerMaxVerevkin <maxxverrr@gmail.com>2023-06-01 13:37:24 +0300
commitfa9135b5d1a459f91ac47f5c03214d836475473c (patch)
tree222c564eefc9991763447691ca1e576f84e69bda /src/wm_info_provider/ext_workspace_unstable.rs
parent2da90fc625725c6d3465c920826e2718579cfb40 (diff)
downloadi3bar-mango-fa9135b5d1a459f91ac47f5c03214d836475473c.tar.gz
ext_workspace_unstable: send activate request
even though it is ignored by hyprland
Diffstat (limited to 'src/wm_info_provider/ext_workspace_unstable.rs')
-rw-r--r--src/wm_info_provider/ext_workspace_unstable.rs17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/wm_info_provider/ext_workspace_unstable.rs b/src/wm_info_provider/ext_workspace_unstable.rs
index 68238d0..dbf6bf7 100644
--- a/src/wm_info_provider/ext_workspace_unstable.rs
+++ b/src/wm_info_provider/ext_workspace_unstable.rs
@@ -57,12 +57,23 @@ impl ExtWorkspaceUnstable {
pub fn click_on_tag(
&mut self,
- _: &mut Connection<State>,
+ conn: &mut Connection<State>,
_: WlOutput,
_: WlSeat,
- _: &str,
- _: PointerBtn,
+ tag: &str,
+ btn: PointerBtn,
) {
+ if btn != PointerBtn::Left {
+ return;
+ }
+
+ let Some(ws) = self
+ .groups
+ .iter()
+ .find_map(|g| g.workspaces.iter().find(|w| w.name.as_deref() == Some(tag)))
+ else { return };
+
+ ws.workspace_handle.activate(conn);
}
}