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.
This commit is contained in:
outfoxxed 2024-09-05 17:03:12 -07:00 committed by GitHub
parent 4988e00b1d
commit b0fca6eaf0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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) {