summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidgetwindow_qpa.cpp
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-03-23 13:36:29 +0100
committerKent Hansen <kent.hansen@nokia.com>2012-03-23 14:10:58 +0100
commit3b512ae142017f105f297467f74dc28d3cb9030a (patch)
tree9e131e23c01537f051851a1da9576c1e1ddf5ba2 /src/widgets/kernel/qwidgetwindow_qpa.cpp
parente20c4730192f312881591fb50e571af0a88fe421 (diff)
parentf956f9a83603a3df5651e3238c24e8df37558d6e (diff)
Merge master into api_changes
Diffstat (limited to 'src/widgets/kernel/qwidgetwindow_qpa.cpp')
-rw-r--r--src/widgets/kernel/qwidgetwindow_qpa.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidgetwindow_qpa.cpp b/src/widgets/kernel/qwidgetwindow_qpa.cpp
index 498908f4db..aa7ccfeb4f 100644
--- a/src/widgets/kernel/qwidgetwindow_qpa.cpp
+++ b/src/widgets/kernel/qwidgetwindow_qpa.cpp
@@ -99,6 +99,15 @@ bool QWidgetWindow::event(QEvent *event)
case QEvent::FocusOut:
return false;
+ case QEvent::FocusAboutToChange:
+ if (QApplicationPrivate::focus_widget) {
+ if (QApplicationPrivate::focus_widget->testAttribute(Qt::WA_InputMethodEnabled))
+ qApp->inputMethod()->commit();
+
+ QGuiApplication::sendSpontaneousEvent(QApplicationPrivate::focus_widget, event);
+ }
+ return true;
+
case QEvent::KeyPress:
case QEvent::KeyRelease:
handleKeyEvent(static_cast<QKeyEvent *>(event));