diff options
| author | MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> | 2023-10-30 14:54:12 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-30 14:54:12 +0000 |
| commit | a1924ae4356657a06e43e740f1cf2e1634fa958d (patch) | |
| tree | 3d73c334ec5bb22b956f8c0293ac61234fe11a9d /src/Window.cpp | |
| parent | cb6cfde6e82f9b146ba1bd937472aa17ec829167 (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/Window.cpp')
| -rw-r--r-- | src/Window.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Window.cpp b/src/Window.cpp index fb46740b..77960dc6 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -767,6 +767,15 @@ int CWindow::getGroupSize() { return size; } +bool CWindow::canBeGroupedInto(CWindow* pWindow) { + return !g_pKeybindManager->m_bGroupsLocked // global group lock disengaged + && ((m_eGroupRules & GROUP_INVADE && m_bFirstMap) // window ignore local group locks, or + || (!pWindow->getGroupHead()->m_sGroupData.locked // target unlocked + && !(m_sGroupData.pNextWindow && getGroupHead()->m_sGroupData.locked))) // source unlocked or isn't group + && !m_sGroupData.deny // source is not denied entry + && !(m_eGroupRules & GROUP_BARRED && m_bFirstMap); // group rule doesn't prevent adding window +} + CWindow* CWindow::getGroupWindowByIndex(int index) { const int SIZE = getGroupSize(); index = ((index % SIZE) + SIZE) % SIZE; |
