Don't initialy minimize a window if it has some main window open,

but it was internall optimized away (e.g. one group transient plasma
dialog open, minimized, open another group transient dialog from plasma).


svn path=/trunk/KDE/kdebase/workspace/; revision=798569
This commit is contained in:
Luboš Luňák 2008-04-18 15:50:12 +00:00
parent 0af83a41ec
commit afa5700c7b
3 changed files with 12 additions and 1 deletions

View file

@ -72,6 +72,7 @@ class Client
bool groupTransient() const; bool groupTransient() const;
bool wasOriginallyGroupTransient() const; bool wasOriginallyGroupTransient() const;
ClientList mainClients() const; // call once before loop , is not indirect ClientList mainClients() const; // call once before loop , is not indirect
ClientList allMainClients() const; // call once before loop , is indirect
bool hasTransient( const Client* c, bool indirect ) const; bool hasTransient( const Client* c, bool indirect ) const;
const ClientList& transients() const; // is not indirect const ClientList& transients() const; // is not indirect
void checkTransient( Window w ); void checkTransient( Window w );

View file

@ -951,6 +951,14 @@ ClientList Client::mainClients() const
return result; return result;
} }
ClientList Client::allMainClients() const
{
ClientList result = mainClients();
foreach( const Client* cl, result )
result += cl->allMainClients();
return result;
}
Client* Client::findModal( bool allow_itself ) Client* Client::findModal( bool allow_itself )
{ {
for( ClientList::ConstIterator it = transients().begin(); for( ClientList::ConstIterator it = transients().begin();

View file

@ -345,7 +345,9 @@ bool Client::manage( Window w, bool isMapped )
if( !init_minimize && isTransient() && mainClients().count() > 0 ) if( !init_minimize && isTransient() && mainClients().count() > 0 )
{ {
bool visible_parent = false; bool visible_parent = false;
ClientList mainclients = mainClients(); // use allMainClients(), to include also main clients of group transients
// that have been optimized out in Client::checkGroupTransients()
ClientList mainclients = allMainClients();
for( ClientList::ConstIterator it = mainclients.begin(); for( ClientList::ConstIterator it = mainclients.begin();
it != mainclients.end(); it != mainclients.end();
++it ) ++it )