When a dialog is opened for a minimized window, minimize it too.

svn path=/trunk/KDE/kdebase/workspace/; revision=787046
This commit is contained in:
Luboš Luňák 2008-03-18 14:56:57 +00:00
parent 1875aa63a7
commit ff34ea9e79

View file

@ -345,6 +345,22 @@ bool Client::manage( Window w, bool isMapped )
if( (*it)->isShown( true )) if( (*it)->isShown( true ))
init_minimize = false; // SELI even e.g. for NET::Utility? init_minimize = false; // SELI even e.g. for NET::Utility?
} }
// if a dialog is shown for minimized window, minimize it too
if( !init_minimize && isTransient() && mainClients().count() > 0 )
{
bool visible_parent = false;
ClientList mainclients = mainClients();
for( ClientList::ConstIterator it = mainclients.begin();
it != mainclients.end();
++it )
if( (*it)->isShown( true ))
visible_parent = true;
if( !visible_parent )
{
init_minimize = true;
demandAttention();
}
}
if( init_minimize ) if( init_minimize )
minimize( true ); // no animation minimize( true ); // no animation