Diff
1diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp
2index 82dc6efe360915bca3df1a16c545425f0b6bc4b1..8e9b95325bfe203ed09a34964a31d7f5ab558f70 100644
3--- a/src/Hy3Layout.cpp
4+++ b/src/Hy3Layout.cpp
5@@ -882,11 +882,9 @@ void Hy3Layout::onWindowFocusChange(CWindow* window) {
6 auto* node = this->getNodeFromWindow(window);
7 if (node == nullptr) return;
8
9- if (node->parent != nullptr && node->parent->data.as_group.layout == Hy3GroupLayout::Tabbed) {
10- node->parent->recalcSizePosRecursive();
11- }
12-
13 node->markFocused();
14+ while (node->parent != nullptr) node = node->parent;
15+ node->recalcSizePosRecursive();
16 }
17
18 bool Hy3Layout::isWindowTiled(CWindow* window) {
19@@ -1347,6 +1345,8 @@ void Hy3Layout::shiftFocus(int workspace, ShiftDirection direction) {
20 Hy3Node* target;
21 if ((target = this->shiftOrGetFocus(*node, direction, false, false))) {
22 target->focus();
23+ while (target->parent != nullptr) target = target->parent;
24+ target->recalcSizePosRecursive();
25 }
26 }
27
28@@ -1384,7 +1384,6 @@ Hy3Node* Hy3Layout::shiftOrGetFocus(Hy3Node& node, ShiftDirection direction, boo
29
30 auto& group = break_parent->data.as_group; // must be a group in order to be a parent
31
32-
33 if (shiftMatchesLayout(group.layout, direction)) {
34 // group has the correct orientation
35