mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Bring back mouse grab permission workaround
It is still needed for QtWebEngine 5.7
This commit is contained in:
parent
1695c9bd62
commit
ddb60dca53
|
@ -81,7 +81,15 @@ void HTML5PermissionsNotification::grantPermissions()
|
|||
return;
|
||||
}
|
||||
|
||||
QTimer::singleShot(0, this, [this]() {
|
||||
// We need to have cursor inside view to correctly grab mouse
|
||||
if (m_feature == QWebEnginePage::MouseLock) {
|
||||
QWidget *view = m_page->view();
|
||||
QCursor::setPos(view->mapToGlobal(view->rect().center()));
|
||||
}
|
||||
|
||||
m_page->setFeaturePermission(m_origin, m_feature, QWebEnginePage::PermissionGrantedByUser);
|
||||
});
|
||||
|
||||
if (ui->remember->isChecked()) {
|
||||
mApp->html5PermissionsManager()->rememberPermissions(m_origin, m_feature, QWebEnginePage::PermissionGrantedByUser);
|
||||
|
|
Loading…
Reference in New Issue
Block a user