From 9b03a98ffb807f49d1e79fffad141a3634474d8a Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 25 Apr 2018 15:50:46 +0200 Subject: Disable drag&drop on eglfs for qml app The drag creates raster window, which on eglfs platform can be problematic. In case of running qml based browser without backing store, this will try to create a backing store during drag event, which will abort on eglfs. Therefore avoid the drag in qml in case the platform does not support multiple windows. This patch has the side effect of disabling drag even when qml runs with backing store, i.e. using QQuickWidget and therefore creating another raster window is not an issue. [ChangeLog][Behavior Changes] Drag&Drop is now disabled for QML based applications, when platform does not support multiple top-level windows (like EGLFS). Task-number: QTBUG-57516 Change-Id: I0c2685ba90914fe1f7168c79744c55e07e589488 Reviewed-by: Kai Koehne --- src/webengine/api/qquickwebengineview.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/webengine/api/qquickwebengineview.cpp') diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index fde7b40dc..babfbd014 100644 --- a/src/webengine/api/qquickwebengineview.cpp +++ b/src/webengine/api/qquickwebengineview.cpp @@ -1012,6 +1012,13 @@ void QQuickWebEngineViewPrivate::startDragging(const content::DropData &dropData #endif // QT_CONFIG(draganddrop) } +bool QQuickWebEngineViewPrivate::supportsDragging() const +{ + // QTBUG-57516 + // Fixme: This is just a band-aid workaround. + return QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::MultipleWindows); +} + bool QQuickWebEngineViewPrivate::isEnabled() const { const Q_Q(QQuickWebEngineView); -- cgit v1.2.3