From ff34ea9e79bf23b146f4f9e6dea6ea41f78be462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 18 Mar 2008 14:56:57 +0000 Subject: [PATCH] When a dialog is opened for a minimized window, minimize it too. svn path=/trunk/KDE/kdebase/workspace/; revision=787046 --- manage.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/manage.cpp b/manage.cpp index 0051de248d..039cecf5f8 100644 --- a/manage.cpp +++ b/manage.cpp @@ -345,6 +345,22 @@ bool Client::manage( Window w, bool isMapped ) if( (*it)->isShown( true )) init_minimize = false; // SELI even e.g. for NET::Utility? } + // if a dialog is shown for minimized window, minimize it too + if( !init_minimize && isTransient() && mainClients().count() > 0 ) + { + bool visible_parent = false; + ClientList mainclients = mainClients(); + for( ClientList::ConstIterator it = mainclients.begin(); + it != mainclients.end(); + ++it ) + if( (*it)->isShown( true )) + visible_parent = true; + if( !visible_parent ) + { + init_minimize = true; + demandAttention(); + } + } if( init_minimize ) minimize( true ); // no animation