summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.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/config/ConfigManager.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/config/ConfigManager.cpp')
-rw-r--r--src/config/ConfigManager.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 54b73a3d..cd5b0ec8 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -42,7 +42,8 @@
#include "../managers/input/trackpad/gestures/FullscreenGesture.hpp"
#include "../managers/input/trackpad/gestures/CursorZoomGesture.hpp"
-#include "../managers/HookSystemManager.hpp"
+#include "../event/EventBus.hpp"
+
#include "../protocols/types/ContentType.hpp"
#include <cstddef>
#include <cstdint>
@@ -1066,7 +1067,7 @@ static void clearHlVersionVars() {
}
void CConfigManager::reload() {
- EMIT_HOOK_EVENT("preConfigReload", nullptr);
+ Event::bus()->m_events.config.preReload.emit();
setDefaultAnimationVars();
resetHLConfig();
m_configCurrentPath = getMainConfigPath();
@@ -1458,7 +1459,7 @@ void CConfigManager::postConfigReload(const Hyprlang::CParseResult& result) {
// update layouts
Layout::Supplementary::algoMatcher()->updateWorkspaceLayouts();
- EMIT_HOOK_EVENT("configReloaded", nullptr);
+ Event::bus()->m_events.config.reloaded.emit();
if (g_pEventManager)
g_pEventManager->postEvent(SHyprIPCEvent{"configreloaded", ""});
}
@@ -1747,7 +1748,7 @@ void CConfigManager::performMonitorReload() {
m_wantsMonitorReload = false;
- EMIT_HOOK_EVENT("monitorLayoutChanged", nullptr);
+ Event::bus()->m_events.monitor.layoutChanged.emit();
}
void* const* CConfigManager::getConfigValuePtr(const std::string& val) {