Avoid useless repeated processing of checking whether to unredirect.

svn path=/trunk/KDE/kdebase/workspace/; revision=863933
This commit is contained in:
Luboš Luňák 2008-09-23 14:51:21 +00:00
parent 2cac0dd4e8
commit e433f92374
2 changed files with 5 additions and 1 deletions

View file

@ -839,6 +839,8 @@ bool Toplevel::updateUnredirectedState()
void Toplevel::suspendUnredirect( bool suspend )
{
if( unredirectSuspend == suspend )
return;
unredirectSuspend = suspend;
workspace()->checkUnredirect();
}

View file

@ -227,7 +227,6 @@ void Scene::paintSimpleScreen( int orig_mask, QRegion region )
--i )
{
Window* w = stacking_order[ i ];
w->suspendUnredirect( true );
WindowPrePaintData data;
data.mask = orig_mask | ( w->isOpaque() ? PAINT_WINDOW_OPAQUE : PAINT_WINDOW_TRANSLUCENT );
w->resetPaintingEnabled();
@ -244,7 +243,10 @@ void Scene::paintSimpleScreen( int orig_mask, QRegion region )
kFatal( 1212 ) << "PAINT_WINDOW_TRANSFORMED without PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS!";
#endif
if( !w->isPaintingEnabled())
{
w->suspendUnredirect( true );
continue;
}
if( data.paint != region ) // prepaint added area to draw
painted_region |= data.paint; // make sure it makes it to the screen
// Schedule the window for painting