From 83db3c1988a09449a8bde7aef08427e7e6d0dd12 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Tue, 6 Oct 2015 10:58:17 +0200 Subject: [PATCH] WebPage: Always grant MouseLock permission in fullscreen --- src/lib/webengine/webpage.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/webengine/webpage.cpp b/src/lib/webengine/webpage.cpp index 7c31ec78c..ab8666f3c 100644 --- a/src/lib/webengine/webpage.cpp +++ b/src/lib/webengine/webpage.cpp @@ -323,7 +323,10 @@ void WebPage::fullScreenRequested(bool fullScreen) void WebPage::featurePermissionRequested(const QUrl &origin, const QWebEnginePage::Feature &feature) { - mApp->html5PermissionsManager()->requestPermissions(this, origin, feature); + if (feature == MouseLock && view()->isFullScreen()) + setFeaturePermission(origin, feature, PermissionGrantedByUser); + else + mApp->html5PermissionsManager()->requestPermissions(this, origin, feature); } bool WebPage::isFullScreen()