aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSungyoon Cho <[email protected]>2024-09-13 01:41:24 +0900
committerGitHub <[email protected]>2024-09-12 17:41:24 +0100
commit118be4dea048df88fd21b84580fe62950c868c8f (patch)
tree6d26a31ddc2aeda5cc6de6f6e97806338905f5fc
parent73b9756b8d7ee06fc1c9f072f2a41f2dd1aeb2c9 (diff)
downloadHyprland-118be4dea048df88fd21b84580fe62950c868c8f.tar.gz
Hyprland-118be4dea048df88fd21b84580fe62950c868c8f.zip
textinput: fix tiv3 leave (#7761)
-rw-r--r--src/managers/input/TextInput.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/managers/input/TextInput.cpp b/src/managers/input/TextInput.cpp
index 2769fad0..e601ad9a 100644
--- a/src/managers/input/TextInput.cpp
+++ b/src/managers/input/TextInput.cpp
@@ -138,8 +138,12 @@ void CTextInput::setFocusedSurface(SP<CWLSurfaceResource> pSurface) {
listeners.surfaceUnmap.reset();
listeners.surfaceDestroy.reset();
- if (isV3() && !pV3Input.expired() && pV3Input->current.enabled.value)
- pV3Input->current.enabled.value = false;
+ if (isV3() && !pV3Input.expired() && pV3Input->current.enabled.value) {
+ pV3Input->pending.enabled.value = false;
+ pV3Input->pending.enabled.isDisablePending = false;
+ pV3Input->pending.enabled.isEnablePending = false;
+ pV3Input->current.enabled.value = false;
+ }
if (!g_pInputManager->m_sIMERelay.getFocusedTextInput())
g_pInputManager->m_sIMERelay.deactivateIME(this);
@@ -154,8 +158,12 @@ void CTextInput::setFocusedSurface(SP<CWLSurfaceResource> pSurface) {
listeners.surfaceUnmap.reset();
listeners.surfaceDestroy.reset();
- if (isV3() && !pV3Input.expired() && pV3Input->current.enabled.value)
- pV3Input->current.enabled.value = false;
+ if (isV3() && !pV3Input.expired() && pV3Input->current.enabled.value) {
+ pV3Input->pending.enabled.value = false;
+ pV3Input->pending.enabled.isDisablePending = false;
+ pV3Input->pending.enabled.isEnablePending = false;
+ pV3Input->current.enabled.value = false;
+ }
if (!g_pInputManager->m_sIMERelay.getFocusedTextInput())
g_pInputManager->m_sIMERelay.deactivateIME(this);
@@ -202,13 +210,9 @@ void CTextInput::leave() {
enterLocks = 0;
}
- if (isV3()) {
+ if (isV3())
pV3Input->leave(focusedSurface());
- if (pV3Input->current.enabled.value) {
- pV3Input->current.enabled.value = false;
- onDisabled();
- }
- } else
+ else
pV1Input->leave();
setFocusedSurface(nullptr);