diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-03-14 13:51:08 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-03-14 13:51:08 +0000 |
| commit | 0807b8b95f595083a19bb5fe317d7242bcb26654 (patch) | |
| tree | c35a7c9aede6327e88b44ffbfac0d1170d0f89e2 /src/managers/input/InputMethodRelay.cpp | |
| parent | 5dc1a5fec631ddd0136af28c901e8c962548d497 (diff) | |
tiv1: minor fixes for crashes
Diffstat (limited to 'src/managers/input/InputMethodRelay.cpp')
| -rw-r--r-- | src/managers/input/InputMethodRelay.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/managers/input/InputMethodRelay.cpp b/src/managers/input/InputMethodRelay.cpp index f8fa6b09..f84850de 100644 --- a/src/managers/input/InputMethodRelay.cpp +++ b/src/managers/input/InputMethodRelay.cpp @@ -371,7 +371,7 @@ void CInputMethodRelay::createNewTextInput(wlr_text_input_v3* pInput, STextInput return; } - if (!PINPUT->pWlrInput->current_enabled) { + if (!(PINPUT->pWlrInput ? PINPUT->pWlrInput->current_enabled : PINPUT->pV1Input->active)) { Debug::log(WARN, "Disabled TextInput commit?"); return; } @@ -486,6 +486,7 @@ void CInputMethodRelay::onKeyboardFocus(wlr_surface* pSurface) { else { zwp_text_input_v1_send_leave(ti.pV1Input->resourceImpl); ti.pV1Input->focusedSurface = nullptr; + ti.pV1Input->active = false; } } else { continue; @@ -500,6 +501,7 @@ void CInputMethodRelay::onKeyboardFocus(wlr_surface* pSurface) { else { zwp_text_input_v1_send_enter(ti.pV1Input->resourceImpl, pSurface->resource); ti.pV1Input->focusedSurface = pSurface; + ti.pV1Input->active = true; } } else { setPendingSurface(&ti, pSurface); |
