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/FloatGesture.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/managers/input/trackpad/gestures/FloatGesture.cpp') diff --git a/src/managers/input/trackpad/gestures/FloatGesture.cpp b/src/managers/input/trackpad/gestures/FloatGesture.cpp index b2f451f1..0849bfac 100644 --- a/src/managers/input/trackpad/gestures/FloatGesture.cpp +++ b/src/managers/input/trackpad/gestures/FloatGesture.cpp @@ -1,9 +1,10 @@ #include "FloatGesture.hpp" -#include "../../../../managers/LayoutManager.hpp" #include "../../../../render/Renderer.hpp" #include "../../../../desktop/state/FocusState.hpp" #include "../../../../desktop/view/Window.hpp" +#include "../../../../layout/LayoutManager.hpp" +#include "../../../../layout/target/WindowTarget.hpp" constexpr const float MAX_DISTANCE = 250.F; @@ -40,8 +41,7 @@ void CFloatTrackpadGesture::begin(const ITrackpadGesture::STrackpadGestureBegin& return; } - m_window->m_isFloating = !m_window->m_isFloating; - g_pLayoutManager->getCurrentLayout()->changeWindowFloatingMode(m_window.lock()); + g_layoutManager->changeFloatingMode(m_window->layoutTarget()); m_posFrom = m_window->m_realPosition->begun(); m_sizeFrom = m_window->m_realSize->begun(); @@ -79,8 +79,7 @@ void CFloatTrackpadGesture::end(const ITrackpadGesture::STrackpadGestureEnd& e) if (COMPLETION < 0.2F) { // revert the animation g_pHyprRenderer->damageWindow(m_window.lock()); - m_window->m_isFloating = !m_window->m_isFloating; - g_pLayoutManager->getCurrentLayout()->changeWindowFloatingMode(m_window.lock()); + g_layoutManager->changeFloatingMode(m_window->layoutTarget()); return; } -- cgit v1.2.3