summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/render_widget_host_view_qt.cpp10
-rw-r--r--src/core/render_widget_host_view_qt.h2
-rw-r--r--src/core/render_widget_host_view_qt_delegate.h2
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.cpp2
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp2
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp5
6 files changed, 22 insertions, 1 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 0f928625..572bc340 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -715,6 +715,16 @@ void RenderWidgetHostViewQt::notifyResize()
m_host->WasResized();
}
+void RenderWidgetHostViewQt::notifyShown()
+{
+ WasShown();
+}
+
+void RenderWidgetHostViewQt::notifyHidden()
+{
+ WasHidden();
+}
+
void RenderWidgetHostViewQt::windowBoundsChanged()
{
m_host->SendScreenRects();
diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h
index 68330a48..248c52f6 100644
--- a/src/core/render_widget_host_view_qt.h
+++ b/src/core/render_widget_host_view_qt.h
@@ -159,6 +159,8 @@ public:
// Overridden from RenderWidgetHostViewQtDelegateClient.
virtual QSGNode *updatePaintNode(QSGNode *) Q_DECL_OVERRIDE;
virtual void notifyResize() Q_DECL_OVERRIDE;
+ virtual void notifyShown() Q_DECL_OVERRIDE;
+ virtual void notifyHidden() Q_DECL_OVERRIDE;
virtual void windowBoundsChanged() Q_DECL_OVERRIDE;
virtual void windowChanged() Q_DECL_OVERRIDE;
virtual bool forwardEvent(QEvent *) Q_DECL_OVERRIDE;
diff --git a/src/core/render_widget_host_view_qt_delegate.h b/src/core/render_widget_host_view_qt_delegate.h
index a12f3055..da595b91 100644
--- a/src/core/render_widget_host_view_qt_delegate.h
+++ b/src/core/render_widget_host_view_qt_delegate.h
@@ -64,6 +64,8 @@ public:
virtual ~RenderWidgetHostViewQtDelegateClient() { }
virtual QSGNode *updatePaintNode(QSGNode *) = 0;
virtual void notifyResize() = 0;
+ virtual void notifyShown() = 0;
+ virtual void notifyHidden() = 0;
virtual void windowBoundsChanged() = 0;
virtual void windowChanged() = 0;
virtual bool forwardEvent(QEvent *) = 0;
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 0a534ac2..a3999cca 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
@@ -120,11 +120,13 @@ void RenderWidgetHostViewQtDelegateQuick::unlockMouse()
void RenderWidgetHostViewQtDelegateQuick::show()
{
setVisible(true);
+ m_client->notifyShown();
}
void RenderWidgetHostViewQtDelegateQuick::hide()
{
setVisible(false);
+ m_client->notifyHidden();
}
bool RenderWidgetHostViewQtDelegateQuick::isVisible() const
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
index 39c48ea5..be240a8a 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
@@ -79,11 +79,13 @@ QRectF RenderWidgetHostViewQtDelegateQuickWindow::contentsRect() const
void RenderWidgetHostViewQtDelegateQuickWindow::show()
{
QQuickWindow::show();
+ m_realDelegate->show();
}
void RenderWidgetHostViewQtDelegateQuickWindow::hide()
{
QQuickWindow::hide();
+ m_realDelegate->hide();
}
bool RenderWidgetHostViewQtDelegateQuickWindow::isVisible() const
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
index 865d0f93..d615b0f9 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
@@ -136,13 +136,16 @@ void RenderWidgetHostViewQtDelegateWidget::show()
{
// Check if we're attached to a QWebEngineView, we don't
// want to show anything else than popups as top-level.
- if (parent() || m_isPopup)
+ if (parent() || m_isPopup) {
QOpenGLWidget::show();
+ m_client->notifyShown();
+ }
}
void RenderWidgetHostViewQtDelegateWidget::hide()
{
QOpenGLWidget::hide();
+ m_client->notifyHidden();
}
bool RenderWidgetHostViewQtDelegateWidget::isVisible() const