From afa5700c7bc038f31d93b6a16365a9ef99cc919d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Fri, 18 Apr 2008 15:50:12 +0000 Subject: [PATCH] Don't initialy minimize a window if it has some main window open, but it was internall optimized away (e.g. one group transient plasma dialog open, minimized, open another group transient dialog from plasma). svn path=/trunk/KDE/kdebase/workspace/; revision=798569 --- client.h | 1 + group.cpp | 8 ++++++++ manage.cpp | 4 +++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/client.h b/client.h index 45db92af50..2f595bfba5 100644 --- a/client.h +++ b/client.h @@ -72,6 +72,7 @@ class Client bool groupTransient() const; bool wasOriginallyGroupTransient() const; ClientList mainClients() const; // call once before loop , is not indirect + ClientList allMainClients() const; // call once before loop , is indirect bool hasTransient( const Client* c, bool indirect ) const; const ClientList& transients() const; // is not indirect void checkTransient( Window w ); diff --git a/group.cpp b/group.cpp index 8774c2271b..5597679f28 100644 --- a/group.cpp +++ b/group.cpp @@ -951,6 +951,14 @@ ClientList Client::mainClients() const return result; } +ClientList Client::allMainClients() const + { + ClientList result = mainClients(); + foreach( const Client* cl, result ) + result += cl->allMainClients(); + return result; + } + Client* Client::findModal( bool allow_itself ) { for( ClientList::ConstIterator it = transients().begin(); diff --git a/manage.cpp b/manage.cpp index 1c4dda4776..0bb627df67 100644 --- a/manage.cpp +++ b/manage.cpp @@ -345,7 +345,9 @@ bool Client::manage( Window w, bool isMapped ) if( !init_minimize && isTransient() && mainClients().count() > 0 ) { bool visible_parent = false; - ClientList mainclients = mainClients(); + // use allMainClients(), to include also main clients of group transients + // that have been optimized out in Client::checkGroupTransients() + ClientList mainclients = allMainClients(); for( ClientList::ConstIterator it = mainclients.begin(); it != mainclients.end(); ++it )