From b9ab839ab3cb692051fdeee914c38e555d4862b6 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 31 Aug 2024 12:41:54 +0200 Subject: [PATCH] output: always emit a destroy event in ~dtor --- include/aquamarine/output/Output.hpp | 4 +--- src/output/Output.cpp | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/aquamarine/output/Output.hpp b/include/aquamarine/output/Output.hpp index 3441c35..29e204b 100644 --- a/include/aquamarine/output/Output.hpp +++ b/include/aquamarine/output/Output.hpp @@ -98,9 +98,7 @@ namespace Aquamarine { class IOutput { public: - virtual ~IOutput() { - ; - } + virtual ~IOutput(); enum scheduleFrameReason : uint32_t { AQ_SCHEDULE_UNKNOWN = 0, diff --git a/src/output/Output.cpp b/src/output/Output.cpp index e9cf176..374764e 100644 --- a/src/output/Output.cpp +++ b/src/output/Output.cpp @@ -2,6 +2,10 @@ using namespace Aquamarine; +Aquamarine::IOutput::~IOutput() { + events.destroy.emit(); +} + Hyprutils::Memory::CSharedPointer Aquamarine::IOutput::preferredMode() { for (auto const& m : modes) { if (m->preferred)