From edcd0112fa036a6fbd1cf64e4326c5ae374c9975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Fri, 9 Jan 2009 14:07:03 +0000 Subject: [PATCH] Allow minimizing of modal dialogs, simply meaning that their main window will be minimized too. Also don't disable the minimize animation for the dialog. (bnc#431378) svn path=/trunk/KDE/kdebase/workspace/; revision=908237 --- client.cpp | 4 ++++ group.cpp | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/client.cpp b/client.cpp index 6eb751e974..4e86f953af 100644 --- a/client.cpp +++ b/client.cpp @@ -636,11 +636,15 @@ bool Client::isMinimizable() const if( !shown_mainwindow ) return true; } +#if 0 // This is here because kicker's taskbar doesn't provide separate entries // for windows with an explicitly given parent // TODO: perhaps this should be redone + // Disabled for now, since at least modal dialogs should be minimizable + // (resulting in the mainwindow being minimized too). if( transientFor() != NULL ) return false; +#endif if( !wantsTabFocus() ) // SELI, TODO: - NET::Utility? why wantsTabFocus() - skiptaskbar? ? return false; return true; diff --git a/group.cpp b/group.cpp index 348bd70c7d..0b90b2ca5b 100644 --- a/group.cpp +++ b/group.cpp @@ -387,10 +387,15 @@ void Workspace::updateMinimizedOfTransients( Client* c ) if( !(*it)->isMinimized() && !(*it)->isTopMenu() ) // topmenus are not minimized, they're hidden { - (*it)->minimize( true ); // avoid animation + (*it)->minimize(); updateMinimizedOfTransients( (*it) ); } } + if( c->isModal()) // if a modal dialog is minimized, minimize its mainwindow too + { + foreach( Client* c2, c->mainClients()) + c2->minimize(); + } } else { // else unmiminize the transients @@ -401,10 +406,15 @@ void Workspace::updateMinimizedOfTransients( Client* c ) if( (*it)->isMinimized() && !(*it)->isTopMenu()) { - (*it)->unminimize( true ); // avoid animation + (*it)->unminimize(); updateMinimizedOfTransients( (*it) ); } } + if( c->isModal()) + { + foreach( Client* c2, c->mainClients()) + c2->unminimize(); + } } }