Fix dialog<->parent handling to also work with group transient dialogs.

svn path=/branches/work/kwin_composite/; revision=603396
This commit is contained in:
Luboš Luňák 2006-11-08 19:29:29 +00:00
parent aeafa63a94
commit 8036be5f52

View file

@ -78,8 +78,8 @@ void DialogParentEffect::windowActivated( Toplevel* t )
if ( c && c->isModal() ) if ( c && c->isModal() )
{ {
// c is a modal dialog // c is a modal dialog
Client* parent = c->transientFor(); ClientList mainclients = c->mainClients();
if ( parent ) foreach( Client* parent, mainclients )
parent->addDamageFull(); parent->addDamageFull();
} }
} }
@ -93,8 +93,8 @@ void DialogParentEffect::windowDeleted( Toplevel* t )
if ( c && c->isModal() ) if ( c && c->isModal() )
{ {
// c is a modal dialog // c is a modal dialog
Client* parent = c->transientFor(); ClientList mainclients = c->mainClients();
if ( parent ) foreach( Client* parent, mainclients )
parent->addDamageFull(); parent->addDamageFull();
} }
} }
@ -107,7 +107,7 @@ bool DialogParentEffect::hasModalWindow( Toplevel* t )
// Check if any of the direct transients (children) of this window is modal // Check if any of the direct transients (children) of this window is modal
for( ClientList::ConstIterator it = c->transients().begin(); it != c->transients().end(); ++it ) for( ClientList::ConstIterator it = c->transients().begin(); it != c->transients().end(); ++it )
if( (*it)->isModal() && (*it)->transientFor() == c ) if( (*it)->isModal())
return true; return true;
return false; return false;