From 37acee39b474771b840be0b21b09b080da326f1b Mon Sep 17 00:00:00 2001 From: Pasha Fistanto Date: Sat, 10 Aug 2024 18:52:07 +0200 Subject: [PATCH] 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. --- src/managers/input/InputManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 8c38893f..cb6559ed 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -909,7 +909,7 @@ void CInputManager::setupKeyboard(SP 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{PKEEB, LAYOUT})); }, keeb.get()); @@ -974,7 +974,7 @@ void CInputManager::applyConfigToKeyboard(SP 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{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 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{pKeyboard, LAYOUT})); } }