mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Fix unintentional group swallowing when closing a window
This commit is contained in:
parent
d3014c9f92
commit
bd3d973fbf
1 changed files with 12 additions and 7 deletions
|
@ -526,15 +526,20 @@ void Hy3Layout::onWindowRemovedTiling(CWindow* window) {
|
|||
|
||||
if (parent != nullptr) {
|
||||
parent->recalcSizePosRecursive();
|
||||
|
||||
if (parent->data.as_group.children.size() == 1
|
||||
&& parent->data.as_group.children.front()->data.type == Hy3NodeData::Group)
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue