summaryrefslogtreecommitdiffstats
path: root/src/core/ozone/gl_context_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ozone/gl_context_qt.cpp')
-rw-r--r--src/core/ozone/gl_context_qt.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/ozone/gl_context_qt.cpp b/src/core/ozone/gl_context_qt.cpp
index 18181d310..7e913817e 100644
--- a/src/core/ozone/gl_context_qt.cpp
+++ b/src/core/ozone/gl_context_qt.cpp
@@ -130,8 +130,9 @@ void* GLContextHelper::getEGLDisplay()
void* GLContextHelper::getXDisplay()
{
- return qApp->platformNativeInterface()->nativeResourceForScreen(
- QByteArrayLiteral("display"), qApp->primaryScreen());
+ if (QGuiApplication::platformName() != QLatin1String("xcb"))
+ return nullptr;
+ return qApp->platformNativeInterface()->nativeResourceForScreen(QByteArrayLiteral("display"), qApp->primaryScreen());
}
void* GLContextHelper::getNativeDisplay()