diff options
author | Vaxry <[email protected]> | 2024-03-31 21:30:30 +0100 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-03-31 21:30:36 +0100 |
commit | 4156b55cf91a7cb90fd14582a1c5a9df5792933e (patch) | |
tree | eccba3e81d5a813ee1a09691e58c5791a788fc91 | |
parent | e1e41e54480282d9bec9957d3c578eb87bc1f2f2 (diff) | |
download | Hyprland-4156b55cf91a7cb90fd14582a1c5a9df5792933e.tar.gz Hyprland-4156b55cf91a7cb90fd14582a1c5a9df5792933e.zip |
textinput: send deactivate on disable ti
ref #5288
-rw-r--r-- | src/managers/input/TextInput.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/managers/input/TextInput.cpp b/src/managers/input/TextInput.cpp index eeea899d..6b6f38c8 100644 --- a/src/managers/input/TextInput.cpp +++ b/src/managers/input/TextInput.cpp @@ -96,6 +96,9 @@ void CTextInput::onDisabled() { hyprListener_surfaceDestroyed.removeCallback(); hyprListener_surfaceUnmapped.removeCallback(); + if (!g_pInputManager->m_sIMERelay.m_pWLRIME->active) + return; + wlr_input_method_v2_send_deactivate(g_pInputManager->m_sIMERelay.m_pWLRIME); g_pInputManager->m_sIMERelay.commitIMEState(this); } @@ -204,6 +207,12 @@ void CTextInput::leave() { } setFocusedSurface(nullptr); + + if (!g_pInputManager->m_sIMERelay.m_pWLRIME->active) + return; + + wlr_input_method_v2_send_deactivate(g_pInputManager->m_sIMERelay.m_pWLRIME); + g_pInputManager->m_sIMERelay.commitIMEState(this); } wlr_surface* CTextInput::focusedSurface() { |