summaryrefslogtreecommitdiff
path: root/src/layout/MasterLayout.cpp
diff options
context:
space:
mode:
authorMightyPlaza <123664421+MightyPlaza@users.noreply.github.com>2023-10-30 14:54:12 +0000
committerGitHub <noreply@github.com>2023-10-30 14:54:12 +0000
commita1924ae4356657a06e43e740f1cf2e1634fa958d (patch)
tree3d73c334ec5bb22b956f8c0293ac61234fe11a9d /src/layout/MasterLayout.cpp
parentcb6cfde6e82f9b146ba1bd937472aa17ec829167 (diff)
internal: create canBeGroupedInto() (#3693)
modified: src/Window.cpp modified: src/Window.hpp modified: src/layout/DwindleLayout.cpp modified: src/layout/MasterLayout.cpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp
Diffstat (limited to 'src/layout/MasterLayout.cpp')
-rw-r--r--src/layout/MasterLayout.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp
index 6ee88512..33b8f62d 100644
--- a/src/layout/MasterLayout.cpp
+++ b/src/layout/MasterLayout.cpp
@@ -108,14 +108,8 @@ void CHyprMasterLayout::onWindowCreatedTiling(CWindow* pWindow, eDirection direc
}
// if it's a group, add the window
- if (OPENINGON && OPENINGON != PNODE && OPENINGON->pWindow->m_sGroupData.pNextWindow // target is group
- && !g_pKeybindManager->m_bGroupsLocked // global group lock disengaged
- && ((pWindow->m_eGroupRules & GROUP_INVADE && pWindow->m_bFirstMap) // window ignore local group locks, or
- || (!OPENINGON->pWindow->getGroupHead()->m_sGroupData.locked // target unlocked
- && !(pWindow->m_sGroupData.pNextWindow && pWindow->getGroupHead()->m_sGroupData.locked))) // source unlocked or isn't group
- && !pWindow->m_sGroupData.deny // source is not denied entry
- && !(pWindow->m_eGroupRules & GROUP_BARRED) // group rule doesn't prevent adding window
- ) {
+ if (OPENINGON && OPENINGON != PNODE && OPENINGON->pWindow->m_sGroupData.pNextWindow // target is group
+ && pWindow->canBeGroupedInto(OPENINGON->pWindow)) {
if (!pWindow->m_sGroupData.pNextWindow)
pWindow->m_dWindowDecorations.emplace_back(std::make_unique<CHyprGroupBarDecoration>(pWindow));