From 99c39998819cae0dd44c3520d4450456ee719645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 23 Apr 2011 16:14:30 +0200 Subject: [PATCH] Destroy overlay window on shutting down GLES compositing --- scene_opengl_egl.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scene_opengl_egl.cpp b/scene_opengl_egl.cpp index ede88de810..39e2bf7469 100644 --- a/scene_opengl_egl.cpp +++ b/scene_opengl_egl.cpp @@ -61,6 +61,11 @@ SceneOpenGL::SceneOpenGL(Workspace* ws) SceneOpenGL::~SceneOpenGL() { + if (!init_ok) { + // TODO this probably needs to clean up whatever has been created until the failure + wspace->destroyOverlay(); + return; + } foreach (Window * w, windows) delete w; // do cleanup after initBuffer() @@ -71,6 +76,9 @@ SceneOpenGL::~SceneOpenGL() eglReleaseThread(); SceneOpenGL::EffectFrame::cleanup(); checkGLError("Cleanup"); + if (wspace->overlayWindow()) { + wspace->destroyOverlay(); + } } bool SceneOpenGL::initTfp()