input: Prevent crash with invalid keyboard layout (#4157)

This commit is contained in:
dranull 2023-12-15 00:39:03 +00:00 committed by GitHub
parent f7cde9c92c
commit 36fa33f7ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -933,7 +933,8 @@ void CInputManager::applyConfigToKeyboard(SKeyboard* pKeyboard) {
g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", pKeyboard->name + "," + LAYOUTSTR});
EMIT_HOOK_EVENT("activeLayout", (std::vector<void*>{pKeyboard, (void*)&LAYOUTSTR}));
Debug::log(LOG, "Set the keyboard layout to {} and variant to {} for keyboard \"{}\"", rules.layout, rules.variant, pKeyboard->keyboard->name);
Debug::log(LOG, "Set the keyboard layout to {} and variant to {} for keyboard \"{}\"", pKeyboard->currentRules.layout, pKeyboard->currentRules.variant,
pKeyboard->keyboard->name);
}
void CInputManager::newMouse(wlr_input_device* mouse, bool virt) {