summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r--src/plugins/platforms/xcb/.prev_CMakeLists.txt9
-rw-r--r--src/plugins/platforms/xcb/CMakeLists.txt9
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp24
-rw-r--r--src/plugins/platforms/xcb/xcb_qpa_lib.pro3
4 files changed, 34 insertions, 11 deletions
diff --git a/src/plugins/platforms/xcb/.prev_CMakeLists.txt b/src/plugins/platforms/xcb/.prev_CMakeLists.txt
index e15d45aa63..427997fc66 100644
--- a/src/plugins/platforms/xcb/.prev_CMakeLists.txt
+++ b/src/plugins/platforms/xcb/.prev_CMakeLists.txt
@@ -66,6 +66,11 @@ qt_add_module(XcbQpa
## Scopes:
#####################################################################
+qt_extend_target(XcbQpa CONDITION TARGET Qt::PlatformCompositorSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::PlatformCompositorSupportPrivate
+)
+
qt_extend_target(XcbQpa CONDITION TARGET Qt::LinuxAccessibilitySupportPrivate
PUBLIC_LIBRARIES
Qt::LinuxAccessibilitySupportPrivate
@@ -150,12 +155,12 @@ qt_add_plugin(QXcbIntegrationPlugin
Qt::XcbQpaPrivate
)
-#### Keys ignored in scope 19:.:.:xcb-plugin.pro:<TRUE>:
+#### Keys ignored in scope 20:.:.:xcb-plugin.pro:<TRUE>:
# OTHER_FILES = "xcb.json" "README"
## Scopes:
#####################################################################
-#### Keys ignored in scope 21:.:.:xcb-plugin.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+#### Keys ignored in scope 22:.:.:xcb-plugin.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
# PLUGIN_EXTENDS = "-"
add_subdirectory(gl_integrations)
diff --git a/src/plugins/platforms/xcb/CMakeLists.txt b/src/plugins/platforms/xcb/CMakeLists.txt
index 1bb8d7f53f..d422d69891 100644
--- a/src/plugins/platforms/xcb/CMakeLists.txt
+++ b/src/plugins/platforms/xcb/CMakeLists.txt
@@ -89,6 +89,11 @@ qt_add_module(XcbQpa
## Scopes:
#####################################################################
+qt_extend_target(XcbQpa CONDITION TARGET Qt::PlatformCompositorSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::PlatformCompositorSupportPrivate
+)
+
qt_extend_target(XcbQpa CONDITION TARGET Qt::LinuxAccessibilitySupportPrivate
PUBLIC_LIBRARIES
Qt::LinuxAccessibilitySupportPrivate
@@ -190,13 +195,13 @@ qt_add_plugin(QXcbIntegrationPlugin
Qt::XcbQpaPrivate
)
-#### Keys ignored in scope 19:.:.:xcb-plugin.pro:<TRUE>:
+#### Keys ignored in scope 20:.:.:xcb-plugin.pro:<TRUE>:
# OTHER_FILES = "xcb.json" "README"
## Scopes:
#####################################################################
-#### Keys ignored in scope 21:.:.:xcb-plugin.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+#### Keys ignored in scope 22:.:.:xcb-plugin.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
# PLUGIN_EXTENDS = "-"
add_subdirectory(gl_integrations)
if(OFF)
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index 3fd989e1f9..cea0511822 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -61,6 +61,9 @@
#include <QtFontDatabaseSupport/private/qgenericunixfontdatabase_p.h>
#include <QtServiceSupport/private/qgenericunixservices_p.h>
+#if QT_CONFIG(opengl)
+#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
+#endif
#include <stdio.h>
@@ -288,16 +291,23 @@ QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLCont
QPlatformBackingStore *QXcbIntegration::createPlatformBackingStore(QWindow *window) const
{
- const bool isTrayIconWindow = QXcbWindow::isTrayIconWindow(window);
- if (isTrayIconWindow)
- return new QXcbSystemTrayBackingStore(window);
+ QPlatformBackingStore *backingStore = nullptr;
+ const bool isTrayIconWindow = QXcbWindow::isTrayIconWindow(window);
+ if (isTrayIconWindow) {
+ backingStore = new QXcbSystemTrayBackingStore(window);
#if QT_CONFIG(xcb_native_painting)
- if (nativePaintingEnabled())
- return new QXcbNativeBackingStore(window);
+ } else if (nativePaintingEnabled()) {
+ backingStore = new QXcbNativeBackingStore(window);
#endif
-
- return new QXcbBackingStore(window);
+ } else {
+ backingStore = new QXcbBackingStore(window);
+ }
+ Q_ASSERT(backingStore);
+#ifndef QT_NO_OPENGL
+ backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore));
+#endif
+ return backingStore;
}
QPlatformOffscreenSurface *QXcbIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const
diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro
index a5d05faa9c..1f651e7697 100644
--- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro
+++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro
@@ -9,6 +9,9 @@ QT += \
edid_support-private \
xkbcommon_support-private
+qtHaveModule(platformcompositor_support-private): \
+ QT += platformcompositor_support-private
+
qtHaveModule(linuxaccessibility_support-private): \
QT += linuxaccessibility_support-private