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/supplementary/DragController.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/layout/supplementary/DragController.cpp') diff --git a/src/layout/supplementary/DragController.cpp b/src/layout/supplementary/DragController.cpp index 79036186..305e27ec 100644 --- a/src/layout/supplementary/DragController.cpp +++ b/src/layout/supplementary/DragController.cpp @@ -87,7 +87,7 @@ void CDragStateController::dragBegin(SP target, eMouseBindMode mode) { m_dragMode = mode; const auto DRAGGINGTARGET = m_target.lock(); - static auto PDRAGTHRESHOLD = CConfigValue("binds:drag_threshold"); + static auto PDRAGTHRESHOLD = CConfigValue("binds:drag_threshold"); m_mouseMoveEventCount = 1; m_beginDragSizeXY = Vector2D(); @@ -112,7 +112,7 @@ void CDragStateController::dragBegin(SP target, eMouseBindMode mode) { return; // get the grab corner - static auto RESIZECORNER = CConfigValue("general:resize_corner"); + static auto RESIZECORNER = CConfigValue("general:resize_corner"); if (*RESIZECORNER != 0 && *RESIZECORNER <= 4 && DRAGGINGTARGET->floating()) { switch (*RESIZECORNER) { case 1: @@ -193,7 +193,7 @@ void CDragStateController::dragEnd() { return; const bool FLOATEDINTOTILED = !pWindow->m_isFloating && !m_draggingTiled; - static auto PDRAGINTOGROUP = CConfigValue("group:drag_into_group"); + static auto PDRAGINTOGROUP = CConfigValue("group:drag_into_group"); if (pWindow->m_group && DRAGGING_WINDOW->canBeGroupedInto(pWindow->m_group) && *PDRAGINTOGROUP == 1 && !FLOATEDINTOTILED) { pWindow->m_group->add(DRAGGING_WINDOW); @@ -226,7 +226,7 @@ void CDragStateController::mouseMove(const Vector2D& mousePos) { return; const auto DRAGGINGTARGET = m_target.lock(); - static auto PDRAGTHRESHOLD = CConfigValue("binds:drag_threshold"); + static auto PDRAGTHRESHOLD = CConfigValue("binds:drag_threshold"); // Window invalid or drag begin size 0,0 meaning we rejected it. if ((!validMapped(DRAGGINGTARGET->window()) || m_beginDragSizeXY == Vector2D())) { @@ -248,7 +248,7 @@ void CDragStateController::mouseMove(const Vector2D& mousePos) { const auto DELTA = Vector2D(mousePos.x - m_beginDragXY.x, mousePos.y - m_beginDragXY.y); const auto TICKDELTA = Vector2D(mousePos.x - m_lastDragXY.x, mousePos.y - m_lastDragXY.y); - static auto SNAPENABLED = CConfigValue("general:snap:enabled"); + static auto SNAPENABLED = CConfigValue("general:snap:enabled"); const auto TIMERDELTA = std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - TIMER).count(); const auto MSDELTA = std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - MSTIMER).count(); -- cgit v1.2.3