Restore original glx context after using the temporary one for detecting,
this avoids visual freeze when reconfiguring. CCMAIL: rivolaks@hot.ee svn path=/trunk/KDE/kdebase/workspace/; revision=716819
This commit is contained in:
parent
8985ca0b7f
commit
2c9bee719e
1 changed files with 6 additions and 0 deletions
|
@ -32,6 +32,10 @@ CompositingPrefs::~CompositingPrefs()
|
|||
void CompositingPrefs::detect()
|
||||
{
|
||||
#ifdef HAVE_OPENGL
|
||||
// remember and later restore active context
|
||||
GLXContext oldcontext = glXGetCurrentContext();
|
||||
GLXDrawable olddrawable = glXGetCurrentDrawable();
|
||||
GLXDrawable oldreaddrawable = glXGetCurrentReadDrawable();
|
||||
if( createGLXContext() )
|
||||
{
|
||||
detectDriverAndVersion();
|
||||
|
@ -39,6 +43,8 @@ void CompositingPrefs::detect()
|
|||
|
||||
deleteGLXContext();
|
||||
}
|
||||
if( oldcontext != NULL )
|
||||
glXMakeContextCurrent( display(), olddrawable, oldreaddrawable, oldcontext );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue