summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.h
diff options
context:
space:
mode:
authorSzabolcs David <davidsz@inf.u-szeged.hu>2020-04-27 12:28:06 +0200
committerSzabolcs David <davidsz@inf.u-szeged.hu>2020-05-04 15:08:35 +0200
commit00f7ad50e99037a121c684726065c416b0b995eb (patch)
treef66065093a09ecc0a11a8aa73be50c5f6be54450 /src/core/web_contents_adapter.h
parent810eb3b20247ef3b162182f6a31f5e745615d3e3 (diff)
Revive Pointer Lock feature
This change fixes several issues: - Accepting mouse lock permission from modal dialog was not working on Linux. XCB needs some time to activate the parent window after accepting the dialog and we expected to have immediate active focus. - Implementation of RenderWidgetHostViewBase::IsMouseLocked() was missing. - Fixed event.movementX/movementY by disabling ConsolidatedMovementXY feature. Calculate movement properties in WebEngine instead of blink. Task-number: QTBUG-83294 Change-Id: Ic03d05c1026a113cf5e8d22544fc508d9f285876 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter.h')
-rw-r--r--src/core/web_contents_adapter.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h
index cc041ed55..66808ce5e 100644
--- a/src/core/web_contents_adapter.h
+++ b/src/core/web_contents_adapter.h
@@ -194,7 +194,8 @@ public:
void devToolsFrontendDestroyed(DevToolsFrontendQt *frontend);
void grantMediaAccessPermission(const QUrl &securityOrigin, WebContentsAdapterClient::MediaRequestFlags flags);
- void grantMouseLockPermission(bool granted);
+ void grantMouseLockPermission(const QUrl &securityOrigin, bool granted);
+ void handlePendingMouseLockPermission();
void runFeatureRequestCallback(const QUrl &securityOrigin, ProfileAdapter::PermissionType feature, bool allowed);
void setBackgroundColor(const QColor &color);
@@ -268,6 +269,7 @@ private:
#endif
WebContentsAdapterClient *m_adapterClient;
quint64 m_nextRequestId;
+ QMap<QUrl, bool> m_pendingMouseLockPermissions;
std::unique_ptr<content::DropData> m_currentDropData;
uint m_currentDropAction;
bool m_updateDragActionCalled;