mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-05 14:42:01 -07:00
groupbar fixes (#2630)
Fixes multiple groupbar decoration issues: - togglegroup removes fullscreen to avoid to avoid weird state - fixes issue where a group had multiple windows with head = true - fixes issue where merging 2 groups would cause a window to have 2 groupbar decorations - fixes issue where merging a group with more than 1 window into another group would make windows have no groupbar decoration - fixes issue where ungrouping windows could just move them into another group on the same workspace --------- Co-authored-by: vaxerski <43317083+vaxerski@users.noreply.github.com>
This commit is contained in:
@@ -311,18 +311,33 @@ void CHyprDwindleLayout::onWindowCreatedTiling(CWindow* pWindow) {
|
||||
}
|
||||
|
||||
// if it's a group, add the window
|
||||
if (OPENINGON->pWindow->m_sGroupData.pNextWindow && !OPENINGON->pWindow->getGroupHead()->m_sGroupData.locked && // target is an unlocked group
|
||||
(!pWindow->m_sGroupData.pNextWindow || !pWindow->getGroupHead()->m_sGroupData.locked) // source is not group or is a unlocked group
|
||||
&& !g_pKeybindManager->m_bGroupsLocked) {
|
||||
m_lDwindleNodesData.remove(*PNODE);
|
||||
if (OPENINGON->pWindow->m_sGroupData.pNextWindow && !OPENINGON->pWindow->getGroupHead()->m_sGroupData.locked &&
|
||||
!g_pKeybindManager->m_bGroupsLocked) { // target is an unlocked group
|
||||
|
||||
OPENINGON->pWindow->insertWindowToGroup(pWindow);
|
||||
if (!pWindow->m_sGroupData.pNextWindow) { // source is not a group
|
||||
m_lDwindleNodesData.remove(*PNODE);
|
||||
OPENINGON->pWindow->insertWindowToGroup(pWindow);
|
||||
OPENINGON->pWindow->setGroupCurrent(pWindow);
|
||||
|
||||
pWindow->m_dWindowDecorations.emplace_back(std::make_unique<CHyprGroupBarDecoration>(pWindow));
|
||||
pWindow->updateWindowDecos();
|
||||
recalculateWindow(pWindow);
|
||||
pWindow->m_dWindowDecorations.emplace_back(std::make_unique<CHyprGroupBarDecoration>(pWindow));
|
||||
pWindow->updateWindowDecos();
|
||||
recalculateWindow(pWindow);
|
||||
|
||||
return;
|
||||
g_pCompositor->focusWindow(pWindow);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pWindow->getGroupHead()->m_sGroupData.locked) { // source is an unlocked group
|
||||
m_lDwindleNodesData.remove(*PNODE);
|
||||
OPENINGON->pWindow->insertWindowToGroup(pWindow);
|
||||
OPENINGON->pWindow->setGroupCurrent(pWindow);
|
||||
|
||||
pWindow->updateWindowDecos();
|
||||
recalculateWindow(pWindow);
|
||||
|
||||
g_pCompositor->focusWindow(pWindow);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// If it's not, get the node under our cursor
|
||||
|
Reference in New Issue
Block a user