summaryrefslogtreecommitdiff
path: root/src/debug
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/debug
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/debug')
-rw-r--r--src/debug/HyprNotificationOverlay.cpp4
-rw-r--r--src/debug/log/Logger.cpp5
2 files changed, 4 insertions, 5 deletions
diff --git a/src/debug/HyprNotificationOverlay.cpp b/src/debug/HyprNotificationOverlay.cpp
index 1c66a53b..6b3c3ea8 100644
--- a/src/debug/HyprNotificationOverlay.cpp
+++ b/src/debug/HyprNotificationOverlay.cpp
@@ -4,9 +4,9 @@
#include "../Compositor.hpp"
#include "../config/ConfigValue.hpp"
#include "../render/pass/TexPassElement.hpp"
+#include "../event/EventBus.hpp"
#include "../managers/animation/AnimationManager.hpp"
-#include "../managers/HookSystemManager.hpp"
#include "../render/Renderer.hpp"
static inline auto iconBackendFromLayout(PangoLayout* layout) {
@@ -22,7 +22,7 @@ static inline auto iconBackendFromLayout(PangoLayout* layout) {
}
CHyprNotificationOverlay::CHyprNotificationOverlay() {
- 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_notifications.empty())
return;
diff --git a/src/debug/log/Logger.cpp b/src/debug/log/Logger.cpp
index 44b82a50..1aca4d51 100644
--- a/src/debug/log/Logger.cpp
+++ b/src/debug/log/Logger.cpp
@@ -1,9 +1,8 @@
#include "Logger.hpp"
#include "RollingLogFollow.hpp"
-#include "../../defines.hpp"
+#include "../../event/EventBus.hpp"
-#include "../../managers/HookSystemManager.hpp"
#include "../../config/ConfigValue.hpp"
using namespace Log;
@@ -39,7 +38,7 @@ void CLogger::initIS(const std::string_view& IS) {
}
void CLogger::initCallbacks() {
- static auto P = g_pHookSystem->hookDynamic("configReloaded", [this](void* hk, SCallbackInfo& info, std::any param) { recheckCfg(); });
+ static auto P = Event::bus()->m_events.config.reloaded.listen([this]() { recheckCfg(); });
recheckCfg();
}