summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/decorations/CHyprGroupBarDecoration.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp
index 89e047ca..70d4ed93 100644
--- a/src/render/decorations/CHyprGroupBarDecoration.cpp
+++ b/src/render/decorations/CHyprGroupBarDecoration.cpp
@@ -57,15 +57,10 @@ void CHyprGroupBarDecoration::updateWindow(CWindow* pWindow) {
}
m_dwGroupMembers.clear();
- CWindow* curr = pWindow;
- CWindow* head = nullptr;
- while (!curr->m_sGroupData.head) {
- curr = curr->m_sGroupData.pNextWindow;
- }
+ CWindow* head = pWindow->getGroupHead();
+ m_dwGroupMembers.push_back(head);
- head = curr;
- m_dwGroupMembers.push_back(curr);
- curr = curr->m_sGroupData.pNextWindow;
+ CWindow* curr = head->m_sGroupData.pNextWindow;
while (curr != head) {
m_dwGroupMembers.push_back(curr);
curr = curr->m_sGroupData.pNextWindow;