From 70167b748d4c5dd7b0eabcafa6c31b688f52d698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 15 Jul 2016 08:44:31 +0200 Subject: [PATCH] [platforms/x11] Add more warning on failure to create EGL context Some error conditions did not have a warning, so all we got is "Could not initialize rendering context". Which is not helpful to figure out what is going wrong. --- plugins/platforms/x11/common/eglonxbackend.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/platforms/x11/common/eglonxbackend.cpp b/plugins/platforms/x11/common/eglonxbackend.cpp index 323ba1b9fb..79b1f87ea4 100644 --- a/plugins/platforms/x11/common/eglonxbackend.cpp +++ b/plugins/platforms/x11/common/eglonxbackend.cpp @@ -179,8 +179,10 @@ bool EglOnXBackend::initRenderingContext() setHavePlatformBase(havePlatformBase); if (havePlatformBase) { // Make sure that the X11 platform is supported - if (!hasClientExtension(QByteArrayLiteral("EGL_EXT_platform_x11"))) + if (!hasClientExtension(QByteArrayLiteral("EGL_EXT_platform_x11"))) { + qCWarning(KWIN_CORE) << "EGL_EXT_platform_base is supported, but EGL_EXT_platform_x11 is not. Cannot create EGLDisplay on X11"; return false; + } const int attribs[] = { EGL_PLATFORM_X11_SCREEN_EXT, m_x11ScreenNumber, @@ -192,8 +194,10 @@ bool EglOnXBackend::initRenderingContext() dpy = eglGetDisplay(m_x11Display); } - if (dpy == EGL_NO_DISPLAY) + if (dpy == EGL_NO_DISPLAY) { + qCWarning(KWIN_CORE) << "Failed to get the EGLDisplay"; return false; + } setEglDisplay(dpy); initEglAPI();