be smarter with shaded windows: when shading, iconify any non-shaded

transients.

svn path=/trunk/kdebase/kwin/; revision=35354
This commit is contained in:
Matthias Ettrich 1999-11-28 20:17:57 +00:00
parent bd1e4878ba
commit 070b0971cc
2 changed files with 8 additions and 2 deletions

View file

@ -1137,6 +1137,8 @@ int Client::maximumHeight() const
void Client::iconify() void Client::iconify()
{ {
if ( isShade() )
setShade( FALSE );
if ( workspace()->iconifyMeansWithdraw( this ) ) { if ( workspace()->iconifyMeansWithdraw( this ) ) {
setMappingState( WithdrawnState ); setMappingState( WithdrawnState );
hide(); hide();
@ -1431,6 +1433,8 @@ void Client::setShade( bool s )
if ( isActive() ) if ( isActive() )
workspace()->requestFocus( this ); workspace()->requestFocus( this );
} }
workspace()->iconifyOrDeiconifyTransientsOf( this );
} }

View file

@ -754,9 +754,11 @@ void Workspace::activateClient( Client* c)
void Workspace::iconifyOrDeiconifyTransientsOf( Client* c ) void Workspace::iconifyOrDeiconifyTransientsOf( Client* c )
{ {
if ( c->isIconified() ) { if ( c->isIconified() || c->isShade() ) {
for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it) { for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it) {
if ( (*it)->transientFor() == c->window() && !(*it)->isIconified() ) { if ( (*it)->transientFor() == c->window()
&& !(*it)->isIconified()
&& !(*it)->isShade() ) {
(*it)->setMappingState( IconicState ); (*it)->setMappingState( IconicState );
(*it)->hide(); (*it)->hide();
iconifyOrDeiconifyTransientsOf( (*it) ); iconifyOrDeiconifyTransientsOf( (*it) );