From 5ba33f846129f3e6c0505b19f94634b24505e828 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sun, 26 Apr 2026 15:16:36 +0100 Subject: 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. --- src/layout/target/WindowTarget.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/layout/target/WindowTarget.cpp') 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("general:gaps_in"); - auto* const PGAPSIN = sc((PGAPSINDATA.ptr())->getData()); + static auto PGAPSINDATA = CConfigValue("general:gaps_in"); + auto* const PGAPSIN = sc((PGAPSINDATA.ptr())); auto gapsIn = (WORKSPACERULE && WORKSPACERULE->m_gapsIn.has_value()) ? WORKSPACERULE->m_gapsIn.value() : *PGAPSIN; - const static auto REQUESTEDRATIO = CConfigValue("layout:single_window_aspect_ratio"); - const static auto REQUESTEDRATIOTOLERANCE = CConfigValue("layout:single_window_aspect_ratio_tolerance"); + const static auto REQUESTEDRATIO = CConfigValue("layout:single_window_aspect_ratio"); + const static auto REQUESTEDRATIOTOLERANCE = CConfigValue("layout:single_window_aspect_ratio_tolerance"); Vector2D ratioPadding; @@ -175,7 +175,7 @@ void CWindowTarget::updatePos() { Vector2D availableSpace = calcSize; - static auto PCLAMP_TILED = CConfigValue("misc:size_limits_tiled"); + static auto PCLAMP_TILED = CConfigValue("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("dwindle:special_scale_factor"); + static auto PSCALEFACTOR = CConfigValue("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 CWindowTarget::desiredGeomet return std::unexpected(GEOMETRY_NO_DESIRED); } - static auto PXWLFORCESCALEZERO = CConfigValue("xwayland:force_zero_scaling"); + static auto PXWLFORCESCALEZERO = CConfigValue("xwayland:force_zero_scaling"); const auto toLogical = [&](SGeometryRequested& req) { if (m_window->m_isX11 && *PXWLFORCESCALEZERO && PMONITOR) req.size /= PMONITOR->m_scale; -- cgit v1.2.3