diff options
Diffstat (limited to 'src/widgets/kernel/qwidgetwindow.cpp')
-rw-r--r-- | src/widgets/kernel/qwidgetwindow.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index c6f22aa21a..f44f63d71b 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -106,6 +106,7 @@ public: if (QWidget *widget = q->widget()) QWidgetPrivate::get(widget)->updateContentsRect(); } + bool allowClickThrough(const QPoint &) const override; }; QRectF QWidgetWindowPrivate::closestAcceptableGeometry(const QRectF &rect) const @@ -221,6 +222,12 @@ static inline bool shouldBePropagatedToWidget(QEvent *event) } } +bool QWidgetWindowPrivate::allowClickThrough(const QPoint &globalPos) const +{ + QWidget *w = QApplication::widgetAt(globalPos); + return w && !w->testAttribute(Qt::WA_MacNoClickThrough); +} + bool QWidgetWindow::event(QEvent *event) { if (!m_widget) |