fix: change layout event separator

The layout event separator is changed from "," to ";" to improve parsing
ability, since some keyboard can also have "," in its name.
This commit is contained in:
Pasha Fistanto 2024-08-10 18:52:07 +02:00
parent 0e86808e59
commit 37acee39b4

View file

@ -909,7 +909,7 @@ void CInputManager::setupKeyboard(SP<IKeyboard> keeb) {
g_pKeybindManager->m_mKeyToCodeCache.clear();
}
g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", PKEEB->hlName + "," + LAYOUT});
g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", PKEEB->hlName + ";" + LAYOUT});
EMIT_HOOK_EVENT("activeLayout", (std::vector<std::any>{PKEEB, LAYOUT}));
},
keeb.get());
@ -974,7 +974,7 @@ void CInputManager::applyConfigToKeyboard(SP<IKeyboard> pKeyboard) {
const auto LAYOUTSTR = pKeyboard->getActiveLayout();
g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", pKeyboard->hlName + "," + LAYOUTSTR});
g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", pKeyboard->hlName + ";" + LAYOUTSTR});
EMIT_HOOK_EVENT("activeLayout", (std::vector<std::any>{pKeyboard, LAYOUTSTR}));
Debug::log(LOG, "Set the keyboard layout to {} and variant to {} for keyboard \"{}\"", pKeyboard->currentRules.layout, pKeyboard->currentRules.variant, pKeyboard->hlName);
@ -1341,7 +1341,7 @@ void CInputManager::onKeyboardMod(SP<IKeyboard> pKeyboard) {
Debug::log(LOG, "LAYOUT CHANGED TO {} GROUP {}", LAYOUT, MODS.group);
g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", pKeyboard->hlName + "," + LAYOUT});
g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", pKeyboard->hlName + ";" + LAYOUT});
EMIT_HOOK_EVENT("activeLayout", (std::vector<std::any>{pKeyboard, LAYOUT}));
}
}