summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-08-29 11:17:42 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-08-29 11:17:42 +0200
commit6c8ce734fb8e487add1c28efc2f86ff075f8d679 (patch)
treebb5c668022617b9086cf8eedacaa9c8ed95788d8 /src/managers/KeybindManager.cpp
parent09495375b52de47ddd97a46be1159721d207c862 (diff)
fix segfault in inactive sessions
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index cde9ee22..43993570 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -127,6 +127,12 @@ void CKeybindManager::updateXKBTranslationState() {
}
bool CKeybindManager::onKeyEvent(wlr_keyboard_key_event* e, SKeyboard* pKeyboard) {
+ if (!g_pCompositor->m_bSessionActive) {
+ m_dPressedKeycodes.clear();
+ m_dPressedKeysyms.clear();
+ return true;
+ }
+
if (pKeyboard->isVirtual)
return true;