mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 00:09: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
|
||||
if (PNODE->pGroupParent) {
|
||||
const auto MEMBERSCOPY = PNODE->pGroupParent->groupMembers;
|
||||
PNODE->pGroupParent->groupMembers.clear();
|
||||
for (auto& c : MEMBERSCOPY) {
|
||||
if (c != PNODE) {
|
||||
PNODE->pGroupParent->groupMembers.push_back(c);
|
||||
}
|
||||
}
|
||||
PNODE->pGroupParent->groupMembers.erase(PNODE->pGroupParent->groupMembers.begin() + PNODE->pGroupParent->groupMemberActive);
|
||||
|
||||
if ((long unsigned int)PNODE->pGroupParent->groupMemberActive >= PNODE->pGroupParent->groupMembers.size())
|
||||
PNODE->pGroupParent->groupMemberActive = 0;
|
||||
|
@ -310,8 +299,18 @@ void CHyprDwindleLayout::onWindowRemoved(CWindow* pWindow) {
|
|||
} else {
|
||||
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(*PNODE);
|
||||
|
||||
|
|
|
@ -48,7 +48,8 @@ void CAnimationManager::tick() {
|
|||
}
|
||||
|
||||
// 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;
|
||||
|
||||
// process the borders
|
||||
|
|
Loading…
Reference in a new issue