diff options
Diffstat (limited to 'src/webengine/render_widget_host_view_qt_delegate_quick.cpp')
-rw-r--r-- | src/webengine/render_widget_host_view_qt_delegate_quick.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp index 290f3f9b0..d5365759d 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp +++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp @@ -312,6 +312,16 @@ void RenderWidgetHostViewQtDelegateQuick::inputMethodEvent(QInputMethodEvent *ev void RenderWidgetHostViewQtDelegateQuick::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) { QQuickItem::geometryChanged(newGeometry, oldGeometry); + + if (window()) { + // TODO(pvarga): Use QQuickItem::mapToGlobal from Qt 5.7 + const QPoint globalPos = window()->mapToGlobal(position().toPoint()); + if (globalPos != m_lastGlobalPos) { + m_lastGlobalPos = globalPos; + m_client->windowBoundsChanged(); + } + } + m_client->notifyResize(); } @@ -344,6 +354,10 @@ QSGNode *RenderWidgetHostViewQtDelegateQuick::updatePaintNode(QSGNode *oldNode, void RenderWidgetHostViewQtDelegateQuick::onWindowPosChanged() { + if (window()) { + // TODO(pvarga): Use QQuickItem::mapToGlobal from Qt 5.7 + m_lastGlobalPos = window()->mapToGlobal(position().toPoint()); + } m_client->windowBoundsChanged(); } |