adjust/fix behaviour of Modal Dialogs reg. Minimizing, Virtual Desktop change & Shading
BUG: 193611 BUG: 180195 svn path=/trunk/KDE/kdebase/workspace/; revision=1194907
This commit is contained in:
parent
884e8205cc
commit
746cdddf76
2 changed files with 20 additions and 2 deletions
17
client.cpp
17
client.cpp
|
@ -1058,7 +1058,6 @@ void Client::setShade( ShadeMode mode )
|
|||
discardWindowPixmap();
|
||||
updateVisibility();
|
||||
updateAllowedActions();
|
||||
workspace()->updateMinimizedOfTransients( this );
|
||||
if( decoration )
|
||||
decoration->shadeChange();
|
||||
updateWindowRules();
|
||||
|
@ -1499,6 +1498,7 @@ void Client::setDesktop( int desktop )
|
|||
desktop = qMin( workspace()->numberOfDesktops(), rules()->checkDesktop( desktop ));
|
||||
if( desk == desktop )
|
||||
return;
|
||||
|
||||
int was_desk = desk;
|
||||
desk = desktop;
|
||||
info->setDesktop( desktop );
|
||||
|
@ -1510,6 +1510,21 @@ void Client::setDesktop( int desktop )
|
|||
}
|
||||
if( decoration != NULL )
|
||||
decoration->desktopChange();
|
||||
|
||||
ClientList transients_stacking_order = workspace()->ensureStackingOrder( transients() );
|
||||
for( ClientList::ConstIterator it = transients_stacking_order.constBegin();
|
||||
it != transients_stacking_order.constEnd();
|
||||
++it )
|
||||
(*it)->setDesktop( desktop );
|
||||
|
||||
if( isModal()) // if a modal dialog is moved, move the mainwindow with it as otherwise
|
||||
// the (just moved) modal dialog will confusingly return to the mainwindow with
|
||||
// the next desktop change
|
||||
{
|
||||
foreach( Client* c2, mainClients())
|
||||
c2->setDesktop( desktop );
|
||||
}
|
||||
|
||||
workspace()->updateFocusChains( this, Workspace::FocusChainMakeFirst );
|
||||
updateVisibility();
|
||||
updateWindowRules();
|
||||
|
|
|
@ -404,12 +404,15 @@ Group* Workspace::findClientLeaderGroup( const Client* c ) const
|
|||
void Workspace::updateMinimizedOfTransients( Client* c )
|
||||
{
|
||||
// if mainwindow is minimized or shaded, minimize transients too
|
||||
if ( c->isMinimized() || c->isShade() )
|
||||
if ( c->isMinimized() )
|
||||
{
|
||||
for( ClientList::ConstIterator it = c->transients().constBegin();
|
||||
it != c->transients().constEnd();
|
||||
++it )
|
||||
{
|
||||
if ((*it)->isModal())
|
||||
continue; // there's no reason to hide modal dialogs with the main client
|
||||
// but to keep them to eg. watch progress or whatever
|
||||
if( !(*it)->isMinimized()
|
||||
&& !(*it)->isTopMenu() ) // topmenus are not minimized, they're hidden
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue