summaryrefslogtreecommitdiff
path: root/src/managers/input/Touch.cpp
diff options
context:
space:
mode:
authordavc0n <dconti.dev@gmail.com>2025-04-28 22:25:22 +0200
committerGitHub <noreply@github.com>2025-04-28 22:25:22 +0200
commit21184404885cf61f7c10d2eb749478ef6b035dd2 (patch)
tree38f1103d3e5f0188d149b7dd5d961ba64c2ed044 /src/managers/input/Touch.cpp
parentc505eb55ff967f2a0474e88a50803412ba550a61 (diff)
windows: refactor class member vars (#10168)
Diffstat (limited to 'src/managers/input/Touch.cpp')
-rw-r--r--src/managers/input/Touch.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/managers/input/Touch.cpp b/src/managers/input/Touch.cpp
index a5d53029..71fd27d8 100644
--- a/src/managers/input/Touch.cpp
+++ b/src/managers/input/Touch.cpp
@@ -80,9 +80,9 @@ void CInputManager::onTouchDown(ITouch::SDownEvent e) {
local = g_pInputManager->getMouseCoordsInternal() - PMONITOR->vecPosition;
m_sTouchData.touchSurfaceOrigin = g_pInputManager->getMouseCoordsInternal() - local;
} else if (!m_sTouchData.touchFocusWindow.expired()) {
- if (m_sTouchData.touchFocusWindow->m_bIsX11) {
- local = (g_pInputManager->getMouseCoordsInternal() - m_sTouchData.touchFocusWindow->m_vRealPosition->goal()) * m_sTouchData.touchFocusWindow->m_fX11SurfaceScaledBy;
- m_sTouchData.touchSurfaceOrigin = m_sTouchData.touchFocusWindow->m_vRealPosition->goal();
+ if (m_sTouchData.touchFocusWindow->m_isX11) {
+ local = (g_pInputManager->getMouseCoordsInternal() - m_sTouchData.touchFocusWindow->m_realPosition->goal()) * m_sTouchData.touchFocusWindow->m_X11SurfaceScaledBy;
+ m_sTouchData.touchSurfaceOrigin = m_sTouchData.touchFocusWindow->m_realPosition->goal();
} else {
g_pCompositor->vectorWindowToSurface(g_pInputManager->getMouseCoordsInternal(), m_sTouchData.touchFocusWindow.lock(), local);
m_sTouchData.touchSurfaceOrigin = g_pInputManager->getMouseCoordsInternal() - local;
@@ -148,13 +148,13 @@ void CInputManager::onTouchMove(ITouch::SMotionEvent e) {
auto local = g_pInputManager->getMouseCoordsInternal() - PMONITOR->vecPosition;
g_pSeatManager->sendTouchMotion(e.timeMs, e.touchID, local);
} else if (validMapped(m_sTouchData.touchFocusWindow)) {
- const auto PMONITOR = m_sTouchData.touchFocusWindow->m_pMonitor.lock();
+ const auto PMONITOR = m_sTouchData.touchFocusWindow->m_monitor.lock();
g_pCompositor->warpCursorTo({PMONITOR->vecPosition.x + e.pos.x * PMONITOR->vecSize.x, PMONITOR->vecPosition.y + e.pos.y * PMONITOR->vecSize.y}, true);
auto local = g_pInputManager->getMouseCoordsInternal() - m_sTouchData.touchSurfaceOrigin;
- if (m_sTouchData.touchFocusWindow->m_bIsX11)
- local = local * m_sTouchData.touchFocusWindow->m_fX11SurfaceScaledBy;
+ if (m_sTouchData.touchFocusWindow->m_isX11)
+ local = local * m_sTouchData.touchFocusWindow->m_X11SurfaceScaledBy;
g_pSeatManager->sendTouchMotion(e.timeMs, e.touchID, local);
} else if (!m_sTouchData.touchFocusLS.expired()) {