diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-02-21 21:30:39 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-21 21:30:39 +0000 |
| commit | 723870337f299d4c80aa0048144f3a1ca1c885bd (patch) | |
| tree | ca3279ae5dbc841f676c64d2f58f895de13cd3bf /src/managers/input/trackpad/gestures/FloatGesture.cpp | |
| parent | 51f8849e541f0a8150ac3a43fa928c1e299daf18 (diff) | |
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.
Diffstat (limited to 'src/managers/input/trackpad/gestures/FloatGesture.cpp')
| -rw-r--r-- | src/managers/input/trackpad/gestures/FloatGesture.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
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; } |
