diff options
author | Inho Lee <inho.lee@qt.io> | 2024-02-02 10:32:17 +0100 |
---|---|---|
committer | Inho Lee <inho.lee@qt.io> | 2024-02-06 09:45:27 +0100 |
commit | 80c23a2a17c401df159d5e11a1b357a182d1b925 (patch) | |
tree | 75dff132c858e6c4c3089683c3b4437661c595f3 /src | |
parent | fa4065d5fa2da19e1070d40881d9c050e0e8c040 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/client/qwaylandinputmethodcontext.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/qwaylandinputmethodcontext.cpp b/src/client/qwaylandinputmethodcontext.cpp index 657208efb..2733e4f3a 100644 --- a/src/client/qwaylandinputmethodcontext.cpp +++ b/src/client/qwaylandinputmethodcontext.cpp @@ -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) { |