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>
This commit is contained in:
Johan Klokkhammer Helsing 2020-01-22 12:46:18 +01:00
parent f6155a7622
commit e8247e5eb5
2 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -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