From 54126e4571d879cd2d7118df93e5fb5a39654843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 18 Jul 2016 20:50:56 +0200 Subject: [PATCH] [plugins/qpa] Check egl error after a failure of eglMakeCurrent This hopefully helps to figure out why eglMakeCurrent fails on hwcomposer platform. --- plugins/qpa/sharingplatformcontext.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/qpa/sharingplatformcontext.cpp b/plugins/qpa/sharingplatformcontext.cpp index db844412c3..72c84a84ca 100644 --- a/plugins/qpa/sharingplatformcontext.cpp +++ b/plugins/qpa/sharingplatformcontext.cpp @@ -47,6 +47,10 @@ bool SharingPlatformContext::makeCurrent(QPlatformSurface *surface) return true; } qCWarning(KWIN_QPA) << "Failed to make context current"; + EGLint error = eglGetError(); + if (error != EGL_SUCCESS) { + qCWarning(KWIN_QPA) << "EGL error code: " << error; + } return false; }