From b88813c7efa4b7b0c5fe01471c5fa5b67a61dc7e Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sun, 22 Feb 2026 23:30:10 +0000 Subject: event: refactor HookSystem into a typed event bus (#13333) Refactors the old HookSystem into a typed event bus with clear separation, discovery and types. --- src/protocols/Fifo.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/protocols/Fifo.cpp') diff --git a/src/protocols/Fifo.cpp b/src/protocols/Fifo.cpp index 8f842593..355644d9 100644 --- a/src/protocols/Fifo.cpp +++ b/src/protocols/Fifo.cpp @@ -1,8 +1,8 @@ #include "Fifo.hpp" #include "Compositor.hpp" #include "core/Compositor.hpp" -#include "../managers/HookSystemManager.hpp" #include "../helpers/Monitor.hpp" +#include "../event/EventBus.hpp" CFifoResource::CFifoResource(UP&& resource_, SP surface) : m_resource(std::move(resource_)), m_surface(surface) { if UNLIKELY (!m_resource->resource()) @@ -153,9 +153,7 @@ bool CFifoManagerResource::good() { } CFifoProtocol::CFifoProtocol(const wl_interface* iface, const int& ver, const std::string& name) : IWaylandProtocol(iface, ver, name) { - static auto P = g_pHookSystem->hookDynamic("monitorAdded", [this](void* self, SCallbackInfo& info, std::any param) { - auto M = std::any_cast(param); - + static auto P = Event::bus()->m_events.monitor.added.listen([this](PHLMONITOR M) { M->m_events.presented.listenStatic([this, m = PHLMONITORREF{M}]() { if (!m || !PROTO::fifo) return; -- cgit v1.2.3