better fix for the click-raise problem (one that actually keeps the taskbar functional...)

svn path=/trunk/kdebase/kwin/; revision=176420
This commit is contained in:
Matthias Ettrich 2002-09-08 12:57:41 +00:00
parent b301468a80
commit e579db0c68

View file

@ -2539,8 +2539,15 @@ void Client::getWindowProtocols(){
*/ */
void Client::takeFocus( bool force ) void Client::takeFocus( bool force )
{ {
if ( !force && ( isTopMenu() || ( isDock() && staysOnTop() ) ) ) if ( !force && ( isTopMenu() || isDock() ) ) {
if ( isDock() && !staysOnTop() && workspace()->activeClient() ) {
// the active client might get covered by a dock
// window. Re-enable ourselves passive grabs to make
// click-raise work again
workspace()->activeClient()->windowWrapper()->setActive( FALSE );
}
return; // toplevel menus and dock windows don't take focus if not forced return; // toplevel menus and dock windows don't take focus if not forced
}
if ( input ) { if ( input ) {
// Matthias Ettrich says to comment it so that we avoid two consecutive setActive // Matthias Ettrich says to comment it so that we avoid two consecutive setActive