input: focus when first keyboard is added and m_lastFocus is set (#11645)

This commit is contained in:
Maximilian Seidler 2025-09-10 10:22:45 +00:00 committed by GitHub
parent 150d693fe7
commit b8cff8a434
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1031,6 +1031,10 @@ void CInputManager::setupKeyboard(SP<IKeyboard> keeb) {
g_pSeatManager->setKeyboard(keeb);
keeb->updateLEDs();
// in case m_lastFocus was set without a keyboard
if (m_keyboards.size() == 1 && g_pCompositor->m_lastFocus)
g_pSeatManager->setKeyboardFocus(g_pCompositor->m_lastFocus.lock());
}
void CInputManager::setKeyboardLayout() {