summaryrefslogtreecommitdiff
path: root/src/managers/input/trackpad/gestures/MoveGesture.cpp
diff options
context:
space:
mode:
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();