summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2020-01-22 12:46:18 +0100
committerJohan Klokkhammer Helsing <johan.helsing@qt.io>2020-02-19 09:57:46 +0100
commit2d75b6fa5109d61208ba115b0623136047ab65ab (patch)
tree9a2391d38e72899a8af346125a39aaf387f0c7d1
parent22ff39a5d92be69557ab3544ae36affaffc38c95 (diff)
Inject OpenGL dependency for backing store
The backing store no longer has OpenGL support by default, so we need to enable it. Task-number: QTBUG-74409 Change-Id: Ie132dae523db86091134279ade61cffe2ff10a73 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/client/client.pro3
-rw-r--r--src/client/qwaylandintegration.cpp9
2 files changed, 11 insertions, 1 deletions
diff --git a/src/client/client.pro b/src/client/client.pro
index 793a44183..4aeba860b 100644
--- a/src/client/client.pro
+++ b/src/client/client.pro
@@ -23,6 +23,9 @@ qtConfig(xkbcommon) {
QT_FOR_PRIVATE += xkbcommon_support-private
}
+qtHaveModule(platformcompositor_support-private): \
+ QT_PRIVATE += platformcompositor_support-private
+
qtHaveModule(linuxaccessibility_support-private): \
QT_PRIVATE += linuxaccessibility_support-private
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
index 85c1990b6..82ffc503a 100644
--- a/src/client/qwaylandintegration.cpp
+++ b/src/client/qwaylandintegration.cpp
@@ -66,7 +66,10 @@
#include <qpa/qwindowsysteminterface.h>
#include <qpa/qplatformcursor.h>
#include <QtGui/QSurfaceFormat>
+#if QT_CONFIG(opengl)
#include <QtGui/QOpenGLContext>
+#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
+#endif // QT_CONFIG(opengl)
#include <QSocketNotifier>
#include <qpa/qplatforminputcontextfactory_p.h>
@@ -182,7 +185,11 @@ QPlatformOpenGLContext *QWaylandIntegration::createPlatformOpenGLContext(QOpenGL
QPlatformBackingStore *QWaylandIntegration::createPlatformBackingStore(QWindow *window) const
{
- return new QWaylandShmBackingStore(window, mDisplay.data());
+ auto *backingStore = new QWaylandShmBackingStore(window, mDisplay.data());
+#if QT_CONFIG(opengl)
+ backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore));
+#endif
+ return backingStore;
}
QAbstractEventDispatcher *QWaylandIntegration::createEventDispatcher() const