mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-13 08:45:59 +01:00
fix crasherino
This commit is contained in:
parent
ef65500874
commit
d7855b0349
3 changed files with 4 additions and 1 deletions
|
@ -592,6 +592,7 @@ void CCompositor::startCompositor(std::string socketName, int socketFd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
setenv("WAYLAND_DISPLAY", m_szWLDisplaySocket.c_str(), 1);
|
setenv("WAYLAND_DISPLAY", m_szWLDisplaySocket.c_str(), 1);
|
||||||
|
setenv("XDG_SESSION_TYPE", "wayland", 1);
|
||||||
|
|
||||||
signal(SIGPIPE, SIG_IGN);
|
signal(SIGPIPE, SIG_IGN);
|
||||||
|
|
||||||
|
|
|
@ -155,6 +155,8 @@ void IKeyboard::updateXKBTranslationState(xkb_keymap* const keymap) {
|
||||||
if (xkbState)
|
if (xkbState)
|
||||||
xkb_state_unref(xkbState);
|
xkb_state_unref(xkbState);
|
||||||
|
|
||||||
|
xkbState = nullptr;
|
||||||
|
|
||||||
if (keymap) {
|
if (keymap) {
|
||||||
Debug::log(LOG, "Updating keyboard {:x}'s translation state from a provided keymap", (uintptr_t)this);
|
Debug::log(LOG, "Updating keyboard {:x}'s translation state from a provided keymap", (uintptr_t)this);
|
||||||
xkbState = xkb_state_new(keymap);
|
xkbState = xkb_state_new(keymap);
|
||||||
|
|
|
@ -1327,7 +1327,7 @@ void CInputManager::onKeyboardMod(SP<IKeyboard> pKeyboard) {
|
||||||
|
|
||||||
const auto LAYOUT = pKeyboard->getActiveLayout();
|
const auto LAYOUT = pKeyboard->getActiveLayout();
|
||||||
|
|
||||||
pKeyboard->updateXKBTranslationState();
|
pKeyboard->updateXKBTranslationState(pKeyboard->xkbKeymap);
|
||||||
|
|
||||||
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}));
|
EMIT_HOOK_EVENT("activeLayout", (std::vector<std::any>{pKeyboard, LAYOUT}));
|
||||||
|
|
Loading…
Reference in a new issue