From 070b0971cc82dc30c2375629e1845416c8139e67 Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Sun, 28 Nov 1999 20:17:57 +0000 Subject: [PATCH] be smarter with shaded windows: when shading, iconify any non-shaded transients. svn path=/trunk/kdebase/kwin/; revision=35354 --- client.cpp | 4 ++++ workspace.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/client.cpp b/client.cpp index 72477412e8..8a9ef523fa 100644 --- a/client.cpp +++ b/client.cpp @@ -1137,6 +1137,8 @@ int Client::maximumHeight() const void Client::iconify() { + if ( isShade() ) + setShade( FALSE ); if ( workspace()->iconifyMeansWithdraw( this ) ) { setMappingState( WithdrawnState ); hide(); @@ -1431,6 +1433,8 @@ void Client::setShade( bool s ) if ( isActive() ) workspace()->requestFocus( this ); } + + workspace()->iconifyOrDeiconifyTransientsOf( this ); } diff --git a/workspace.cpp b/workspace.cpp index fb2860eafa..94665b54f3 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -754,9 +754,11 @@ void Workspace::activateClient( 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) { - if ( (*it)->transientFor() == c->window() && !(*it)->isIconified() ) { + if ( (*it)->transientFor() == c->window() + && !(*it)->isIconified() + && !(*it)->isShade() ) { (*it)->setMappingState( IconicState ); (*it)->hide(); iconifyOrDeiconifyTransientsOf( (*it) );