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:
parent
4512d39171
commit
1f40973a83
2 changed files with 21 additions and 1 deletions
16
group.cpp
16
group.cpp
|
@ -74,6 +74,14 @@ bool performTransiencyCheck()
|
||||||
it2 != mains.end();
|
it2 != mains.end();
|
||||||
++it2 )
|
++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 ))
|
if( !(*it2)->transients_list.contains( *it1 ))
|
||||||
{
|
{
|
||||||
kdDebug() << "TC:" << *it1 << " has main client " << *it2 << " but main client does not have it as a transient" << endl;
|
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 != trans.end();
|
||||||
++it2 )
|
++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 ))
|
if( !(*it2)->mainClients().contains( *it1 ))
|
||||||
{
|
{
|
||||||
kdDebug() << "TC:" << *it1 << " has transient " << *it2 << " but transient does not have it as a main client" << endl;
|
kdDebug() << "TC:" << *it1 << " has transient " << *it2 << " but transient does not have it as a main client" << endl;
|
||||||
|
|
|
@ -446,7 +446,11 @@ Workspace::~Workspace()
|
||||||
{
|
{
|
||||||
// only release the window
|
// only release the window
|
||||||
(*it)->releaseWindow( true );
|
(*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();
|
for( UnmanagedList::ConstIterator it = unmanaged.begin();
|
||||||
it != unmanaged.end();
|
it != unmanaged.end();
|
||||||
|
|
Loading…
Reference in a new issue