fix refocus on no window

This commit is contained in:
Vaxry 2022-08-19 17:25:07 +02:00
parent 6cae44e2c0
commit f9e30e985c

View file

@ -182,9 +182,14 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
if (!(pFoundWindow && pFoundWindow->m_bIsFloating && pFoundWindow->m_bCreatedOverFullscreen))
pFoundWindow = g_pCompositor->getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID);
}
} else
} else {
pFoundWindow = g_pCompositor->vectorToWindowIdeal(mouseCoords);
if (refocus && !pFoundWindow) {
pFoundWindow = g_pCompositor->getFirstWindowOnWorkspace(PMONITOR->activeWorkspace);
}
}
if (pFoundWindow) {
if (!pFoundWindow->m_bIsX11) {
foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords);