Fix focus not following a moved window

This commit is contained in:
outfoxxed 2023-04-22 04:14:36 -07:00
parent e0b4a2e5f1
commit b20b3f7402
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E

View file

@ -1189,6 +1189,13 @@ Hy3Node* shiftOrGetFocus(Hy3Node& node, ShiftDirection direction, bool shift) {
target_parent = target_parent->parent;
}
auto* focusnode = &node;
while (focusnode->parent != nullptr) {
focusnode->parent->data.as_group.lastFocusedChild = focusnode;
focusnode = focusnode->parent;
}
if (target_parent != target_group && target_parent != nullptr)
target_parent->recalcSizePosRecursive();
}