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/input/InputMethodRelay.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/input/InputMethodRelay.cpp')
| -rw-r--r-- | src/managers/input/InputMethodRelay.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/managers/input/InputMethodRelay.cpp b/src/managers/input/InputMethodRelay.cpp index 6ee3c836..27fd80b6 100644 --- a/src/managers/input/InputMethodRelay.cpp +++ b/src/managers/input/InputMethodRelay.cpp @@ -1,14 +1,13 @@ #include "InputMethodRelay.hpp" #include "../../desktop/state/FocusState.hpp" +#include "../../event/EventBus.hpp" #include "../../protocols/TextInputV3.hpp" #include "../../protocols/TextInputV1.hpp" #include "../../protocols/InputMethodV2.hpp" #include "../../protocols/core/Compositor.hpp" -#include "../../managers/HookSystemManager.hpp" CInputMethodRelay::CInputMethodRelay() { - static auto P = - g_pHookSystem->hookDynamic("keyboardFocus", [&](void* self, SCallbackInfo& info, std::any param) { onKeyboardFocus(std::any_cast<SP<CWLSurfaceResource>>(param)); }); + static auto P = Event::bus()->m_events.input.keyboard.focus.listen([&](SP<CWLSurfaceResource> surf) { onKeyboardFocus(surf); }); m_listeners.newTIV3 = PROTO::textInputV3->m_events.newTextInput.listen([this](const auto& input) { onNewTextInput(input); }); m_listeners.newTIV1 = PROTO::textInputV1->m_events.newTextInput.listen([this](const auto& input) { onNewTextInput(input); }); |
