summaryrefslogtreecommitdiffstats
path: root/src/core/ozone
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2018-09-13 11:02:57 +0200
committerMichal Klocek <michal.klocek@qt.io>2019-02-15 10:28:02 +0000
commitaf30e7857e205990057735a07fe0974af9db8733 (patch)
tree2fdbb25f77db2212bab889ff30212a57d080de65 /src/core/ozone
parenta8a3ff9574806a5591413445b5a94338ceb0d701 (diff)
Support offscreen plugin with glx backend
Task-number: QTBUG-63346 Change-Id: Id475c6c88f79af8cf82610a40d07eaa3f6588d7d Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/core/ozone')
-rw-r--r--src/core/ozone/gl_context_qt.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/ozone/gl_context_qt.cpp b/src/core/ozone/gl_context_qt.cpp
index 7e913817e..c4a075544 100644
--- a/src/core/ozone/gl_context_qt.cpp
+++ b/src/core/ozone/gl_context_qt.cpp
@@ -130,9 +130,10 @@ void* GLContextHelper::getEGLDisplay()
void* GLContextHelper::getXDisplay()
{
- if (QGuiApplication::platformName() != QLatin1String("xcb"))
- return nullptr;
- return qApp->platformNativeInterface()->nativeResourceForScreen(QByteArrayLiteral("display"), qApp->primaryScreen());
+ QPlatformNativeInterface *pni = QGuiApplication::platformNativeInterface();
+ if (pni)
+ return pni->nativeResourceForScreen(QByteArrayLiteral("display"), qApp->primaryScreen());
+ return nullptr;
}
void* GLContextHelper::getNativeDisplay()