diff options
Diffstat (limited to 'src/widgets/kernel/qapplication.cpp')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 647484ece1..d8c14de060 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -3249,12 +3249,11 @@ bool QApplication::notify(QObject *receiver, QEvent *e) QPointer<QWidget> pw = w; while (w) { - QMouseEvent me(mouse->type(), relpos, mouse->windowPos(), mouse->globalPos(), mouse->button(), mouse->buttons(), - mouse->modifiers()); + QMouseEvent me(mouse->type(), relpos, mouse->windowPos(), mouse->globalPos(), + mouse->button(), mouse->buttons(), mouse->modifiers(), mouse->source()); me.spont = mouse->spontaneous(); me.setTimestamp(mouse->timestamp()); QGuiApplicationPrivate::setMouseEventFlags(&me, mouse->flags()); - QGuiApplicationPrivate::setMouseEventSource(&me, mouse->source()); // throw away any mouse-tracking-only mouse events if (!w->hasMouseTracking() && mouse->type() == QEvent::MouseMove && mouse->buttons() == 0) { @@ -3688,7 +3687,9 @@ bool QApplication::notify(QObject *receiver, QEvent *e) bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e) { // send to all application event filters - if (sendThroughApplicationEventFilters(receiver, e)) + if (threadRequiresCoreApplication() + && receiver->d_func()->threadData->thread == mainThread() + && sendThroughApplicationEventFilters(receiver, e)) return true; if (receiver->isWidgetType()) { |