diff --git a/effects/presentwindows.cpp b/effects/presentwindows.cpp index 734c75e7b9..5cf8a156f3 100644 --- a/effects/presentwindows.cpp +++ b/effects/presentwindows.cpp @@ -151,8 +151,6 @@ void PresentWindowsEffect::postPaintScreen() // Update windows that are changing brightness or opacity foreach( EffectWindow *w, m_windowData.keys() ) { - if( !w ) - continue; if( m_windowData[w].opacity > 0.0 && m_windowData[w].opacity < 1.0 ) w->addRepaintFull(); if( m_windowData[w].highlight > 0.0 && m_windowData[w].highlight < 1.0 ) @@ -261,6 +259,11 @@ void PresentWindowsEffect::windowClosed( EffectWindow *w ) rearrangeWindows(); } +void PresentWindowsEffect::windowDeleted( EffectWindow *w ) + { + m_windowData.remove( w ); + } + bool PresentWindowsEffect::borderActivated( ElectricBorder border ) { if( effects->activeFullScreenEffect() && effects->activeFullScreenEffect() != this ) diff --git a/effects/presentwindows.h b/effects/presentwindows.h index 54529524da..ac10faad4d 100644 --- a/effects/presentwindows.h +++ b/effects/presentwindows.h @@ -80,6 +80,7 @@ class PresentWindowsEffect // User interaction virtual void windowAdded( EffectWindow *w ); virtual void windowClosed( EffectWindow *w ); + virtual void windowDeleted( EffectWindow *w ); virtual bool borderActivated( ElectricBorder border ); virtual void windowInputMouseEvent( Window w, QEvent *e ); virtual void grabbedKeyboardEvent( QKeyEvent *e );