touch: fix popup coordinates for touch down

fixes #10626
This commit is contained in:
vaxerski
2025-08-20 12:22:05 +02:00
parent 10cec2b7e2
commit 9a20206945

View File

@@ -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