From 1b56cc4e99c391a94fc05a24e1f71c8e425168f1 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sun, 19 Feb 2023 20:54:53 +0000 Subject: Added an Event Hook System (#1578) * added an eventHookSystem * Add all socket2 events to hooks --- src/managers/input/InputMethodRelay.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/managers/input/InputMethodRelay.cpp') diff --git a/src/managers/input/InputMethodRelay.cpp b/src/managers/input/InputMethodRelay.cpp index 20057a6a..95f0b6fb 100644 --- a/src/managers/input/InputMethodRelay.cpp +++ b/src/managers/input/InputMethodRelay.cpp @@ -2,7 +2,9 @@ #include "InputManager.hpp" #include "../../Compositor.hpp" -CInputMethodRelay::CInputMethodRelay() {} +CInputMethodRelay::CInputMethodRelay() { + g_pHookSystem->hookDynamic("keyboardFocus", [&](void* self, std::any param) { onKeyboardFocus(std::any_cast(param)); }); +} void CInputMethodRelay::onNewIME(wlr_input_method_v2* pIME) { if (m_pWLRIME) { -- cgit v1.2.3