Merging from old trunk:

r613666 | lunakl | 2006-12-14 16:35:36 +0100 (Thu, 14 Dec 2006) | 3 lines

Few more consistency checks.


svn path=/trunk/KDE/kdebase/workspace/; revision=659479
This commit is contained in:
Luboš Luňák 2007-04-30 09:46:31 +00:00
parent 4512d39171
commit 1f40973a83
2 changed files with 21 additions and 1 deletions

View file

@ -74,6 +74,14 @@ bool performTransiencyCheck()
it2 != mains.end();
++it2 )
{
if( !Workspace::self()->clients.contains( *it2 )
&& !Workspace::self()->desktops.contains( *it2 ))
{
kDebug() << "TC:" << *it1 << " has non-existent main client " << endl;
kDebug() << "TC2:" << *it2 << endl; // this may crash
ret = false;
continue;
}
if( !(*it2)->transients_list.contains( *it1 ))
{
kdDebug() << "TC:" << *it1 << " has main client " << *it2 << " but main client does not have it as a transient" << endl;
@ -86,6 +94,14 @@ bool performTransiencyCheck()
it2 != trans.end();
++it2 )
{
if( !Workspace::self()->clients.contains( *it2 )
&& !Workspace::self()->desktops.contains( *it2 ))
{
kDebug() << "TC:" << *it1 << " has non-existent transient " << endl;
kDebug() << "TC2:" << *it2 << endl; // this may crash
ret = false;
continue;
}
if( !(*it2)->mainClients().contains( *it1 ))
{
kdDebug() << "TC:" << *it1 << " has transient " << *it2 << " but transient does not have it as a main client" << endl;

View file

@ -446,7 +446,11 @@ Workspace::~Workspace()
{
// only release the window
(*it)->releaseWindow( true );
// no removeClient() is called !
// No removeClient() is called, it does more than just removing.
// However, remove from some lists to e.g. prevent performTransiencyCheck()
// from crashing.
clients.remove( *it );
desktops.remove( *it );
}
for( UnmanagedList::ConstIterator it = unmanaged.begin();
it != unmanaged.end();