Prevent dim inactive from crashing whenever the previous active window

is closed.

svn path=/trunk/KDE/kdebase/workspace/; revision=923835
icc-effect-5.14.5
Lucas Murray 2009-02-09 14:36:47 +00:00
parent 4d82d2291e
commit 1bc2f456d9
2 changed files with 7 additions and 0 deletions

View File

@ -97,6 +97,12 @@ bool DimInactiveEffect::dimWindow( const EffectWindow* w ) const
return true; // dim the rest
}
void DimInactiveEffect::windowDeleted( EffectWindow* w )
{
if( w == previousActive )
previousActive = NULL;
}
void DimInactiveEffect::windowActivated( EffectWindow* w )
{
if( active != NULL )

View File

@ -37,6 +37,7 @@ class DimInactiveEffect
virtual void reconfigure( ReconfigureFlags );
virtual void prePaintScreen( ScreenPrePaintData& data, int time );
virtual void paintWindow( EffectWindow* w, int mask, QRegion region, WindowPaintData& data );
virtual void windowDeleted( EffectWindow* w );
virtual void windowActivated( EffectWindow* c );
private:
bool dimWindow( const EffectWindow* w ) const;