Correctly handle windows that were closed but not yet deleted when the
present windows desktop effect is activated. CCBUG: 185127 CCBUG: 185239 BUG: 185856 svn path=/trunk/KDE/kdebase/workspace/; revision=934022
This commit is contained in:
parent
d69942d215
commit
27187f2c15
1 changed files with 3 additions and 8 deletions
|
@ -168,13 +168,11 @@ void PresentWindowsEffect::prePaintWindow( EffectWindow *w, WindowPrePaintData &
|
|||
{
|
||||
// TODO: We should also check to see if any windows are fading just in case fading takes longer
|
||||
// than moving the windows when the effect is deactivated.
|
||||
if( m_activated || m_motionManager.areWindowsMoving() )
|
||||
if(( m_activated || m_motionManager.areWindowsMoving() ) && m_windowData.contains( w ))
|
||||
{
|
||||
w->enablePainting( EffectWindow::PAINT_DISABLED_BY_MINIMIZE ); // Display always
|
||||
w->enablePainting( EffectWindow::PAINT_DISABLED_BY_DESKTOP );
|
||||
|
||||
assert( m_windowData.contains( w ));
|
||||
|
||||
// Calculate window's opacity
|
||||
// TODO: Minimized windows or windows not on the current desktop are only 75% visible?
|
||||
if( m_windowData[w].visible )
|
||||
|
@ -205,7 +203,7 @@ void PresentWindowsEffect::prePaintWindow( EffectWindow *w, WindowPrePaintData &
|
|||
|
||||
void PresentWindowsEffect::paintWindow( EffectWindow *w, int mask, QRegion region, WindowPaintData &data )
|
||||
{
|
||||
if( m_activated || m_motionManager.areWindowsMoving() )
|
||||
if(( m_activated || m_motionManager.areWindowsMoving() ) && m_windowData.contains( w ))
|
||||
{
|
||||
if( w->isDock() && m_showPanel )
|
||||
{
|
||||
|
@ -214,8 +212,6 @@ void PresentWindowsEffect::paintWindow( EffectWindow *w, int mask, QRegion regio
|
|||
return;
|
||||
}
|
||||
|
||||
assert( m_windowData.contains( w ));
|
||||
|
||||
// Apply opacity and brightness
|
||||
data.opacity *= m_windowData[w].opacity;
|
||||
data.brightness *= interpolate( 0.7, 1.0, m_windowData[w].highlight );
|
||||
|
@ -286,9 +282,8 @@ void PresentWindowsEffect::windowClosed( EffectWindow *w )
|
|||
|
||||
void PresentWindowsEffect::windowDeleted( EffectWindow *w )
|
||||
{
|
||||
if( !m_activated )
|
||||
if( !m_activated || !m_windowData.contains( w ))
|
||||
return;
|
||||
assert( m_windowData.contains( w ));
|
||||
delete m_windowData[w].textFrame;
|
||||
delete m_windowData[w].iconFrame;
|
||||
m_windowData.remove( w );
|
||||
|
|
Loading…
Reference in a new issue