[plugins/qpa] Check egl error after a failure of eglMakeCurrent

This hopefully helps to figure out why eglMakeCurrent fails on
hwcomposer platform.
This commit is contained in:
Martin Gräßlin 2016-07-18 20:50:56 +02:00
parent dce3ea6a20
commit 54126e4571

View file

@ -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;
}