summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-11-27 11:46:00 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-11-29 16:18:15 +0000
commitf41c069d7ef133eeaa3fcc02b7a54add38129d8b (patch)
tree981c380d12cc2f2d591b81c5e9da689c821264e1 /src
parent4e4e178d3b7adc7aa0b812838b3fb06090ab1499 (diff)
Reinstate GetQtXDisplay
Is needed by the X11-services with no working Ozone equivalent for runtime detection of X11. Change-Id: Iac79b5e29b9a8ef92af35209f3df40eb91c738f7 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/core/chromium_overrides.cpp5
-rw-r--r--src/core/ozone/gl_context_qt.cpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/core/chromium_overrides.cpp b/src/core/chromium_overrides.cpp
index a497ddc46..841dcf4c9 100644
--- a/src/core/chromium_overrides.cpp
+++ b/src/core/chromium_overrides.cpp
@@ -92,6 +92,11 @@ void GetScreenInfoFromNativeWindow(QWindow* window, content::ScreenInfo* results
} // namespace QtWebEngineCore
+void *GetQtXDisplay()
+{
+ return GLContextHelper::getXDisplay();
+}
+
namespace content {
class WebContentsImpl;
class WebContentsView;
diff --git a/src/core/ozone/gl_context_qt.cpp b/src/core/ozone/gl_context_qt.cpp
index 1850380a2..ec49414b0 100644
--- a/src/core/ozone/gl_context_qt.cpp
+++ b/src/core/ozone/gl_context_qt.cpp
@@ -124,8 +124,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()