diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-04-26 15:16:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-26 15:16:36 +0100 |
| commit | 5ba33f846129f3e6c0505b19f94634b24505e828 (patch) | |
| tree | aaacabe678006040c342935481a86607c66607fd /src/layout/target/WindowTarget.cpp | |
| parent | 329b2b356dd92ac07f4e2aa69cbce82ee9ba9d19 (diff) | |
config/lua: init lua config manager, use lua if available (#13817)
Adds a new lua config manager, which will automatically be used if there is a lua config present.
Diffstat (limited to 'src/layout/target/WindowTarget.cpp')
| -rw-r--r-- | src/layout/target/WindowTarget.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/layout/target/WindowTarget.cpp b/src/layout/target/WindowTarget.cpp index cc6bfab4..13984104 100644 --- a/src/layout/target/WindowTarget.cpp +++ b/src/layout/target/WindowTarget.cpp @@ -110,12 +110,12 @@ void CWindowTarget::updatePos() { const bool DISPLAYINVERSELEFT = STICKS(m_box.logicalBox.x, MONITOR_WORKAREA.x + MONITOR_WORKAREA.w); const bool DISPLAYINVERSERIGHT = STICKS(m_box.logicalBox.x + m_box.logicalBox.w, MONITOR_WORKAREA.x); - static auto PGAPSINDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_in"); - auto* const PGAPSIN = sc<Config::CCssGapData*>((PGAPSINDATA.ptr())->getData()); + static auto PGAPSINDATA = CConfigValue<Config::IComplexConfigValue>("general:gaps_in"); + auto* const PGAPSIN = sc<Config::CCssGapData*>((PGAPSINDATA.ptr())); auto gapsIn = (WORKSPACERULE && WORKSPACERULE->m_gapsIn.has_value()) ? WORKSPACERULE->m_gapsIn.value() : *PGAPSIN; - const static auto REQUESTEDRATIO = CConfigValue<Hyprlang::VEC2>("layout:single_window_aspect_ratio"); - const static auto REQUESTEDRATIOTOLERANCE = CConfigValue<Hyprlang::FLOAT>("layout:single_window_aspect_ratio_tolerance"); + const static auto REQUESTEDRATIO = CConfigValue<Config::VEC2>("layout:single_window_aspect_ratio"); + const static auto REQUESTEDRATIOTOLERANCE = CConfigValue<Config::FLOAT>("layout:single_window_aspect_ratio_tolerance"); Vector2D ratioPadding; @@ -175,7 +175,7 @@ void CWindowTarget::updatePos() { Vector2D availableSpace = calcSize; - static auto PCLAMP_TILED = CConfigValue<Hyprlang::INT>("misc:size_limits_tiled"); + static auto PCLAMP_TILED = CConfigValue<Config::INTEGER>("misc:size_limits_tiled"); if (*PCLAMP_TILED) { Vector2D minSize = m_window->m_ruleApplicator->minSize().valueOr(Vector2D{MIN_WINDOW_SIZE, MIN_WINDOW_SIZE}); @@ -190,7 +190,7 @@ void CWindowTarget::updatePos() { if (m_window->onSpecialWorkspace() && !m_window->isFullscreen()) { // if special, we adjust the coords a bit - static auto PSCALEFACTOR = CConfigValue<Hyprlang::FLOAT>("dwindle:special_scale_factor"); + static auto PSCALEFACTOR = CConfigValue<Config::FLOAT>("dwindle:special_scale_factor"); CBox wb = {calcPos + (calcSize - calcSize * *PSCALEFACTOR) / 2.f, calcSize * *PSCALEFACTOR}; wb.round(); // avoid rounding mess @@ -278,7 +278,7 @@ std::expected<SGeometryRequested, eGeometryFailure> CWindowTarget::desiredGeomet return std::unexpected(GEOMETRY_NO_DESIRED); } - static auto PXWLFORCESCALEZERO = CConfigValue<Hyprlang::INT>("xwayland:force_zero_scaling"); + static auto PXWLFORCESCALEZERO = CConfigValue<Config::INTEGER>("xwayland:force_zero_scaling"); const auto toLogical = [&](SGeometryRequested& req) { if (m_window->m_isX11 && *PXWLFORCESCALEZERO && PMONITOR) req.size /= PMONITOR->m_scale; |
