Discard Deleted windows when finishing compositing, so that they're

not reused if compositing is started again.
BUG: 152914


svn path=/trunk/KDE/kdebase/workspace/; revision=838646
This commit is contained in:
Luboš Luňák 2008-07-28 11:49:43 +00:00
parent da7c6873d0
commit 20a2c36677
3 changed files with 11 additions and 0 deletions

View file

@ -253,6 +253,9 @@ void Workspace::finishCompositing()
}
delete popup; // force re-creation of the Alt+F3 popup (opacity option)
popup = NULL;
// discard all Deleted windows (#152914)
while( !deleted.isEmpty())
deleted.first()->discard( Allowed );
#endif
}

View file

@ -48,6 +48,13 @@ Deleted* Deleted::create( Toplevel* c )
return d;
}
// to be used only from Workspace::finishCompositing()
void Deleted::discard( allowed_t )
{
delete_refcount = 0;
delete this;
}
void Deleted::copyToDeleted( Toplevel* c )
{
assert( dynamic_cast< Deleted* >( c ) == NULL );

View file

@ -35,6 +35,7 @@ class Deleted
// used by effects to keep the window around for e.g. fadeout effects when it's destroyed
void refWindow();
void unrefWindow( bool delay = false );
void discard( allowed_t );
virtual int desktop() const;
virtual QPoint clientPos() const;
virtual QSize clientSize() const;