diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/inputmethod/qmacinputcontext_mac.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/inputmethod/qmacinputcontext_mac.cpp b/src/gui/inputmethod/qmacinputcontext_mac.cpp index 116d233..994edb9 100644 --- a/src/gui/inputmethod/qmacinputcontext_mac.cpp +++ b/src/gui/inputmethod/qmacinputcontext_mac.cpp @@ -217,7 +217,11 @@ QMacInputContext::globalEventProcessor(EventHandlerCallRef, EventRef event, void case kEventClassTextInput: { handled_event = false; QWidget *widget = QApplicationPrivate::focus_widget; - if(!widget || (context && widget->inputContext() != context)) { + bool canCompose = widget && (!context || widget->inputContext() == context) + && !(widget->inputMethodHints() & Qt::ImhDigitsOnly + || widget->inputMethodHints() & Qt::ImhFormattedNumbersOnly + || widget->inputMethodHints() & Qt::ImhHiddenText); + if(!canCompose) { handled_event = false; } else if(ekind == kEventTextInputOffsetToPos) { if(!widget->testAttribute(Qt::WA_InputMethodEnabled)) { |