From b0fca6eaf00a2c5061f499c76ec8d60772b6a719 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Thu, 5 Sep 2024 17:03:12 -0700 Subject: input: kb focus mouse focused window if unset (#7666) Normally it shouldn't be possible to have mouse focus with no kb focus, but it does happen, and when it does this makes it considerably less annoying. --- 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 66ca4eb2..f1035c82 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -505,6 +505,9 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { } } + if (g_pSeatManager->state.keyboardFocus == nullptr) + g_pCompositor->focusWindow(pFoundWindow, foundSurface); + m_bLastFocusOnLS = false; } else { if (*PRESIZEONBORDER && *PRESIZECURSORICON && m_eBorderIconDirection != BORDERICON_NONE) { -- cgit v1.2.3