summaryrefslogtreecommitdiff
path: root/src/managers
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers')
-rw-r--r--src/managers/CursorManager.cpp5
-rw-r--r--src/managers/CursorManager.hpp1
-rw-r--r--src/managers/KeybindManager.cpp6
-rw-r--r--src/managers/KeybindManager.hpp1
4 files changed, 13 insertions, 0 deletions
diff --git a/src/managers/CursorManager.cpp b/src/managers/CursorManager.cpp
index fa5ee8cd..3fcecfe4 100644
--- a/src/managers/CursorManager.cpp
+++ b/src/managers/CursorManager.cpp
@@ -53,6 +53,11 @@ CCursorManager::CCursorManager() {
static auto P = g_pHookSystem->hookDynamic("monitorLayoutChanged", [this](void* self, SCallbackInfo& info, std::any param) { this->updateTheme(); });
}
+CCursorManager::~CCursorManager() {
+ if (m_pWLRXCursorMgr)
+ wlr_xcursor_manager_destroy(m_pWLRXCursorMgr);
+}
+
void CCursorManager::dropBufferRef(CCursorManager::CCursorBuffer* ref) {
std::erase_if(m_vCursorBuffers, [ref](const auto& buf) { return buf.get() == ref; });
}
diff --git a/src/managers/CursorManager.hpp b/src/managers/CursorManager.hpp
index ff633592..629f29e1 100644
--- a/src/managers/CursorManager.hpp
+++ b/src/managers/CursorManager.hpp
@@ -13,6 +13,7 @@ struct wlr_xwayland;
class CCursorManager {
public:
CCursorManager();
+ ~CCursorManager();
wlr_buffer* getCursorBuffer();
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() {
diff --git a/src/managers/KeybindManager.hpp b/src/managers/KeybindManager.hpp
index deb25ae9..24e71c6a 100644
--- a/src/managers/KeybindManager.hpp
+++ b/src/managers/KeybindManager.hpp
@@ -58,6 +58,7 @@ struct SParsedKey {
class CKeybindManager {
public:
CKeybindManager();
+ ~CKeybindManager();
bool onKeyEvent(wlr_keyboard_key_event*, SKeyboard*);
bool onAxisEvent(wlr_pointer_axis_event*);