diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-16 23:24:42 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-16 23:24:42 +0200 |
| commit | 6f1b9d6af97a15f4ee13a137924d22cb98d2a855 (patch) | |
| tree | b4a57fe2fbf88452f0bb2aa761b54326172a090d /src/layout/MasterLayout.cpp | |
| parent | 1848086abd134747eda885392f9ec8ad4efe317c (diff) | |
add master:new_on_top
Diffstat (limited to 'src/layout/MasterLayout.cpp')
| -rw-r--r-- | src/layout/MasterLayout.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index f88ee08f..02b27598 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -37,7 +37,9 @@ void CHyprMasterLayout::onWindowCreatedTiling(CWindow* pWindow) { if (pWindow->m_bIsFloating) return; - const auto PNODE = &m_lMasterNodesData.emplace_back(); + static auto *const PNEWTOP = &g_pConfigManager->getConfigValuePtr("master:new_on_top")->intValue; + + const auto PNODE = *PNEWTOP ? &m_lMasterNodesData.emplace_front() : &m_lMasterNodesData.emplace_back(); PNODE->workspaceID = pWindow->m_iWorkspaceID; PNODE->pWindow = pWindow; |
