summaryrefslogtreecommitdiff
path: root/src/helpers/MiscFunctions.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2024-01-19 16:20:22 +0100
committervaxerski <vaxry@vaxry.net>2024-01-19 16:20:30 +0100
commit5eeec8860e2dc8ff80dda26243778b5ecc923ca2 (patch)
treee8dd7245da969dfdf2ae1acd07ad9cca0816b7b4 /src/helpers/MiscFunctions.cpp
parent9f20a15955697b0f52740c1e0180acdafa071f79 (diff)
core: improve cleanup logic
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
-rw-r--r--src/helpers/MiscFunctions.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp
index 5eb99bfd..2905ce2b 100644
--- a/src/helpers/MiscFunctions.cpp
+++ b/src/helpers/MiscFunctions.cpp
@@ -159,6 +159,13 @@ void addWLSignal(wl_signal* pSignal, wl_listener* pListener, void* pOwner, const
Debug::log(LOG, "Registered signal for owner {:x}: {:x} -> {:x} (owner: {})", (uintptr_t)pOwner, (uintptr_t)pSignal, (uintptr_t)pListener, ownerString);
}
+void removeWLSignal(wl_listener* pListener) {
+ wl_list_remove(&pListener->link);
+ wl_list_init(&pListener->link);
+
+ Debug::log(LOG, "Removed listener {:x}", (uintptr_t)pListener);
+}
+
void handleNoop(struct wl_listener* listener, void* data) {
// Do nothing
}