Redo how transients raise their mainwindows - simply raise everything
in the group, instead of trying to walk up the possibly complicated parents tree. svn path=/trunk/KDE/kdebase/workspace/; revision=788489
This commit is contained in:
parent
90240a5d61
commit
9eec690d9e
2 changed files with 17 additions and 15 deletions
28
layers.cpp
28
layers.cpp
|
@ -289,7 +289,7 @@ void Workspace::raiseOrLowerClient( Client *c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Workspace::lowerClient( Client* c )
|
void Workspace::lowerClient( Client* c, bool nogroup )
|
||||||
{
|
{
|
||||||
if ( !c )
|
if ( !c )
|
||||||
return;
|
return;
|
||||||
|
@ -302,14 +302,17 @@ void Workspace::lowerClient( Client* c )
|
||||||
|
|
||||||
unconstrained_stacking_order.removeAll( c );
|
unconstrained_stacking_order.removeAll( c );
|
||||||
unconstrained_stacking_order.prepend( c );
|
unconstrained_stacking_order.prepend( c );
|
||||||
if( c->isTransient())
|
if( !nogroup && c->isTransient() )
|
||||||
{
|
{
|
||||||
// lower also mainclients, in their reversed stacking order
|
// lower also all windows in the group, in their reversed stacking order
|
||||||
ClientList mainclients = ensureStackingOrder( c->mainClients());
|
ClientList wins = ensureStackingOrder( c->group()->members());
|
||||||
for( int i = mainclients.size() - 1;
|
for( int i = wins.size() - 1;
|
||||||
i >= 0;
|
i >= 0;
|
||||||
--i )
|
--i )
|
||||||
lowerClient( mainclients[ i ] );
|
{
|
||||||
|
if( wins[ i ] != c )
|
||||||
|
lowerClient( wins[ i ], true );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( c == most_recently_raised )
|
if ( c == most_recently_raised )
|
||||||
|
@ -344,7 +347,7 @@ void Workspace::lowerClientWithinApplication( Client* c )
|
||||||
// ignore mainwindows
|
// ignore mainwindows
|
||||||
}
|
}
|
||||||
|
|
||||||
void Workspace::raiseClient( Client* c )
|
void Workspace::raiseClient( Client* c, bool nogroup )
|
||||||
{
|
{
|
||||||
if ( !c )
|
if ( !c )
|
||||||
return;
|
return;
|
||||||
|
@ -355,13 +358,12 @@ void Workspace::raiseClient( Client* c )
|
||||||
|
|
||||||
StackingUpdatesBlocker blocker( this );
|
StackingUpdatesBlocker blocker( this );
|
||||||
|
|
||||||
if( c->isTransient())
|
if( !nogroup && c->isTransient())
|
||||||
{
|
{
|
||||||
ClientList mainclients = ensureStackingOrder( c->mainClients());
|
ClientList wins = ensureStackingOrder( c->group()->members());
|
||||||
for( ClientList::ConstIterator it = mainclients.begin();
|
foreach( Client* c2, wins )
|
||||||
it != mainclients.end();
|
if( c2 != c )
|
||||||
++it )
|
raiseClient( c2, true );
|
||||||
raiseClient( *it );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unconstrained_stacking_order.removeAll( c );
|
unconstrained_stacking_order.removeAll( c );
|
||||||
|
|
|
@ -129,8 +129,8 @@ class Workspace : public QObject, public KDecorationDefines
|
||||||
|
|
||||||
QPoint adjustClientPosition( Client* c, QPoint pos );
|
QPoint adjustClientPosition( Client* c, QPoint pos );
|
||||||
QRect adjustClientSize( Client* c, QRect moveResizeGeom, int mode );
|
QRect adjustClientSize( Client* c, QRect moveResizeGeom, int mode );
|
||||||
void raiseClient( Client* c );
|
void raiseClient( Client* c, bool nogroup = false );
|
||||||
void lowerClient( Client* c );
|
void lowerClient( Client* c, bool nogroup = false );
|
||||||
void raiseClientRequest( Client* c, NET::RequestSource src, Time timestamp );
|
void raiseClientRequest( Client* c, NET::RequestSource src, Time timestamp );
|
||||||
void lowerClientRequest( Client* c, NET::RequestSource src, Time timestamp );
|
void lowerClientRequest( Client* c, NET::RequestSource src, Time timestamp );
|
||||||
void restackClientUnderActive( Client* );
|
void restackClientUnderActive( Client* );
|
||||||
|
|
Loading…
Reference in a new issue