$KWIN_COMPOSE for overriding which compositing system to use

svn path=/branches/work/kwin_composite/; revision=593447
This commit is contained in:
Luboš Luňák 2006-10-07 21:17:30 +00:00
parent db41dd99cd
commit e194246f73

View file

@ -34,11 +34,26 @@ void Workspace::setupCompositing()
return;
if( scene != NULL )
return;
char type = 'O';
if( getenv( "KWIN_COMPOSE" ))
type = getenv( "KWIN_COMPOSE" )[ 0 ];
switch( type )
{
case 'B':
scene = new SceneBasic( this );
break;
case 'X':
scene = new SceneXrender( this );
break;
case 'O':
scene = new SceneOpenGL( this );
break;
default:
kDebug() << "No compositing" << endl;
return;
}
compositeTimer.start( 20 );
XCompositeRedirectSubwindows( display(), rootWindow(), CompositeRedirectManual );
// scene = new SceneBasic( this );
// scene = new SceneXrender( this );
scene = new SceneOpenGL( this );
if( dynamic_cast< SceneOpenGL* >( scene ))
kDebug() << "OpenGL compositing" << endl;
else if( dynamic_cast< SceneXrender* >( scene ))