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/desktop/view/LayerSurface.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/desktop/view/LayerSurface.cpp')
| -rw-r--r-- | src/desktop/view/LayerSurface.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/desktop/view/LayerSurface.cpp b/src/desktop/view/LayerSurface.cpp index 85e511e2..a10c9d4d 100644 --- a/src/desktop/view/LayerSurface.cpp +++ b/src/desktop/view/LayerSurface.cpp @@ -10,8 +10,8 @@ #include "../../config/ConfigManager.hpp" #include "../../helpers/Monitor.hpp" #include "../../managers/input/InputManager.hpp" -#include "../../managers/HookSystemManager.hpp" #include "../../managers/EventManager.hpp" +#include "../../event/EventBus.hpp" using namespace Desktop; using namespace Desktop::View; @@ -222,7 +222,7 @@ void CLayerSurface::onMap() { m_fadingOut = false; g_pEventManager->postEvent(SHyprIPCEvent{.event = "openlayer", .data = m_namespace}); - EMIT_HOOK_EVENT("openLayer", m_self.lock()); + Event::bus()->m_events.layer.opened.emit(m_self.lock()); g_pCompositor->setPreferredScaleForSurface(m_wlSurface->resource(), PMONITOR->m_scale); g_pCompositor->setPreferredTransformForSurface(m_wlSurface->resource(), PMONITOR->m_transform); @@ -232,7 +232,7 @@ void CLayerSurface::onUnmap() { Log::logger->log(Log::DEBUG, "LayerSurface {:x} unmapped", rc<uintptr_t>(m_layerSurface.get())); g_pEventManager->postEvent(SHyprIPCEvent{.event = "closelayer", .data = m_layerSurface->m_layerNamespace}); - EMIT_HOOK_EVENT("closeLayer", m_self.lock()); + Event::bus()->m_events.layer.closed.emit(m_self.lock()); std::erase_if(g_pInputManager->m_exclusiveLSes, [this](const auto& other) { return !other || other == m_self; }); |
