From a1924ae4356657a06e43e740f1cf2e1634fa958d Mon Sep 17 00:00:00 2001 From: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> Date: Mon, 30 Oct 2023 14:54:12 +0000 Subject: 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 --- src/layout/DwindleLayout.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/layout/DwindleLayout.cpp') diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 984db38d..74277dd4 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -326,15 +326,8 @@ void CHyprDwindleLayout::onWindowCreatedTiling(CWindow* pWindow, eDirection dire } // if it's a group, add the window - if (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 && pWindow->m_bFirstMap) // group rule doesn't prevent adding window - && !m_vOverrideFocalPoint // we are not moving window - ) { + if (OPENINGON->pWindow->m_sGroupData.pNextWindow // target is group + && pWindow->canBeGroupedInto(OPENINGON->pWindow) && !m_vOverrideFocalPoint) { // we are not moving window if (!pWindow->m_sGroupData.pNextWindow) pWindow->m_dWindowDecorations.emplace_back(std::make_unique(pWindow)); -- cgit v1.2.3