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/managers/animation/AnimationManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/managers/animation/AnimationManager.cpp') diff --git a/src/managers/animation/AnimationManager.cpp b/src/managers/animation/AnimationManager.cpp index 5a11fd11..c4b921cb 100644 --- a/src/managers/animation/AnimationManager.cpp +++ b/src/managers/animation/AnimationManager.cpp @@ -1,6 +1,5 @@ #include "AnimationManager.hpp" #include "../../Compositor.hpp" -#include "../HookSystemManager.hpp" #include "../../config/ConfigManager.hpp" #include "../../desktop/DesktopTypes.hpp" #include "../../helpers/AnimatedVariable.hpp" @@ -11,6 +10,7 @@ #include "../eventLoop/EventLoopManager.hpp" #include "../../helpers/varlist/VarList.hpp" #include "../../render/Renderer.hpp" +#include "../../event/EventBus.hpp" #include #include @@ -252,7 +252,7 @@ void CHyprAnimationManager::frameTick() { if (!shouldTickForNext()) return; - if UNLIKELY (!g_pCompositor->m_sessionActive || !g_pHookSystem || g_pCompositor->m_unsafeState || + if UNLIKELY (!g_pCompositor->m_sessionActive || g_pCompositor->m_unsafeState || !std::ranges::any_of(g_pCompositor->m_monitors, [](const auto& mon) { return mon->m_enabled && mon->m_output; })) return; @@ -261,7 +261,7 @@ void CHyprAnimationManager::frameTick() { m_lastTickValid = true; tick(); - EMIT_HOOK_EVENT("tick", nullptr); + Event::bus()->m_events.tick.emit(); } if (shouldTickForNext()) -- cgit v1.2.3