diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-03-20 13:52:37 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-20 17:52:37 +0000 |
| commit | 8726a7363eb9213235e6e23657668e0daac39a5b (patch) | |
| tree | 42eeb40f6f81a9ccec1455f308e56173e9dcce4b /src/layout/space/Space.cpp | |
| parent | b940b0d2c197841b0f648598ee782dbaf9e0a89b (diff) | |
config: cleanup the entire config infrastructure (#13785)
Massively refactors the config infrastructure, sorely
needed and will be req'd for the lua stuff
Diffstat (limited to 'src/layout/space/Space.cpp')
| -rw-r--r-- | src/layout/space/Space.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/layout/space/Space.cpp b/src/layout/space/Space.cpp index a02ba517..db014472 100644 --- a/src/layout/space/Space.cpp +++ b/src/layout/space/Space.cpp @@ -5,8 +5,10 @@ #include "../../debug/log/Logger.hpp" #include "../../desktop/Workspace.hpp" -#include "../../config/ConfigManager.hpp" +#include "../../config/shared/workspace/WorkspaceRuleManager.hpp" +#include "../../config/ConfigValue.hpp" #include "../../event/EventBus.hpp" +#include "../../helpers/Monitor.hpp" using namespace Layout; @@ -78,19 +80,19 @@ void CSpace::recheckWorkArea() { return; } - const auto WORKSPACERULE = g_pConfigManager->getWorkspaceRuleFor(m_parent.lock()); + const auto WORKSPACERULE = Config::workspaceRuleMgr()->getWorkspaceRuleFor(m_parent.lock()).value_or(Config::CWorkspaceRule{}); auto workArea = m_parent->m_monitor->logicalBoxMinusReserved(); static auto PGAPSOUTDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_out"); static auto PFLOATGAPSDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:float_gaps"); - auto* const PGAPSOUT = sc<CCssGapData*>((PGAPSOUTDATA.ptr())->getData()); - auto* PFLOATGAPS = sc<CCssGapData*>(PFLOATGAPSDATA.ptr()->getData()); + auto* const PGAPSOUT = sc<Config::CCssGapData*>((PGAPSOUTDATA.ptr())->getData()); + auto* PFLOATGAPS = sc<Config::CCssGapData*>(PFLOATGAPSDATA.ptr()->getData()); if (PFLOATGAPS->m_bottom < 0 || PFLOATGAPS->m_left < 0 || PFLOATGAPS->m_right < 0 || PFLOATGAPS->m_top < 0) PFLOATGAPS = PGAPSOUT; - auto gapsOut = WORKSPACERULE.gapsOut.value_or(*PGAPSOUT); - auto gapsFloat = WORKSPACERULE.gapsOut.value_or(*PFLOATGAPS); + auto gapsOut = WORKSPACERULE.m_gapsOut.value_or(*PGAPSOUT); + auto gapsFloat = WORKSPACERULE.m_gapsOut.value_or(*PFLOATGAPS); Desktop::CReservedArea reservedGaps{gapsOut.m_top, gapsOut.m_right, gapsOut.m_bottom, gapsOut.m_left}; Desktop::CReservedArea reservedFloatGaps{gapsFloat.m_top, gapsFloat.m_right, gapsFloat.m_bottom, gapsFloat.m_left}; |
