diff --git a/src/backend/Headless.cpp b/src/backend/Headless.cpp index 2c358d4..df4b312 100644 --- a/src/backend/Headless.cpp +++ b/src/backend/Headless.cpp @@ -73,6 +73,7 @@ void Aquamarine::CHeadlessOutput::scheduleFrame(const scheduleFrameReason reason } bool Aquamarine::CHeadlessOutput::destroy() { + events.destroy.emit(); std::erase(backend->outputs, self.lock()); return true; } diff --git a/src/backend/Wayland.cpp b/src/backend/Wayland.cpp index bc2f8d5..bd8fb5b 100644 --- a/src/backend/Wayland.cpp +++ b/src/backend/Wayland.cpp @@ -496,6 +496,7 @@ Aquamarine::CWaylandOutput::CWaylandOutput(const std::string& name_, Hyprutils:: Aquamarine::CWaylandOutput::~CWaylandOutput() { backend->idleCallbacks.clear(); // FIXME: mega hack to avoid a UAF in frame events + events.destroy.emit(); if (waylandState.xdgToplevel) waylandState.xdgToplevel->sendDestroy(); if (waylandState.xdgSurface)