diff --git a/activation.cpp b/activation.cpp index 80baae4636..b0c7a8d034 100644 --- a/activation.cpp +++ b/activation.cpp @@ -712,7 +712,7 @@ void Client::setActive( bool act) autoRaiseTimer = 0; } - if( shade_mode == ShadeActivated ) + if( !active && shade_mode == ShadeActivated ) setShade( ShadeNormal ); StackingUpdatesBlocker blocker( workspace()); diff --git a/events.cpp b/events.cpp index 540b7d9193..6a8a7ac4d3 100644 --- a/events.cpp +++ b/events.cpp @@ -587,19 +587,19 @@ void Client::mapRequestEvent( XMapRequestEvent* e ) // also copied in clientMessage() if( isMinimized()) unminimize(); - else if( isShade()) + if( isShade()) setShade( ShadeNone ); - else // it's on another virtual desktop - { - if( workspace()->allowClientActivation( this )) - workspace()->activateClient( this ); - else - demandAttention(); - } - break; - case NormalState: - // TODO fake MapNotify? - break; + if( !isOnCurrentDesktop()) + { + if( workspace()->allowClientActivation( this )) + workspace()->activateClient( this ); + else + demandAttention(); + } + break; + case NormalState: + // TODO fake MapNotify? + break; } } @@ -668,9 +668,9 @@ void Client::clientMessageEvent( XClientMessageEvent* e ) { // copied from mapRequest() if( isMinimized()) unminimize(); - else if( isShade()) + if( isShade()) setShade( ShadeNone ); - else // it's on another virtual desktop + if( !isOnCurrentDesktop()) { if( workspace()->allowClientActivation( this )) workspace()->activateClient( this ); diff --git a/geometry.cpp b/geometry.cpp index bf9776e30b..4cf35d97b8 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1456,7 +1456,7 @@ void Client::handleMoveResize( int x, int y, int x_root, int y_root ) } // ShadeHover or ShadeActive, ShadeNormal was already avoided above - if ( mode != Center && shade_mode != ShadeNone ) + if ( mode != Center && shade_mode != ShadeNone ) // SHADE setShade( ShadeNone ); QPoint globalPos( x_root, y_root );