From dba4596c7eac61d84edc883b1e0e7c6ba6af7efc Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 31 Jul 2022 17:07:39 +0200 Subject: [PATCH] focus to first window on not found in refocus --- src/managers/input/InputManager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 29b16c3b..58eb5709 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -183,6 +183,9 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { } else pFoundWindow = g_pCompositor->vectorToWindowIdeal(mouseCoords); + if (!pFoundWindow && refocus) + pFoundWindow = g_pCompositor->getFirstWindowOnWorkspace(PWORKSPACE->m_iID); + if (pFoundWindow) { if (!pFoundWindow->m_bIsX11) { foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords);