diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2016-11-29 11:42:17 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-12-06 09:17:36 +0000 |
commit | af72c3b4af3cf4b0f6d9db59e4c506a398c63f7a (patch) | |
tree | 13a03db46809cf766811aedfe272765412dab1c9 /src | |
parent | 5ca837bf42fd3bdb0cdf74bd10b6d1f63efa50a9 (diff) | |
download | qtwayland-af72c3b4af3cf4b0f6d9db59e4c506a398c63f7a.tar.gz |
Unify getProcAddress behavior in xcomposite-glx
Task-number: QTBUG-57326
Change-Id: I6e49cce16a3bcda0de2f1a9c9ce97acb0a27c4da
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp | 9 | ||||
-rw-r--r-- | src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp index 439acc00..33ae2e03 100644 --- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp +++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp @@ -45,6 +45,8 @@ #include <QRegion> +#include <dlfcn.h> + QT_BEGIN_NAMESPACE namespace QtWaylandClient { @@ -94,9 +96,12 @@ void QWaylandXCompositeGLXContext::swapBuffers(QPlatformSurface *surface) w->waitForFrameSync(); } -void (*QWaylandXCompositeGLXContext::getProcAddress(const char *procName)) () +QFunctionPointer QWaylandXCompositeGLXContext::getProcAddress(const char *procName) { - return glXGetProcAddress(reinterpret_cast<const GLubyte *>(procName)); + QFunctionPointer proc = glXGetProcAddress(reinterpret_cast<const GLubyte *>(procName)); + if (!proc) + proc = (QFunctionPointer) dlsym(RTLD_DEFAULT, procName); + return proc; } QSurfaceFormat QWaylandXCompositeGLXContext::format() const diff --git a/src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri b/src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri index 067378af..2307319a 100644 --- a/src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri +++ b/src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri @@ -3,6 +3,8 @@ include ($$PWD/../xcomposite_share/xcomposite_share.pri) QMAKE_USE += wayland-client glx +LIBS_PRIVATE += $$QMAKE_LIBS_DYNLOAD + QT += glx_support-private SOURCES += \ |