Version: (using KDE KDE 3.2.0) Installed from: Gentoo Packages OS: Linux A minor suggestion for the useful feature of automatically unshading a shaded window when the mouse hovers over it and then shading it again when the mouse leaves: The previously active window could become active again after auto-unshading another window.
CVS commit by lunakl: On auto unshading, don't keep focus on the unshaded window, revert focus to the previously active window. CCMAIL: 75302-done@bugs.kde.org M +7 -1 activation.cpp 2.19 M +7 -1 client.cpp 1.409 M +1 -0 workspace.h 1.164 --- kdebase/kwin/activation.cpp #2.18:2.19 @@ -340,4 +340,11 @@ void Workspace::clientHidden( Client* c { assert( !c->isShown( true ) || !c->isOnCurrentDesktop()); + activateNextClient( c ); + } + +// deactivates 'c' and activates next client +void Workspace::activateNextClient( Client* c ) + { + // if 'c' is not the active or the to-become active one, do nothing if( !( c == active_client || ( should_get_focus.count() > 0 && c == should_get_focus.last()))) --- kdebase/kwin/client.cpp #1.408:1.409 @@ -673,4 +673,5 @@ void Client::setShade( ShadeMode mode ) return; bool was_shade = isShade(); + ShadeMode was_shade_mode = shade_mode; shade_mode = mode; if( was_shade == isShade()) @@ -720,6 +721,11 @@ void Client::setShade( ShadeMode mode ) plainResize( s ); if( isActive()) + { + if( was_shade_mode == ShadeHover ) + workspace()->activateNextClient( this ); + else workspace()->focusToNull(); } + } else { --- kdebase/kwin/workspace.h #1.163:1.164 @@ -119,4 +119,5 @@ class Workspace : public QObject, public bool fakeRequestedActivity( Client* c ); void unfakeActivity( Client* c ); + void activateNextClient( Client* c ); bool focusChangeEnabled() { return block_focus == 0; }