focus to first window on not found in refocus

This commit is contained in:
vaxerski 2022-07-31 17:07:39 +02:00
parent e95aa8ef26
commit dba4596c7e

View file

@ -183,6 +183,9 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
} else } else
pFoundWindow = g_pCompositor->vectorToWindowIdeal(mouseCoords); pFoundWindow = g_pCompositor->vectorToWindowIdeal(mouseCoords);
if (!pFoundWindow && refocus)
pFoundWindow = g_pCompositor->getFirstWindowOnWorkspace(PWORKSPACE->m_iID);
if (pFoundWindow) { if (pFoundWindow) {
if (!pFoundWindow->m_bIsX11) { if (!pFoundWindow->m_bIsX11) {
foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords); foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords);