From 0ba28a46fd4b37fff861e3f0bc02c9fd359c4075 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:36:27 +0200 Subject: [PATCH] monitor: unplug all callbacks in ~dtor --- src/helpers/Monitor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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) {