From 0d7ef7993dc18a69d0bffd78666ee6ae7fb83e34 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 24 Aug 2011 21:12:35 +0800 Subject: [PATCH] xcb: Disable GLX when xcb-xlib is not present due xlib usage The GLX and EGL code is using DISPLAY_FROM_XCB which requires xlib support, disable GLX when when xlib is not present. Change-Id: I55126e48e52390fdcfb1348a11fbf9628d32b13c Reviewed-on: http://codereview.qt.nokia.com/3665 Reviewed-by: Qt Sanity Bot Reviewed-by: Lars Knoll --- src/plugins/platforms/xcb/qxcbwindow.cpp | 2 +- src/plugins/platforms/xcb/xcb.pro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index c06d565..a891bb3 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -172,7 +172,7 @@ void QXcbWindow::create() m_requestedFormat = window()->format(); -#if defined(XCB_USE_GLX) || defined(XCB_USE_EGL) +#if (defined(XCB_USE_GLX) || defined(XCB_USE_EGL)) && defined(XCB_USE_XLIB) if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL) || window()->format().hasAlpha()) { diff --git a/src/plugins/platforms/xcb/xcb.pro b/src/plugins/platforms/xcb/xcb.pro index 4f16c3b..ba36ab1 100644 --- a/src/plugins/platforms/xcb/xcb.pro +++ b/src/plugins/platforms/xcb/xcb.pro @@ -71,7 +71,7 @@ contains(QT_CONFIG, opengl) { DEFINES += XCB_USE_EGL LIBS += -lEGL HEADERS += qxcbeglsurface.h - } else { + } else:contains(QT_CONFIG, xcb-xlib) { DEFINES += XCB_USE_GLX HEADERS += qglxintegration.h SOURCES += qglxintegration.cpp -- 2.7.4