Skip to content

Commit b8cff8a

Browse files
input: focus when first keyboard is added and m_lastFocus is set (#11645)
1 parent 150d693 commit b8cff8a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/managers/input/InputManager.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,10 @@ void CInputManager::setupKeyboard(SP<IKeyboard> keeb) {
10311031
g_pSeatManager->setKeyboard(keeb);
10321032

10331033
keeb->updateLEDs();
1034+
1035+
// in case m_lastFocus was set without a keyboard
1036+
if (m_keyboards.size() == 1 && g_pCompositor->m_lastFocus)
1037+
g_pSeatManager->setKeyboardFocus(g_pCompositor->m_lastFocus.lock());
10341038
}
10351039

10361040
void CInputManager::setKeyboardLayout() {

0 commit comments

Comments
 (0)