summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebengineview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine/api/qquickwebengineview.cpp')
-rw-r--r--src/webengine/api/qquickwebengineview.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index c8c8bfac..e3838255 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -295,22 +295,22 @@ void QQuickWebEngineViewPrivate::focusContainer()
q->forceActiveFocus();
}
-void QQuickWebEngineViewPrivate::adoptNewWindow(WebContentsAdapter *newWebContents, WindowOpenDisposition disposition, const QRect &)
+void QQuickWebEngineViewPrivate::adoptNewWindow(WebContentsAdapter *newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &)
{
QQuickWebEngineNewViewRequest request;
// This increases the ref-count of newWebContents and will tell Chromium
// to start loading it and possibly return it to its parent page window.open().
request.m_adapter = newWebContents;
- request.m_isPopup = false;
+ request.m_isUserInitiated = userGesture;
switch (disposition) {
- case WebContentsAdapterClient::NewPopupDisposition:
- request.m_isPopup = true;
- // fall through
case WebContentsAdapterClient::NewForegroundTabDisposition:
case WebContentsAdapterClient::NewBackgroundTabDisposition:
request.m_destination = QQuickWebEngineView::NewViewInTab;
break;
+ case WebContentsAdapterClient::NewPopupDisposition:
+ request.m_destination = QQuickWebEngineView::NewViewInDialog;
+ break;
case WebContentsAdapterClient::NewWindowDisposition:
request.m_destination = QQuickWebEngineView::NewViewInWindow;
break;