From 7266bd459e7cf8d4f4e3ad67b4ff23dea4fbfd0e Mon Sep 17 00:00:00 2001 From: Niclas Rosenvik Date: Tue, 23 Mar 2021 11:26:21 +0000 Subject: Fix GLX on non-linux X11 systems Some parts of the GLX code is only enabled for Linux. This makes builds on other X11 supported platforms break when GLX is found. To fix this enable these parts of the code when Qt feature xcb-glx-plugin is enabled. xcb-glx-plugin has to be made public in order for QT_CONFIG(xcb_glx_plugin) to work correctly in these parts of the code. Change-Id: I6bf78b6a64787ed88c8e2fae40675244c9198c37 Reviewed-by: Laszlo Agocs Reviewed-by: Liang Qi --- src/gui/platform/unix/qunixnativeinterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui/platform/unix/qunixnativeinterface.cpp') diff --git a/src/gui/platform/unix/qunixnativeinterface.cpp b/src/gui/platform/unix/qunixnativeinterface.cpp index a182fce1822..0ef88b4c918 100644 --- a/src/gui/platform/unix/qunixnativeinterface.cpp +++ b/src/gui/platform/unix/qunixnativeinterface.cpp @@ -55,7 +55,7 @@ using namespace QNativeInterface::Private; #ifndef QT_NO_OPENGL -#if defined(Q_OS_LINUX) +#if QT_CONFIG(xcb_glx_plugin) /*! \class QNativeInterface::QGLXContext @@ -110,7 +110,7 @@ QOpenGLContext *QNativeInterface::QGLXContext::fromNative(GLXContext visualBased return QGuiApplicationPrivate::platformIntegration()->call< &QGLXIntegration::createOpenGLContext>(visualBasedContext, visualInfo, shareContext); } -#endif // defined(Q_OS_LINUX) +#endif // QT_CONFIG(xcb_glx_plugin) #if QT_CONFIG(egl) -- cgit v1.2.3