From 3a2ec872558c557d0150616985004dee00a3794c Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Wed, 31 May 2023 22:54:27 -0700 Subject: [PATCH] Fix moving focus to a group not focusing last focused node --- src/Hy3Layout.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp index 8e9b953..5f98d46 100644 --- a/src/Hy3Layout.cpp +++ b/src/Hy3Layout.cpp @@ -1473,7 +1473,9 @@ Hy3Node* Hy3Layout::shiftOrGetFocus(Hy3Node& node, ShiftDirection direction, boo bool shift_after = false; - if (shiftMatchesLayout(group_data.layout, direction)) { + if (!shift && group_data.layout == Hy3GroupLayout::Tabbed && group_data.focused_child != nullptr) { + iter = std::find(group_data.children.begin(), group_data.children.end(), group_data.focused_child); + } else if (shiftMatchesLayout(group_data.layout, direction)) { // if the group has the same orientation as movement pick the last/first child based // on movement direction if (shiftIsForward(direction)) iter = group_data.children.begin();