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
|
Minimizes this client plus its transients
|
||||||
*/
|
*/
|
||||||
void Client::minimize()
|
void Client::minimize( bool avoid_animation )
|
||||||
{
|
{
|
||||||
if ( !isMinimizable() || isMinimized())
|
if ( !isMinimizable() || isMinimized())
|
||||||
return;
|
return;
|
||||||
|
@ -508,7 +508,7 @@ void Client::minimize()
|
||||||
Notify::raise( Notify::Minimize );
|
Notify::raise( Notify::Minimize );
|
||||||
|
|
||||||
// SELI mainClients().isEmpty() ??? - and in unminimize() too
|
// SELI mainClients().isEmpty() ??? - and in unminimize() too
|
||||||
if ( mainClients().isEmpty() && isOnCurrentDesktop())
|
if ( mainClients().isEmpty() && isOnCurrentDesktop() && !avoid_animation )
|
||||||
animateMinimizeOrUnminimize( true ); // was visible or shaded
|
animateMinimizeOrUnminimize( true ); // was visible or shaded
|
||||||
|
|
||||||
setMappingState( IconicState );
|
setMappingState( IconicState );
|
||||||
|
@ -518,7 +518,7 @@ void Client::minimize()
|
||||||
workspace()->updateMinimizedOfTransients( this );
|
workspace()->updateMinimizedOfTransients( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::unminimize()
|
void Client::unminimize( bool avoid_animation )
|
||||||
{
|
{
|
||||||
if( !isMinimized())
|
if( !isMinimized())
|
||||||
return;
|
return;
|
||||||
|
@ -528,7 +528,7 @@ void Client::unminimize()
|
||||||
info->setState( 0, NET::Hidden );
|
info->setState( 0, NET::Hidden );
|
||||||
if( isOnCurrentDesktop())
|
if( isOnCurrentDesktop())
|
||||||
{
|
{
|
||||||
if( mainClients().isEmpty())
|
if( mainClients().isEmpty() && !avoid_animation )
|
||||||
animateMinimizeOrUnminimize( FALSE );
|
animateMinimizeOrUnminimize( FALSE );
|
||||||
if( isShown( false ))
|
if( isShown( false ))
|
||||||
setMappingState( NormalState );
|
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 bool belongToSameApplication( const Client* c1, const Client* c2, bool active_hack = false );
|
||||||
static void readIcons( Window win, QPixmap* icon, QPixmap* miniicon );
|
static void readIcons( Window win, QPixmap* icon, QPixmap* miniicon );
|
||||||
|
|
||||||
void minimize();
|
void minimize( bool avoid_animation = false );
|
||||||
void unminimize();
|
void unminimize( bool avoid_animation = false );
|
||||||
void closeWindow();
|
void closeWindow();
|
||||||
void killWindow();
|
void killWindow();
|
||||||
void maximize( MaximizeMode );
|
void maximize( MaximizeMode );
|
||||||
|
|
|
@ -173,7 +173,7 @@ void Workspace::updateMinimizedOfTransients( Client* c )
|
||||||
&& !(*it)->isShade()
|
&& !(*it)->isShade()
|
||||||
&& !(*it)->isTopMenu() ) // topmenus are not minimized, they're hidden
|
&& !(*it)->isTopMenu() ) // topmenus are not minimized, they're hidden
|
||||||
{
|
{
|
||||||
(*it)->minimize();
|
(*it)->minimize( true ); // avoid animation
|
||||||
updateMinimizedOfTransients( (*it) );
|
updateMinimizedOfTransients( (*it) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,7 @@ void Workspace::updateMinimizedOfTransients( Client* c )
|
||||||
if( (*it)->isMinimized()
|
if( (*it)->isMinimized()
|
||||||
&& !(*it)->isTopMenu())
|
&& !(*it)->isTopMenu())
|
||||||
{
|
{
|
||||||
(*it)->unminimize();
|
(*it)->unminimize( true ); // avoid animation
|
||||||
updateMinimizedOfTransients( (*it) );
|
updateMinimizedOfTransients( (*it) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -306,7 +306,7 @@ bool Client::manage( Window w, bool isMapped )
|
||||||
}
|
}
|
||||||
|
|
||||||
if( init_minimize )
|
if( init_minimize )
|
||||||
minimize();
|
minimize( true ); // no animation
|
||||||
|
|
||||||
// SELI this seems to be mainly for kstart and ksystraycmd
|
// SELI this seems to be mainly for kstart and ksystraycmd
|
||||||
// probably should be replaced by something better
|
// probably should be replaced by something better
|
||||||
|
|
Loading…
Reference in a new issue