summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-31 17:07:39 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-31 17:07:39 +0200
commitdba4596c7eac61d84edc883b1e0e7c6ba6af7efc (patch)
treed436a9e9f6709330f594998a3ae214211a40686f /src/managers/input/InputManager.cpp
parente95aa8ef267cfa9df4bba2d477e6bda89bfda8f5 (diff)
focus to first window on not found in refocus
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp3
1 files changed, 3 insertions, 0 deletions
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);