Minor memory leak patch to present windows.
svn path=/trunk/KDE/kdebase/workspace/; revision=936614
This commit is contained in:
parent
358264a828
commit
6d57716d53
2 changed files with 5 additions and 7 deletions
|
@ -272,17 +272,16 @@ void PresentWindowsEffect::windowAdded( EffectWindow *w )
|
|||
|
||||
void PresentWindowsEffect::windowClosed( EffectWindow *w )
|
||||
{
|
||||
if( !m_activated )
|
||||
return;
|
||||
if( m_highlightedWindow == w )
|
||||
setHighlightedWindow( findFirstWindow() );
|
||||
assert( m_windowData.contains( w ));
|
||||
if( !m_windowData.contains( w ))
|
||||
return;
|
||||
m_windowData[w].visible = false; // TODO: Fix this so they do actually fade out
|
||||
}
|
||||
|
||||
void PresentWindowsEffect::windowDeleted( EffectWindow *w )
|
||||
{
|
||||
if( !m_activated || !m_windowData.contains( w ))
|
||||
if( !m_windowData.contains( w ))
|
||||
return;
|
||||
delete m_windowData[w].textFrame;
|
||||
delete m_windowData[w].iconFrame;
|
||||
|
@ -1148,6 +1147,8 @@ void PresentWindowsEffect::setActive( bool active, bool closingTab )
|
|||
// Add every single window to m_windowData (Just calling [w] creates it)
|
||||
foreach( EffectWindow *w, effects->stackingOrder() )
|
||||
{
|
||||
if( m_windowData.contains( w )) // Happens if we reactivate before the ending animation finishes
|
||||
continue;
|
||||
m_windowData[w].visible = isVisibleWindow( w );
|
||||
m_windowData[w].opacity = 0.0;
|
||||
if( w->isOnCurrentDesktop() && !w->isMinimized() )
|
||||
|
|
|
@ -26,8 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <QPixmap>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
|
@ -48,7 +46,6 @@ class PresentWindowsEffect
|
|||
double highlight;
|
||||
int slot;
|
||||
int slot_distance;
|
||||
QPixmap icon;
|
||||
EffectFrame* textFrame;
|
||||
EffectFrame* iconFrame;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue