diff options
Diffstat (limited to 'src/widgets/kernel/qwidgetwindow.cpp')
-rw-r--r-- | src/widgets/kernel/qwidgetwindow.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index fbc71cd0ea..70b305326c 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,11 @@ static inline bool shouldBePropagatedToWidget(QEvent *event) } } +bool QWidgetWindowPrivate::allowClickThrough(const QPoint &) const +{ + return true; +} + bool QWidgetWindow::event(QEvent *event) { if (!m_widget) @@ -1018,7 +1024,11 @@ void QWidgetWindow::handleWindowStateChangedEvent(QWindowStateChangeEvent *event } } +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +bool QWidgetWindow::nativeEvent(const QByteArray &eventType, void *message, qintptr *result) +#else bool QWidgetWindow::nativeEvent(const QByteArray &eventType, void *message, long *result) +#endif { return m_widget->nativeEvent(eventType, message, result); } @@ -1096,7 +1106,7 @@ void QWidgetWindow::handleContextMenuEvent(QContextMenuEvent *e) } } if (fw && fw->isEnabled()) { - QPoint pos = fw->inputMethodQuery(Qt::ImMicroFocus).toRect().center(); + QPoint pos = fw->inputMethodQuery(Qt::ImCursorRectangle).toRect().center(); QContextMenuEvent widgetEvent(QContextMenuEvent::Keyboard, pos, fw->mapToGlobal(pos), e->modifiers()); QGuiApplication::forwardEvent(fw, &widgetEvent, e); |