mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 00:29:49 +01:00
Dwindle window group fixes
fixed a crash and animations in the bg
This commit is contained in:
parent
b6a93b2f03
commit
4bd23604f8
2 changed files with 13 additions and 13 deletions
|
@ -283,20 +283,9 @@ void CHyprDwindleLayout::onWindowRemoved(CWindow* pWindow) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PSIBLING->pParent)
|
|
||||||
PSIBLING->pParent->recalcSizePosRecursive();
|
|
||||||
else
|
|
||||||
PSIBLING->recalcSizePosRecursive();
|
|
||||||
|
|
||||||
// check if it was grouped
|
// check if it was grouped
|
||||||
if (PNODE->pGroupParent) {
|
if (PNODE->pGroupParent) {
|
||||||
const auto MEMBERSCOPY = PNODE->pGroupParent->groupMembers;
|
PNODE->pGroupParent->groupMembers.erase(PNODE->pGroupParent->groupMembers.begin() + PNODE->pGroupParent->groupMemberActive);
|
||||||
PNODE->pGroupParent->groupMembers.clear();
|
|
||||||
for (auto& c : MEMBERSCOPY) {
|
|
||||||
if (c != PNODE) {
|
|
||||||
PNODE->pGroupParent->groupMembers.push_back(c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((long unsigned int)PNODE->pGroupParent->groupMemberActive >= PNODE->pGroupParent->groupMembers.size())
|
if ((long unsigned int)PNODE->pGroupParent->groupMemberActive >= PNODE->pGroupParent->groupMembers.size())
|
||||||
PNODE->pGroupParent->groupMemberActive = 0;
|
PNODE->pGroupParent->groupMemberActive = 0;
|
||||||
|
@ -310,8 +299,18 @@ void CHyprDwindleLayout::onWindowRemoved(CWindow* pWindow) {
|
||||||
} else {
|
} else {
|
||||||
PNODE->pGroupParent->recalcSizePosRecursive();
|
PNODE->pGroupParent->recalcSizePosRecursive();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if the parent is to be removed, remove the group
|
||||||
|
if (PPARENT == PNODE->pGroupParent) {
|
||||||
|
toggleWindowGroup(PPARENT->groupMembers[PPARENT->groupMemberActive]->pWindow);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (PSIBLING->pParent)
|
||||||
|
PSIBLING->pParent->recalcSizePosRecursive();
|
||||||
|
else
|
||||||
|
PSIBLING->recalcSizePosRecursive();
|
||||||
|
|
||||||
m_lDwindleNodesData.remove(*PPARENT);
|
m_lDwindleNodesData.remove(*PPARENT);
|
||||||
m_lDwindleNodesData.remove(*PNODE);
|
m_lDwindleNodesData.remove(*PNODE);
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,8 @@ void CAnimationManager::tick() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// process fadein/out for unmapped windows, but nothing else.
|
// process fadein/out for unmapped windows, but nothing else.
|
||||||
if (!g_pCompositor->windowValidMapped(&w))
|
// we can't use windowValidMapped because we want to animate hidden windows too.
|
||||||
|
if (!g_pCompositor->windowExists(&w) || !w.m_bIsMapped || !g_pXWaylandManager->getWindowSurface(&w))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// process the borders
|
// process the borders
|
||||||
|
|
Loading…
Reference in a new issue