summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 5e844bec..6e975043 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -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() {