From 88e699aea2a4cf6c21b6d9036e36af06bf9ce95d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 20 Apr 2004 15:19:47 +0000 Subject: [PATCH] Fix #66868. svn path=/trunk/kdebase/kwin/; revision=305173 --- client.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/client.cpp b/client.cpp index 12cbd7483d..83eb946f65 100644 --- a/client.cpp +++ b/client.cpp @@ -483,18 +483,29 @@ void Client::hideClient( bool hide ) */ bool Client::isMinimizable() const { - if( !wantsTabFocus() // SELI co NET::Utility? a proc wantsTabFocus() - skiptaskbar? ? - || ( isSpecialWindow() && !isOverride())) + if( isSpecialWindow() && !isOverride()) return false; - if( isTransient()) - { // transients may be minimized only if mainwindow is not shown + if( isTransient() && !wantsTabFocus()) + { // #66868 - let other xmms windows be minimized when the mainwindow is minimized + bool shown_mainwindow = false; ClientList mainclients = mainClients(); for( ClientList::ConstIterator it = mainclients.begin(); it != mainclients.end(); ++it ) + { if( (*it)->isShown( true )) - return false; + shown_mainwindow = true; + } + if( !shown_mainwindow ) + return true; } + // 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 + if( transientFor() != NULL ) + return false; + if( !wantsTabFocus()) // SELI - NET::Utility? why wantsTabFocus() - skiptaskbar? ? + return false; return true; }