mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-11-27 00:16:00 +03:00
fix groups not updating size on head change
This commit is contained in:
parent
9136783e9c
commit
214c2c7b1c
@ -63,6 +63,20 @@ SDwindleNodeData* SDwindleNodeData::getGroupHead() {
|
||||
return this;
|
||||
}
|
||||
|
||||
SDwindleNodeData* SDwindleNodeData::getGroupVisible() {
|
||||
SDwindleNodeData* current = this->pNextGroupMember;
|
||||
|
||||
while (current != this) {
|
||||
if (!current->pWindow->m_bHidden) {
|
||||
return current;
|
||||
}
|
||||
|
||||
current = current->pNextGroupMember;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
void SDwindleNodeData::setGroupFocusedNode(SDwindleNodeData* pMember) {
|
||||
SDwindleNodeData* current = this->pNextGroupMember;
|
||||
|
||||
@ -222,6 +236,14 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for
|
||||
PWINDOW->m_vRealSize.warp();
|
||||
}
|
||||
|
||||
if (pNode->isGroupMember() && pNode->groupHead) {
|
||||
// update visible node
|
||||
const auto PVISNODE = pNode->getGroupVisible();
|
||||
|
||||
PVISNODE->pWindow->m_vRealSize = PWINDOW->m_vRealSize.goalv();
|
||||
PVISNODE->pWindow->m_vRealPosition = PWINDOW->m_vRealPosition.goalv();
|
||||
}
|
||||
|
||||
PWINDOW->updateWindowDecos();
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,7 @@ struct SDwindleNodeData {
|
||||
void getAllChildrenRecursive(std::deque<SDwindleNodeData*>*);
|
||||
bool isGroupMember();
|
||||
SDwindleNodeData* getGroupHead();
|
||||
SDwindleNodeData* getGroupVisible();
|
||||
void setGroupFocusedNode(SDwindleNodeData*);
|
||||
CHyprDwindleLayout* layout = nullptr;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user