On auto unshading, don't keep focus on the unshaded window, revert
focus to the previously active window. CCMAIL: 75302-done@bugs.kde.org svn path=/trunk/kdebase/kwin/; revision=288483
This commit is contained in:
parent
c2b1856bc8
commit
ea87eea812
3 changed files with 15 additions and 2 deletions
|
@ -339,10 +339,16 @@ void Workspace::requestFocus( Client* c, bool force )
|
|||
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())))
|
||||
return;
|
||||
|
||||
if( popup )
|
||||
popup->close();
|
||||
if( c == active_client )
|
||||
|
|
|
@ -672,6 +672,7 @@ void Client::setShade( ShadeMode mode )
|
|||
if( shade_mode == mode )
|
||||
return;
|
||||
bool was_shade = isShade();
|
||||
ShadeMode was_shade_mode = shade_mode;
|
||||
shade_mode = mode;
|
||||
if( was_shade == isShade())
|
||||
return; // no real change in shaded state
|
||||
|
@ -719,7 +720,12 @@ void Client::setShade( ShadeMode mode )
|
|||
shade_geometry_change = false;
|
||||
plainResize( s );
|
||||
if( isActive())
|
||||
workspace()->focusToNull();
|
||||
{
|
||||
if( was_shade_mode == ShadeHover )
|
||||
workspace()->activateNextClient( this );
|
||||
else
|
||||
workspace()->focusToNull();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -118,6 +118,7 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
|
|||
void gotFocusIn( const Client* );
|
||||
bool fakeRequestedActivity( Client* c );
|
||||
void unfakeActivity( Client* c );
|
||||
void activateNextClient( Client* c );
|
||||
bool focusChangeEnabled() { return block_focus == 0; }
|
||||
|
||||
void updateColormap();
|
||||
|
|
Loading…
Reference in a new issue