Allow minimizing of modal dialogs, simply meaning that their main window

will be minimized too. Also don't disable the minimize animation for the dialog.
(bnc#431378)


svn path=/trunk/KDE/kdebase/workspace/; revision=908237
icc-effect-5.14.5
Luboš Luňák 2009-01-09 14:07:03 +00:00
parent 7102a6d895
commit edcd0112fa
2 changed files with 16 additions and 2 deletions

View File

@ -636,11 +636,15 @@ bool Client::isMinimizable() const
if( !shown_mainwindow )
return true;
}
#if 0
// This is here because kicker's taskbar doesn't provide separate entries
// for windows with an explicitly given parent
// TODO: perhaps this should be redone
// Disabled for now, since at least modal dialogs should be minimizable
// (resulting in the mainwindow being minimized too).
if( transientFor() != NULL )
return false;
#endif
if( !wantsTabFocus() ) // SELI, TODO: - NET::Utility? why wantsTabFocus() - skiptaskbar? ?
return false;
return true;

View File

@ -387,10 +387,15 @@ void Workspace::updateMinimizedOfTransients( Client* c )
if( !(*it)->isMinimized()
&& !(*it)->isTopMenu() ) // topmenus are not minimized, they're hidden
{
(*it)->minimize( true ); // avoid animation
(*it)->minimize();
updateMinimizedOfTransients( (*it) );
}
}
if( c->isModal()) // if a modal dialog is minimized, minimize its mainwindow too
{
foreach( Client* c2, c->mainClients())
c2->minimize();
}
}
else
{ // else unmiminize the transients
@ -401,10 +406,15 @@ void Workspace::updateMinimizedOfTransients( Client* c )
if( (*it)->isMinimized()
&& !(*it)->isTopMenu())
{
(*it)->unminimize( true ); // avoid animation
(*it)->unminimize();
updateMinimizedOfTransients( (*it) );
}
}
if( c->isModal())
{
foreach( Client* c2, c->mainClients())
c2->unminimize();
}
}
}