From fa9135b5d1a459f91ac47f5c03214d836475473c Mon Sep 17 00:00:00 2001 From: MaxVerevkin Date: Mon, 17 Apr 2023 13:38:20 +0300 Subject: ext_workspace_unstable: send activate request even though it is ignored by hyprland --- src/wm_info_provider/ext_workspace_unstable.rs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/wm_info_provider') 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, + conn: &mut Connection, _: 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); } } -- cgit v1.3.1