Prevent the fade effect from constantly issuing repaint requests when it
is not needed. Prevents desktop grid excessive CPU usage. CCBUG: 182997 svn path=/trunk/KDE/kdebase/workspace/; revision=920960
This commit is contained in:
parent
9e9c18796f
commit
d0b6642abd
1 changed files with 5 additions and 2 deletions
|
@ -42,8 +42,11 @@ void FadeEffect::reconfigure( ReconfigureFlags )
|
||||||
// Add all existing windows to the window list
|
// Add all existing windows to the window list
|
||||||
// TODO: Enabling desktop effects should trigger windowAdded() on all windows
|
// TODO: Enabling desktop effects should trigger windowAdded() on all windows
|
||||||
windows.clear();
|
windows.clear();
|
||||||
|
if( !fadeWindows )
|
||||||
|
return;
|
||||||
foreach( EffectWindow *w, effects->stackingOrder() )
|
foreach( EffectWindow *w, effects->stackingOrder() )
|
||||||
windows[ w ].opacity = 1.0;
|
if( w && isFadeWindow( w )) // TODO: Apparently w can == NULL here?
|
||||||
|
windows[ w ] = WindowInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FadeEffect::prePaintScreen( ScreenPrePaintData& data, int time )
|
void FadeEffect::prePaintScreen( ScreenPrePaintData& data, int time )
|
||||||
|
@ -76,7 +79,7 @@ void FadeEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data, int
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
effects->prePaintWindow( w, data, time );
|
effects->prePaintWindow( w, data, time );
|
||||||
if( windows.contains( w ) && !w->isPaintingEnabled())
|
if( windows.contains( w ) && !w->isPaintingEnabled() && !effects->activeFullScreenEffect() )
|
||||||
{ // if the window isn't to be painted, then let's make sure
|
{ // if the window isn't to be painted, then let's make sure
|
||||||
// to track its progress
|
// to track its progress
|
||||||
if( windows[ w ].fadeInStep < 1.0
|
if( windows[ w ].fadeInStep < 1.0
|
||||||
|
|
Loading…
Reference in a new issue