Backport: When the user lowers the active window with a shortcut or a

mouse action automatically focus the next available window.
CCBUG: 182146

svn path=/branches/KDE/4.2/kdebase/workspace/; revision=919003
This commit is contained in:
Lucas Murray 2009-01-31 09:38:56 +00:00
parent 87d613a38a
commit 01f6af00c9

View file

@ -571,6 +571,10 @@ bool Client::performMouseCommand( Options::MouseCommand command, const QPoint &g
break; break;
case Options::MouseLower: case Options::MouseLower:
workspace()->lowerClient( this ); workspace()->lowerClient( this );
// As this most likely makes the window no longer visible change the
// keyboard focus to the next available window.
//workspace()->activateNextClient( this ); // Doesn't work when we lower a child window
workspace()->activateClient( workspace()->topClientOnDesktop( workspace()->currentDesktop(), -1 ));
break; break;
case Options::MouseShade : case Options::MouseShade :
toggleShade(); toggleShade();
@ -948,7 +952,13 @@ void Workspace::slotWindowLower()
{ {
Client* c = active_popup_client ? active_popup_client : active_client; Client* c = active_popup_client ? active_popup_client : active_client;
if ( c ) if ( c )
{
lowerClient( c ); lowerClient( c );
// As this most likely makes the window no longer visible change the
// keyboard focus to the next available window.
//activateNextClient( c ); // Doesn't work when we lower a child window
activateClient( topClientOnDesktop( currentDesktop(), -1 ));
}
} }
/*! /*!