When a new window appears in a group, make sure group transients are

transient for it.

svn path=/trunk/kdebase/kwin/; revision=266151
This commit is contained in:
Luboš Luňák 2003-11-10 18:08:59 +00:00
parent 07b08d5d99
commit 70645a691a
2 changed files with 21 additions and 6 deletions

View file

@ -436,7 +436,7 @@ void Client::cleanGrouping()
}
// Make sure that no group transient is considered transient
// for a window trat is (directly or indirectly) for it.
// for a window trat is (directly or indirectly) transient for it.
// Group transients not being transient for each other is already
// handled before calling addTransient().
void Client::checkGroupTransients()
@ -634,6 +634,7 @@ Client* Client::findModal()
// but it should be used only to find the group, not for anything else
void Client::checkGroup()
{
bool check_group_transients = false;
if( window_group != None )
{
Group* new_group = workspace()->findGroup( window_group );
@ -650,6 +651,7 @@ void Client::checkGroup()
in_group->removeMember( this );
in_group = new_group;
in_group->addMember( this );
check_group_transients = true;
}
}
else
@ -664,6 +666,7 @@ void Client::checkGroup()
in_group->removeMember( this );
in_group = transientFor()->group();
in_group->addMember( this );
check_group_transients = true;
}
}
else // not transient without a group, put it in its own group
@ -681,6 +684,18 @@ void Client::checkGroup()
}
}
}
if( check_group_transients )
{
for( ClientList::ConstIterator it = group()->members().begin();
it != group()->members().end();
++it )
{
if( !(*it)->groupTransient())
continue;
if( !transients_list.contains( *it ))
addTransient( *it );
}
}
}

View file

@ -513,10 +513,10 @@ void Workspace::updateCurrentTopMenu()
it != menu_client->transients().end();
++it )
if( (*it)->isTopMenu())
{
menubar = *it;
break;
}
{
menubar = *it;
break;
}
if( menubar != NULL || !menu_client->isTransient())
break;
if( menu_client->isModal() || menu_client->transientFor() == NULL )
@ -547,7 +547,7 @@ void Workspace::updateCurrentTopMenu()
}
}
// kdDebug() << "CURRENT TOPMENU:" << menubar << endl;
// kdDebug() << "CURRENT TOPMENU:" << menubar << ":" << active_client << endl;
if ( menubar )
menubar->hideClient( false );