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