Commit 9479c0d6 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

Do not call randomly eglGetError() after eglMakeCurrent

If it failed, it will return accordingly, and then we get to call
eglGetError, only when it fails.
parent 13dcb468
......@@ -343,12 +343,7 @@ bool EglGbmBackend::makeContextCurrent(const Output &output) const
return false;
}
if (eglMakeCurrent(eglDisplay(), surface, surface, context()) == EGL_FALSE) {
qCCritical(KWIN_DRM) << "Make Context Current failed";
return false;
}
EGLint error = eglGetError();
if (error != EGL_SUCCESS) {
qCWarning(KWIN_DRM) << "Error occurred while creating context " << error;
qCCritical(KWIN_DRM) << "Make Context Current failed" << eglGetError();
return false;
}
return true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment