b20b3f7402ffc8ff4f509cd3952d8341c95c1e4b
- Author
- outfoxxed <outfoxxed@outfoxxed.me>
- Committer
- outfoxxed <outfoxxed@outfoxxed.me>
- Date
Message
Fix focus not following a moved window
Diff
1diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp
2index cb907ad47b4a7d55fce7461040c99ea6a2756388..0ac8eae3333e2ade46c7b5589f43be41b23fd8ac 100644
3--- a/src/Hy3Layout.cpp
4+++ b/src/Hy3Layout.cpp
5@@ -1189,6 +1189,13 @@ Hy3Node* shiftOrGetFocus(Hy3Node& node, ShiftDirection direction, bool shift) {
6 target_parent = target_parent->parent;
7 }
8
9+ auto* focusnode = &node;
10+
11+ while (focusnode->parent != nullptr) {
12+ focusnode->parent->data.as_group.lastFocusedChild = focusnode;
13+ focusnode = focusnode->parent;
14+ }
15+
16 if (target_parent != target_group && target_parent != nullptr)
17 target_parent->recalcSizePosRecursive();
18 }