From 723870337f299d4c80aa0048144f3a1ca1c885bd Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 21 Feb 2026 21:30:39 +0000 Subject: layout: rethonk layouts from the ground up (#12890) Rewrites layouts to be much smaller, and deal with much less annoying BS. Improves the overall architecture, unifies handling of pseudotiling, and various other improvements. --- src/managers/input/trackpad/gestures/MoveGesture.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/managers/input/trackpad/gestures/MoveGesture.cpp') diff --git a/src/managers/input/trackpad/gestures/MoveGesture.cpp b/src/managers/input/trackpad/gestures/MoveGesture.cpp index 034d88fb..0dcc310f 100644 --- a/src/managers/input/trackpad/gestures/MoveGesture.cpp +++ b/src/managers/input/trackpad/gestures/MoveGesture.cpp @@ -2,8 +2,8 @@ #include "../../../../desktop/state/FocusState.hpp" #include "../../../../desktop/view/Window.hpp" -#include "../../../../managers/LayoutManager.hpp" #include "../../../../render/Renderer.hpp" +#include "../../../../layout/LayoutManager.hpp" void CMoveTrackpadGesture::begin(const ITrackpadGesture::STrackpadGestureBegin& e) { ITrackpadGesture::begin(e); @@ -19,7 +19,7 @@ void CMoveTrackpadGesture::update(const ITrackpadGesture::STrackpadGestureUpdate const auto DELTA = e.swipe ? e.swipe->delta : e.pinch->delta; if (m_window->m_isFloating) { - g_pLayoutManager->getCurrentLayout()->moveActiveWindow(DELTA, m_window.lock()); + g_layoutManager->moveTarget(DELTA, m_window->layoutTarget()); m_window->m_realSize->warp(); m_window->m_realPosition->warp(); return; @@ -52,10 +52,10 @@ void CMoveTrackpadGesture::end(const ITrackpadGesture::STrackpadGestureEnd& e) { if (std::abs(m_lastDelta.x) > std::abs(m_lastDelta.y)) { // horizontal - g_pLayoutManager->getCurrentLayout()->moveWindowTo(m_window.lock(), m_lastDelta.x > 0 ? "r" : "l"); + g_layoutManager->moveInDirection(m_window->layoutTarget(), m_lastDelta.x > 0 ? "r" : "l"); } else { // vertical - g_pLayoutManager->getCurrentLayout()->moveWindowTo(m_window.lock(), m_lastDelta.y > 0 ? "b" : "t"); + g_layoutManager->moveInDirection(m_window->layoutTarget(), m_lastDelta.y > 0 ? "b" : "t"); } const auto GOAL = m_window->m_realPosition->goal(); -- cgit v1.2.3