AbstractEglBackend: only clean up OpenGL context if primary
This commit is contained in:
parent
74724065ae
commit
c5ea99cbe5
1 changed files with 8 additions and 6 deletions
|
@ -104,13 +104,15 @@ void AbstractEglBackend::teardown()
|
|||
|
||||
void AbstractEglBackend::cleanup()
|
||||
{
|
||||
cleanupGL();
|
||||
doneCurrent();
|
||||
eglDestroyContext(m_display, m_context);
|
||||
cleanupSurfaces();
|
||||
eglReleaseThread();
|
||||
kwinApp()->platform()->setSceneEglContext(EGL_NO_CONTEXT);
|
||||
kwinApp()->platform()->setSceneEglConfig(nullptr);
|
||||
if (isPrimary()) {
|
||||
cleanupGL();
|
||||
doneCurrent();
|
||||
eglDestroyContext(m_display, m_context);
|
||||
eglReleaseThread();
|
||||
kwinApp()->platform()->setSceneEglContext(EGL_NO_CONTEXT);
|
||||
kwinApp()->platform()->setSceneEglConfig(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void AbstractEglBackend::cleanupSurfaces()
|
||||
|
|
Loading…
Reference in a new issue