From 7fd1af437b4f53d7201d42b592e35176995c2bc0 Mon Sep 17 00:00:00 2001 From: Giulio Camuffo Date: Mon, 5 Jan 2015 13:38:53 +0200 Subject: [PATCH] Allow retrieving the egl display for a QWindow on wayland This allows a compositor running with the wayland qpa inside another compositor to provide EGL to its clients. Change-Id: I308fb909c8168955148be152bf314a53c0e5ca43 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/wayland/qwaylandnativeinterface.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp b/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp index fca176ac715..b4bb0604dba 100644 --- a/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp +++ b/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp @@ -86,6 +86,8 @@ void *QWaylandNativeInterface::nativeResourceForWindow(const QByteArray &resourc if (lowerCaseResource == "surface") { return ((QWaylandWindow *) window->handle())->object(); } + if (lowerCaseResource == "egldisplay" && m_integration->clientBufferIntegration()) + return m_integration->clientBufferIntegration()->nativeResource(QWaylandClientBufferIntegration::EglDisplay); return NULL; }