input: Fix incorrect localcoords with a surface above an XWayland window (#10773)

This commit is contained in:
7mile
2025-06-19 04:48:51 +08:00
committed by GitHub
parent 0fb63c68e9
commit 9fb6b5d96b

View File

@@ -322,7 +322,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse) {
const auto PWINDOW = HLSurface->getWindow();
surfacePos = BOX->pos();
pFoundLayerSurface = HLSurface->getLayer();
pFoundWindow = !PWINDOW || PWINDOW->isHidden() ? g_pCompositor->m_lastWindow.lock() : PWINDOW;
if (!pFoundLayerSurface)
pFoundWindow = !PWINDOW || PWINDOW->isHidden() ? g_pCompositor->m_lastWindow.lock() : PWINDOW;
} else // reset foundSurface, find one normally
foundSurface = nullptr;
} else // reset foundSurface, find one normally