aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/items/qquickwindow.cpp')
-rw-r--r--src/quick/items/qquickwindow.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 2bdc56e6da..09be88f988 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -1771,6 +1771,25 @@ bool QQuickWindow::event(QEvent *e)
if (d->contentItem)
QCoreApplication::sendEvent(d->contentItem, e);
break;
+ case QEvent::InputMethod:
+ case QEvent::InputMethodQuery:
+ {
+ QQuickItem *target = d->activeFocusItem;
+ // while an input method delivers the event, this window might still be inactive
+ if (!target) {
+ target = d->contentItem;
+ if (!target || !target->isEnabled())
+ break;
+ // see setFocusInScope for a similar loop
+ while (target->isFocusScope() && target->scopedFocusItem() && target->scopedFocusItem()->isEnabled())
+ target = target->scopedFocusItem();
+ }
+ if (target) {
+ QCoreApplication::sendEvent(target, e);
+ return true;
+ }
+ }
+ break;
default:
break;
}