summaryrefslogtreecommitdiff
path: root/src/managers/input/Touch.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2025-08-20 12:22:05 +0200
committervaxerski <vaxry@vaxry.net>2025-08-20 12:22:18 +0200
commit9a202069454d2fab4691bad6620547b271aad93c (patch)
treefac113763c048b1c8a9148030e09fcdeb096f146 /src/managers/input/Touch.cpp
parent10cec2b7e2cd2781121c6ac6b7883cc6f1376d45 (diff)
touch: fix popup coordinates for touch down
fixes #10626
Diffstat (limited to 'src/managers/input/Touch.cpp')
-rw-r--r--src/managers/input/Touch.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/managers/input/Touch.cpp b/src/managers/input/Touch.cpp
index 9e19c4e8..b087e1a4 100644
--- a/src/managers/input/Touch.cpp
+++ b/src/managers/input/Touch.cpp
@@ -89,7 +89,14 @@ void CInputManager::onTouchDown(ITouch::SDownEvent e) {
m_touchData.touchSurfaceOrigin = g_pInputManager->getMouseCoordsInternal() - local;
}
} else if (!m_touchData.touchFocusLS.expired()) {
- local = g_pInputManager->getMouseCoordsInternal() - m_touchData.touchFocusLS->m_geometry.pos();
+ PHLLS foundSurf;
+ Vector2D foundCoords;
+ auto surf = g_pCompositor->vectorToLayerPopupSurface(g_pInputManager->getMouseCoordsInternal(), PMONITOR, &foundCoords, &foundSurf);
+ if (surf) {
+ local = foundCoords;
+ m_touchData.touchFocusSurface = surf;
+ } else
+ local = g_pInputManager->getMouseCoordsInternal() - m_touchData.touchFocusLS->m_geometry.pos();
m_touchData.touchSurfaceOrigin = g_pInputManager->getMouseCoordsInternal() - local;
} else