apply new node data to all group windows on close

This commit is contained in:
vaxerski 2022-09-29 19:46:33 +01:00
parent caeb0636fa
commit da40bf823f

View file

@ -520,6 +520,17 @@ void CHyprDwindleLayout::onWindowRemovedTiling(CWindow* pWindow) {
PSIBLING->size = PPARENT->size; PSIBLING->size = PPARENT->size;
PSIBLING->pParent = PPARENT->pParent; PSIBLING->pParent = PPARENT->pParent;
if (PSIBLING->isGroupMember()) {
// apply to all group members
SDwindleNodeData* current = PSIBLING->pNextGroupMember;
while (current != PSIBLING) {
current->position = PPARENT->position;
current->size = PPARENT->size;
current = current->pNextGroupMember;
}
}
if (PPARENT->pParent != nullptr) { if (PPARENT->pParent != nullptr) {
if (PPARENT->pParent->children[0] == PPARENT) { if (PPARENT->pParent->children[0] == PPARENT) {
PPARENT->pParent->children[0] = PSIBLING; PPARENT->pParent->children[0] = PSIBLING;