Attempt number 3251 at finally fixing #67914. This window grouping
will have to be reworked for 3.3. svn path=/trunk/kdebase/kwin/; revision=268607
This commit is contained in:
parent
064f1538c8
commit
225f12f1d3
1 changed files with 15 additions and 7 deletions
22
group.cpp
22
group.cpp
|
@ -438,10 +438,9 @@ void Client::cleanGrouping()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure that no group transient is considered transient
|
// Make sure that no group transient is considered transient
|
||||||
// for a window that is (directly or indirectly) transient for it.
|
// for a window that is (directly or indirectly) transient for it
|
||||||
// Group transients not being transient for each other is already
|
// (including another group transients).
|
||||||
// handled before calling addTransient(). Non-group transients
|
// Non-group transients not causing loops are checked in verifyTransientFor().
|
||||||
// not causing loops are checked in verifyTransientFor().
|
|
||||||
void Client::checkGroupTransients()
|
void Client::checkGroupTransients()
|
||||||
{
|
{
|
||||||
for( ClientList::ConstIterator it1 = group()->members().begin();
|
for( ClientList::ConstIterator it1 = group()->members().begin();
|
||||||
|
@ -461,11 +460,16 @@ void Client::checkGroupTransients()
|
||||||
cl = cl->transientFor())
|
cl = cl->transientFor())
|
||||||
{
|
{
|
||||||
if( cl == *it1 )
|
if( cl == *it1 )
|
||||||
{
|
{ // don't use removeTransient(), that would modify *it2 too
|
||||||
(*it2)->transients_list.remove( *it1 );
|
(*it2)->transients_list.remove( *it1 );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// if *it1 and *it2 are both group transients, and are transient for each other,
|
||||||
|
// make only *it2 transient for *it1 (i.e. subwindow), as *it2 came later,
|
||||||
|
// and should be therefore on top of *it1
|
||||||
|
if( (*it2)->groupTransient() && (*it1)->hasTransient( *it2, true ) && (*it2)->hasTransient( *it1, true ))
|
||||||
|
(*it2)->transients_list.remove( *it1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -554,6 +558,10 @@ void Client::addTransient( Client* cl )
|
||||||
transients_list.append( cl );
|
transients_list.append( cl );
|
||||||
// kdDebug() << "ADDTRANS:" << this << ":" << cl << endl;
|
// kdDebug() << "ADDTRANS:" << this << ":" << cl << endl;
|
||||||
// kdDebug() << kdBacktrace() << endl;
|
// kdDebug() << kdBacktrace() << endl;
|
||||||
|
// for( ClientList::ConstIterator it = transients_list.begin();
|
||||||
|
// it != transients_list.end();
|
||||||
|
// ++it )
|
||||||
|
// kdDebug() << "AT:" << (*it) << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::removeTransient( Client* cl )
|
void Client::removeTransient( Client* cl )
|
||||||
|
@ -706,9 +714,9 @@ void Client::checkGroup()
|
||||||
{
|
{
|
||||||
if( !(*it)->groupTransient()) // and its transient for group transients in the new group
|
if( !(*it)->groupTransient()) // and its transient for group transients in the new group
|
||||||
continue;
|
continue;
|
||||||
if( !transients_list.contains( *it )) // unless it's the other way around
|
addTransient( *it );
|
||||||
addTransient( *it );
|
|
||||||
}
|
}
|
||||||
|
checkGroupTransients();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue