diff --git a/client.cpp b/client.cpp index 0967c4710a..4924b96d85 100644 --- a/client.cpp +++ b/client.cpp @@ -498,7 +498,7 @@ bool Client::isMinimizable() const /*! Minimizes this client plus its transients */ -void Client::minimize() +void Client::minimize( bool avoid_animation ) { if ( !isMinimizable() || isMinimized()) return; @@ -508,7 +508,7 @@ void Client::minimize() Notify::raise( Notify::Minimize ); // SELI mainClients().isEmpty() ??? - and in unminimize() too - if ( mainClients().isEmpty() && isOnCurrentDesktop()) + if ( mainClients().isEmpty() && isOnCurrentDesktop() && !avoid_animation ) animateMinimizeOrUnminimize( true ); // was visible or shaded setMappingState( IconicState ); @@ -518,7 +518,7 @@ void Client::minimize() workspace()->updateMinimizedOfTransients( this ); } -void Client::unminimize() +void Client::unminimize( bool avoid_animation ) { if( !isMinimized()) return; @@ -528,7 +528,7 @@ void Client::unminimize() info->setState( 0, NET::Hidden ); if( isOnCurrentDesktop()) { - if( mainClients().isEmpty()) + if( mainClients().isEmpty() && !avoid_animation ) animateMinimizeOrUnminimize( FALSE ); if( isShown( false )) setMappingState( NormalState ); diff --git a/client.h b/client.h index ed53d027bc..e205a7e75e 100644 --- a/client.h +++ b/client.h @@ -266,8 +266,8 @@ class Client : public QObject, public KDecorationDefines static bool belongToSameApplication( const Client* c1, const Client* c2, bool active_hack = false ); static void readIcons( Window win, QPixmap* icon, QPixmap* miniicon ); - void minimize(); - void unminimize(); + void minimize( bool avoid_animation = false ); + void unminimize( bool avoid_animation = false ); void closeWindow(); void killWindow(); void maximize( MaximizeMode ); diff --git a/group.cpp b/group.cpp index 57c23ae0db..ae576a8dc6 100644 --- a/group.cpp +++ b/group.cpp @@ -173,7 +173,7 @@ void Workspace::updateMinimizedOfTransients( Client* c ) && !(*it)->isShade() && !(*it)->isTopMenu() ) // topmenus are not minimized, they're hidden { - (*it)->minimize(); + (*it)->minimize( true ); // avoid animation updateMinimizedOfTransients( (*it) ); } } @@ -187,7 +187,7 @@ void Workspace::updateMinimizedOfTransients( Client* c ) if( (*it)->isMinimized() && !(*it)->isTopMenu()) { - (*it)->unminimize(); + (*it)->unminimize( true ); // avoid animation updateMinimizedOfTransients( (*it) ); } } diff --git a/manage.cpp b/manage.cpp index 463c1c4194..cd7a58421f 100644 --- a/manage.cpp +++ b/manage.cpp @@ -306,7 +306,7 @@ bool Client::manage( Window w, bool isMapped ) } if( init_minimize ) - minimize(); + minimize( true ); // no animation // SELI this seems to be mainly for kstart and ksystraycmd // probably should be replaced by something better