Make sure the new group window has group bar

The previous commit (120a9c33d1) reworked
the behavior for inserting windows into groups, however in this rework,
the code for adding a group bar window decoration was also removed,
assuming that the CWindow::insertWindowToGroup would do that
automatically. Apparently this is not the case, and we still need to do
it manually.

This therefore just brings the code for adding the group bar back,
fixing this issue.
This commit is contained in:
ItsDrike 2023-07-23 14:21:37 +02:00
parent 120a9c33d1
commit c38652c26f
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0

View file

@ -81,6 +81,11 @@ void groupCreate(const SDwindleNodeData* PNODE, CHyprDwindleLayout* layout)
// Remove this window from being shown by layout (it will become a part of a group)
g_pLayoutManager->getCurrentLayout()->onWindowRemoved(window);
// Create a group bar decoration for the window
// (if it's not already a group, in which case it should already have it)
if (!window->m_sGroupData.pNextWindow)
window->m_dWindowDecorations.emplace_back(std::make_unique<CHyprGroupBarDecoration>(window));
PWINDOW->insertWindowToGroup(window);
// Make sure to treat this window as hidden (will focus the group instead of this window