summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_qpa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qapplication_qpa.cpp')
-rw-r--r--src/gui/kernel/qapplication_qpa.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_qpa.cpp b/src/gui/kernel/qapplication_qpa.cpp
index e5b5396..b89e81d 100644
--- a/src/gui/kernel/qapplication_qpa.cpp
+++ b/src/gui/kernel/qapplication_qpa.cpp
@@ -802,6 +802,9 @@ void QApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEven
if (app_do_modal && !qt_try_modal(focusW, e->keyType))
return;
+ if (!focusW->isWindow())
+ focusW = focusW->window();
+
modifiers = e->modifiers;
QKeyEvent ev(e->keyType, e->key, e->modifiers, e->unicode, e->repeat, e->repeatCount);
QApplication::sendSpontaneousEvent(focusW, &ev);