Correct fix to prevent present windows from crashing.

CCMAIL: ubuntu@martin-graesslin.com

svn path=/trunk/KDE/kdebase/workspace/; revision=863746
This commit is contained in:
Lucas Murray 2008-09-23 03:16:36 +00:00
parent e353af4844
commit 7f690db225
2 changed files with 6 additions and 2 deletions

View file

@ -151,8 +151,6 @@ void PresentWindowsEffect::postPaintScreen()
// Update windows that are changing brightness or opacity // Update windows that are changing brightness or opacity
foreach( EffectWindow *w, m_windowData.keys() ) foreach( EffectWindow *w, m_windowData.keys() )
{ {
if( !w )
continue;
if( m_windowData[w].opacity > 0.0 && m_windowData[w].opacity < 1.0 ) if( m_windowData[w].opacity > 0.0 && m_windowData[w].opacity < 1.0 )
w->addRepaintFull(); w->addRepaintFull();
if( m_windowData[w].highlight > 0.0 && m_windowData[w].highlight < 1.0 ) if( m_windowData[w].highlight > 0.0 && m_windowData[w].highlight < 1.0 )
@ -261,6 +259,11 @@ void PresentWindowsEffect::windowClosed( EffectWindow *w )
rearrangeWindows(); rearrangeWindows();
} }
void PresentWindowsEffect::windowDeleted( EffectWindow *w )
{
m_windowData.remove( w );
}
bool PresentWindowsEffect::borderActivated( ElectricBorder border ) bool PresentWindowsEffect::borderActivated( ElectricBorder border )
{ {
if( effects->activeFullScreenEffect() && effects->activeFullScreenEffect() != this ) if( effects->activeFullScreenEffect() && effects->activeFullScreenEffect() != this )

View file

@ -80,6 +80,7 @@ class PresentWindowsEffect
// User interaction // User interaction
virtual void windowAdded( EffectWindow *w ); virtual void windowAdded( EffectWindow *w );
virtual void windowClosed( EffectWindow *w ); virtual void windowClosed( EffectWindow *w );
virtual void windowDeleted( EffectWindow *w );
virtual bool borderActivated( ElectricBorder border ); virtual bool borderActivated( ElectricBorder border );
virtual void windowInputMouseEvent( Window w, QEvent *e ); virtual void windowInputMouseEvent( Window w, QEvent *e );
virtual void grabbedKeyboardEvent( QKeyEvent *e ); virtual void grabbedKeyboardEvent( QKeyEvent *e );