diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index e8eec951..390bd3c4 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -16,6 +16,14 @@ CMonitor::CMonitor() { CMonitor::~CMonitor() { wlr_damage_ring_finish(&damage); pixman_region32_fini(&lastFrameDamage); + + hyprListener_monitorDestroy.removeCallback(); + hyprListener_monitorFrame.removeCallback(); + hyprListener_monitorStateRequest.removeCallback(); + hyprListener_monitorDamage.removeCallback(); + hyprListener_monitorNeedsFrame.removeCallback(); + hyprListener_monitorCommit.removeCallback(); + hyprListener_monitorBind.removeCallback(); } void CMonitor::onConnect(bool noRule) {