QtTextInputMethod: hide inputPanel when focus leaving

When focusObject is changed,
hide the input panel if input method is not accepted.

Fixes: QTBUG-116600
Pick-to: 6.7 6.6 6.5
Change-Id: I50b5d051eea6f85365d8bc9aeadb46d8d866e362
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
Inho Lee 2024-02-02 10:32:17 +01:00
parent 91d9156e7b
commit 575448a77a

View File

@ -362,6 +362,9 @@ void QWaylandInputMethodContext::setFocusObject(QObject *)
if (inputMethod == nullptr)
return;
if (inputMethod->isVisible() && !inputMethodAccepted())
inputMethod->hide_input_panel();
QWindow *window = QGuiApplication::focusWindow();
if (m_currentWindow != nullptr && m_currentWindow->handle() != nullptr) {