diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-02-22 23:30:10 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-22 23:30:10 +0000 |
| commit | b88813c7efa4b7b0c5fe01471c5fa5b67a61dc7e (patch) | |
| tree | 4454e82bc033d7e28a23ee372d0e3f48341d0aaa /src/managers/animation/AnimationManager.cpp | |
| parent | b4ee4674f9a74e3d602c7fb17bc09f79d221583c (diff) | |
event: refactor HookSystem into a typed event bus (#13333)
Refactors the old HookSystem into a typed event bus with clear
separation,
discovery and types.
Diffstat (limited to 'src/managers/animation/AnimationManager.cpp')
| -rw-r--r-- | src/managers/animation/AnimationManager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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 <hyprgraphics/color/Color.hpp> #include <hyprutils/animation/AnimatedVariable.hpp> @@ -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()) |
