aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/managers/input/Touch.cpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-10-27 18:23:01 +0000
committerVaxry <[email protected]>2024-10-27 18:23:01 +0000
commit24d218964bb099b8aa7c4b913a63389d0b3be203 (patch)
treefccb9c0e2371fe3851ace3fd6b15a5b9deda84d2 /src/managers/input/Touch.cpp
parentf9b52203f58bcb716144d89ee9f85fe12ebfe94d (diff)
downloadHyprland-move-to-monitor-p.tar.gz
Hyprland-move-to-monitor-p.zip
move to monitor pointersmove-to-monitor-p
Diffstat (limited to 'src/managers/input/Touch.cpp')
-rw-r--r--src/managers/input/Touch.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/managers/input/Touch.cpp b/src/managers/input/Touch.cpp
index 454391af..4e3980aa 100644
--- a/src/managers/input/Touch.cpp
+++ b/src/managers/input/Touch.cpp
@@ -123,7 +123,7 @@ void CInputManager::onTouchMove(ITouch::SMotionEvent e) {
return;
}
if (validMapped(m_sTouchData.touchFocusWindow)) {
- const auto PMONITOR = g_pCompositor->getMonitorFromID(m_sTouchData.touchFocusWindow->m_iMonitorID);
+ const auto PMONITOR = m_sTouchData.touchFocusWindow->m_pMonitor.lock();
g_pCompositor->warpCursorTo({PMONITOR->vecPosition.x + e.pos.x * PMONITOR->vecSize.x, PMONITOR->vecPosition.y + e.pos.y * PMONITOR->vecSize.y}, true);
@@ -133,7 +133,7 @@ void CInputManager::onTouchMove(ITouch::SMotionEvent e) {
g_pSeatManager->sendTouchMotion(e.timeMs, e.touchID, local);
} else if (!m_sTouchData.touchFocusLS.expired()) {
- const auto PMONITOR = g_pCompositor->getMonitorFromID(m_sTouchData.touchFocusLS->monitorID);
+ const auto PMONITOR = m_sTouchData.touchFocusLS->monitor.lock();
g_pCompositor->warpCursorTo({PMONITOR->vecPosition.x + e.pos.x * PMONITOR->vecSize.x, PMONITOR->vecPosition.y + e.pos.y * PMONITOR->vecSize.y}, true);