mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 22:25:59 +01:00
fix crasherino
This commit is contained in:
parent
16a2cb4ffc
commit
c66f63b63d
3 changed files with 4 additions and 1 deletions
|
@ -580,6 +580,7 @@ void CCompositor::startCompositor() {
|
|||
}
|
||||
|
||||
setenv("WAYLAND_DISPLAY", m_szWLDisplaySocket.c_str(), 1);
|
||||
setenv("XDG_SESSION_TYPE", "wayland", 1);
|
||||
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
||||
|
|
|
@ -155,6 +155,8 @@ void IKeyboard::updateXKBTranslationState(xkb_keymap* const keymap) {
|
|||
if (xkbState)
|
||||
xkb_state_unref(xkbState);
|
||||
|
||||
xkbState = nullptr;
|
||||
|
||||
if (keymap) {
|
||||
Debug::log(LOG, "Updating keyboard {:x}'s translation state from a provided keymap", (uintptr_t)this);
|
||||
xkbState = xkb_state_new(keymap);
|
||||
|
|
|
@ -1291,7 +1291,7 @@ void CInputManager::onKeyboardMod(SP<IKeyboard> pKeyboard) {
|
|||
|
||||
const auto LAYOUT = pKeyboard->getActiveLayout();
|
||||
|
||||
pKeyboard->updateXKBTranslationState();
|
||||
pKeyboard->updateXKBTranslationState(pKeyboard->xkbKeymap);
|
||||
|
||||
g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", pKeyboard->hlName + "," + LAYOUT});
|
||||
EMIT_HOOK_EVENT("activeLayout", (std::vector<std::any>{pKeyboard, LAYOUT}));
|
||||
|
|
Loading…
Reference in a new issue