From a85a6fa6c8ff9e51ba774cec112b408bce601451 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Tue, 7 Mar 2023 14:24:04 +0000 Subject: Dwindle: Added default_split_ratio --- src/layout/DwindleLayout.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/layout/DwindleLayout.cpp') diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 513969d5..37a7bf81 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -219,7 +219,8 @@ void CHyprDwindleLayout::onWindowCreatedTiling(CWindow* pWindow) { const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID); - static auto* const PUSEACTIVE = &g_pConfigManager->getConfigValuePtr("dwindle:use_active_for_splits")->intValue; + static auto* const PUSEACTIVE = &g_pConfigManager->getConfigValuePtr("dwindle:use_active_for_splits")->intValue; + static auto* const PDEFAULTSPLIT = &g_pConfigManager->getConfigValuePtr("dwindle:default_split_ratio")->floatValue; // Populate the node with our window's data PNODE->workspaceID = pWindow->m_iWorkspaceID; @@ -317,6 +318,7 @@ void CHyprDwindleLayout::onWindowCreatedTiling(CWindow* pWindow) { NEWPARENT->workspaceID = OPENINGON->workspaceID; NEWPARENT->pParent = OPENINGON->pParent; NEWPARENT->isNode = true; // it is a node + NEWPARENT->splitRatio = std::clamp(*PDEFAULTSPLIT, 0.1f, 1.9f); const auto PWIDTHMULTIPLIER = &g_pConfigManager->getConfigValuePtr("dwindle:split_width_multiplier")->floatValue; -- cgit v1.2.3