summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
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 1150ac2e..cfad932a 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -116,6 +116,11 @@ CKeybindManager::CKeybindManager() {
});
}
+CKeybindManager::~CKeybindManager() {
+ if (m_pXKBTranslationState)
+ xkb_state_unref(m_pXKBTranslationState);
+}
+
void CKeybindManager::addKeybind(SKeybind kb) {
m_lKeybinds.push_back(kb);
@@ -219,6 +224,7 @@ void CKeybindManager::updateXKBTranslationState() {
xkb_context_unref(PCONTEXT);
m_pXKBTranslationState = xkb_state_new(PKEYMAP);
+ xkb_keymap_unref(PKEYMAP);
}
bool CKeybindManager::ensureMouseBindState() {