Put OpenGL commands in magnifier in #ifdef KWIN_HAVE_OPENGL_COMPOSITING and effects->compositingType() == KWin::OpenGLCompositing.

svn path=/trunk/KDE/kdebase/workspace/; revision=960004
This commit is contained in:
Martin Gräßlin 2009-04-27 18:34:05 +00:00
parent 1b728c3337
commit 8f19fcd767

View file

@ -96,7 +96,9 @@ void MagnifierEffect::paintScreen( int mask, QRegion region, ScreenPaintData& da
data2.yTranslate = - int( cursor.y() * ( zoom - 1 )); data2.yTranslate = - int( cursor.y() * ( zoom - 1 ));
effects->paintScreen( mask, region, data2 ); effects->paintScreen( mask, region, data2 );
PaintClipper::pop( area ); PaintClipper::pop( area );
// ## TODO this should be inside KWIN_HAVE_OPENGL_COMPOSITING #ifdef KWIN_HAVE_OPENGL_COMPOSITING
if( effects->compositingType() == KWin::OpenGLCompositing )
{
glPushAttrib( GL_CURRENT_BIT ); glPushAttrib( GL_CURRENT_BIT );
glColor4f( 0, 0, 0, 1 ); // black glColor4f( 0, 0, 0, 1 ); // black
for( PaintClipper::Iterator iterator; for( PaintClipper::Iterator iterator;
@ -124,6 +126,8 @@ void MagnifierEffect::paintScreen( int mask, QRegion region, ScreenPaintData& da
} }
glPopAttrib(); glPopAttrib();
} }
#endif
}
} }
void MagnifierEffect::postPaintScreen() void MagnifierEffect::postPaintScreen()