Make sure the GLX context is destroyed before the window it's been

made current with. Even though it should be allowed to do it afterwards
it seems this can crash AIGLX.
http://lists.freedesktop.org/archives/xorg/2008-November/040168.html
BUG: 174782


svn path=/trunk/KDE/kdebase/workspace/; revision=882880
This commit is contained in:
Luboš Luňák 2008-11-11 15:06:45 +00:00
parent 21e596dcf8
commit 83ddb8f249

View file

@ -201,6 +201,8 @@ SceneOpenGL::~SceneOpenGL()
foreach( Window* w, windows )
delete w;
// do cleanup after initBuffer()
glXMakeCurrent( display(), None, NULL );
glXDestroyContext( display(), ctxbuffer );
if( wspace->overlayWindow())
{
if( hasGLXVersion( 1, 3 ))
@ -222,8 +224,6 @@ SceneOpenGL::~SceneOpenGL()
glXDestroyPixmap( display(), last_pixmap );
glXDestroyContext( display(), ctxdrawable );
}
glXMakeCurrent( display(), None, NULL );
glXDestroyContext( display(), ctxbuffer );
checkGLError( "Cleanup" );
}