diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-04 10:36:20 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-10-04 10:36:20 +0200 |
commit | 1a3b34ea8cfb09dcb9022e897c4b494b623abd6a (patch) | |
tree | b18be3e29e8ce191a99641985baa371a5d504682 /src/webengine/render_widget_host_view_qt_delegate_quick.cpp | |
parent | 1a0e71b130f55a3ce77c6b27ac898355253f1b9a (diff) | |
parent | 2b953bf803aa74f4c6e1e3f06b22887c1ac80961 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
src/3rdparty
Change-Id: I49d99b5ac2cfba243eda1ea705c2a7d71b5542f6
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 80bf0b49a..48217f4a2 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp +++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp @@ -315,6 +315,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(); } @@ -347,6 +357,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(); } |