summaryrefslogtreecommitdiff
path: root/src/managers/input/trackpad/gestures/MoveGesture.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-02-21 21:30:39 +0000
committerGitHub <noreply@github.com>2026-02-21 21:30:39 +0000
commit723870337f299d4c80aa0048144f3a1ca1c885bd (patch)
treeca3279ae5dbc841f676c64d2f58f895de13cd3bf /src/managers/input/trackpad/gestures/MoveGesture.cpp
parent51f8849e541f0a8150ac3a43fa928c1e299daf18 (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/MoveGesture.cpp')
-rw-r--r--src/managers/input/trackpad/gestures/MoveGesture.cpp8
1 files changed, 4 insertions, 4 deletions
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();