From e8247e5eb5815aff8c1fd1931d4770b58c8896db Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Wed, 22 Jan 2020 12:46:18 +0100 Subject: [PATCH] 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 --- src/plugins/platforms/wayland/client.pro | 3 +++ src/plugins/platforms/wayland/qwaylandintegration.cpp | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/client.pro b/src/plugins/platforms/wayland/client.pro index 793a44183c2..4aeba860bc5 100644 --- a/src/plugins/platforms/wayland/client.pro +++ b/src/plugins/platforms/wayland/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/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp index 85c1990b612..82ffc503a9b 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp @@ -66,7 +66,10 @@ #include #include #include +#if QT_CONFIG(opengl) #include +#include +#endif // QT_CONFIG(opengl) #include #include @@ -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