Fix single group nesting bug

Nested single child groups could be created by making a group with a
window and a single child group, then deleting the window.
This commit is contained in:
outfoxxed 2023-04-19 18:22:11 -07:00
parent d087b83249
commit 9082d9259f
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E

View file

@ -523,6 +523,14 @@ void Hy3Layout::onWindowRemovedTiling(CWindow* window) {
if (parent != nullptr) {
parent->recalcSizePosRecursive();
}
auto* target_parent = parent;
while (target_parent != nullptr && swallowGroup(target_parent)) {
target_parent = target_parent->parent;
}
if (target_parent != parent && target_parent != nullptr)
target_parent->recalcSizePosRecursive();
}
CWindow* Hy3Layout::getNextWindowCandidate(CWindow* window) {