From 1e29215b2e40a38b9324a719888749e12a74e99c Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Tue, 8 Jan 2019 14:01:52 +0100 Subject: C++ examples: Delay compositor initialization until GL is ready When running with xcb_egl, the platform plugin's native interface is not always ready immediately after the QGuiApplication constructor is done. Calling QWaylandCompositor::create() at the time of initializeGL() makes sure that everything is ready. Change-Id: I9e5e434ff85b92a45caddfd393439a4ffe3bcdc6 Reviewed-by: Johan Helsing --- examples/wayland/minimal-cpp/window.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'examples/wayland/minimal-cpp/window.cpp') diff --git a/examples/wayland/minimal-cpp/window.cpp b/examples/wayland/minimal-cpp/window.cpp index 673e15fd8..4dd7c1499 100644 --- a/examples/wayland/minimal-cpp/window.cpp +++ b/examples/wayland/minimal-cpp/window.cpp @@ -68,6 +68,7 @@ void Window::setCompositor(Compositor *comp) { void Window::initializeGL() { m_textureBlitter.create(); + emit glReady(); } void Window::paintGL() -- cgit v1.2.3