Avoid minimize animation when a newly managed window requests to be
initially minimized. svn path=/trunk/kdebase/kwin/; revision=292900
This commit is contained in:
parent
aee628e008
commit
648fb3ed22
4 changed files with 9 additions and 9 deletions
|
@ -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 );
|
||||
|
|
4
client.h
4
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 );
|
||||
|
|
|
@ -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) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue