summaryrefslogtreecommitdiff
path: root/src/hyprerror/HyprError.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-02-22 23:30:10 +0000
committerGitHub <noreply@github.com>2026-02-22 23:30:10 +0000
commitb88813c7efa4b7b0c5fe01471c5fa5b67a61dc7e (patch)
tree4454e82bc033d7e28a23ee372d0e3f48341d0aaa /src/hyprerror/HyprError.cpp
parentb4ee4674f9a74e3d602c7fb17bc09f79d221583c (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/hyprerror/HyprError.cpp')
-rw-r--r--src/hyprerror/HyprError.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hyprerror/HyprError.cpp b/src/hyprerror/HyprError.cpp
index 1a6bab99..360bdfdc 100644
--- a/src/hyprerror/HyprError.cpp
+++ b/src/hyprerror/HyprError.cpp
@@ -6,8 +6,8 @@
#include "../render/pass/TexPassElement.hpp"
#include "../managers/animation/AnimationManager.hpp"
#include "../render/Renderer.hpp"
-#include "../managers/HookSystemManager.hpp"
#include "../desktop/state/FocusState.hpp"
+#include "../event/EventBus.hpp"
#include <hyprutils/utils/ScopeGuard.hpp>
using namespace Hyprutils::Animation;
@@ -15,7 +15,7 @@ using namespace Hyprutils::Animation;
CHyprError::CHyprError() {
g_pAnimationManager->createAnimation(0.f, m_fadeOpacity, g_pConfigManager->getAnimationPropertyConfig("fadeIn"), AVARDAMAGE_NONE);
- static auto P = g_pHookSystem->hookDynamic("focusedMon", [&](void* self, SCallbackInfo& info, std::any param) {
+ static auto P = Event::bus()->m_events.monitor.focused.listen([&](PHLMONITOR mon) {
if (!m_isCreated)
return;
@@ -23,7 +23,7 @@ CHyprError::CHyprError() {
m_monitorChanged = true;
});
- static auto P2 = g_pHookSystem->hookDynamic("preRender", [&](void* self, SCallbackInfo& info, std::any param) {
+ static auto P2 = Event::bus()->m_events.render.pre.listen([&](PHLMONITOR mon) {
if (!m_isCreated)
return;