aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-03-31 21:30:30 +0100
committerVaxry <[email protected]>2024-03-31 21:30:36 +0100
commit4156b55cf91a7cb90fd14582a1c5a9df5792933e (patch)
treeeccba3e81d5a813ee1a09691e58c5791a788fc91
parente1e41e54480282d9bec9957d3c578eb87bc1f2f2 (diff)
downloadHyprland-4156b55cf91a7cb90fd14582a1c5a9df5792933e.tar.gz
Hyprland-4156b55cf91a7cb90fd14582a1c5a9df5792933e.zip
textinput: send deactivate on disable ti
ref #5288
-rw-r--r--src/managers/input/TextInput.cpp9
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() {