diff options
Diffstat (limited to 'src/layout/MasterLayout.cpp')
| -rw-r--r-- | src/layout/MasterLayout.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index e349d650..5c310ed9 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -83,6 +83,20 @@ void CHyprMasterLayout::onWindowCreatedTiling(CWindow* pWindow) { const auto WINDOWSONWORKSPACE = getNodesOnWorkspace(PNODE->workspaceID); float lastSplitPercent = 0.5f; + auto OPENINGON = isWindowTiled(g_pCompositor->m_pLastWindow) && g_pCompositor->m_pLastWindow->m_iWorkspaceID == pWindow->m_iWorkspaceID ? + getNodeFromWindow(g_pCompositor->m_pLastWindow) : + getMasterNodeOnWorkspace(pWindow->m_iWorkspaceID); + + if (OPENINGON && OPENINGON->pWindow->m_sGroupData.pNextWindow && OPENINGON != PNODE) { + m_lMasterNodesData.remove(*PNODE); + + OPENINGON->pWindow->insertWindowToGroup(pWindow); + + pWindow->m_dWindowDecorations.emplace_back(std::make_unique<CHyprGroupBarDecoration>(pWindow)); + + return; + } + if (*PNEWISMASTER || WINDOWSONWORKSPACE == 1) { for (auto& nd : m_lMasterNodesData) { if (nd.isMaster && nd.workspaceID == PNODE->workspaceID) { @@ -1011,6 +1025,17 @@ std::any CHyprMasterLayout::layoutMessage(SLayoutMessageHeader header, std::stri return 0; } +void CHyprMasterLayout::replaceWindowDataWith(CWindow* from, CWindow* to) { + const auto PNODE = getNodeFromWindow(from); + + if (!PNODE) + return; + + PNODE->pWindow = to; + + applyNodeDataToWindow(PNODE); +} + void CHyprMasterLayout::onEnable() { for (auto& w : g_pCompositor->m_vWindows) { if (w->m_bIsFloating || !w->m_bMappedX11 || !w->m_bIsMapped || w->isHidden()) |
