From 1727faa96c94b48ff3bddc1310442755c5da77cd Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Thu, 16 Dec 2021 12:01:22 +0100 Subject: [PATCH] Fix #10 tree.get_windows().get(0) is not the current window (rotation, urgency)! --- src/cmds.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmds.rs b/src/cmds.rs index 52e4352..2741e02 100644 --- a/src/cmds.rs +++ b/src/cmds.rs @@ -807,7 +807,7 @@ pub fn focus_window_of_same_layout_in_direction( let root = get_tree(false); let tree = t::get_tree(&root, extra_props); let wins = tree.get_windows(); - let cur_win = wins.get(0); + let cur_win = wins.iter().find(|w| w.node.focused); if let Some(cur_win) = cur_win { focus_window_in_direction(