diff options
Diffstat (limited to 'src/gui/inputmethod/qximinputcontext_x11.cpp')
-rw-r--r-- | src/gui/inputmethod/qximinputcontext_x11.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/inputmethod/qximinputcontext_x11.cpp b/src/gui/inputmethod/qximinputcontext_x11.cpp index 1c8560f..b43a134 100644 --- a/src/gui/inputmethod/qximinputcontext_x11.cpp +++ b/src/gui/inputmethod/qximinputcontext_x11.cpp @@ -437,7 +437,9 @@ void QXIMInputContext::create_xim() // reinitialize input context after the input method // server (like SCIM) has been launched without // requiring the user to manually switch focus. - if (focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) + if (focusWidget->testAttribute(Qt::WA_InputMethodEnabled) + && focusWidget->testAttribute(Qt::WA_WState_Created) + && focusWidget->isEnabled()) setFocusWidget(focusWidget); } // following code fragment is not required for immodule |