When deciding where to transfer focus when a window is closed,
consider all windows in its group, not just its mainwindows. svn path=/trunk/KDE/kdebase/workspace/; revision=802097
This commit is contained in:
parent
e920946da5
commit
5b5ec479fa
1 changed files with 5 additions and 5 deletions
|
@ -416,16 +416,16 @@ bool Workspace::activateNextClient( Client* c )
|
|||
if( focusChangeEnabled())
|
||||
{
|
||||
if ( options->focusPolicyIsReasonable())
|
||||
{ // search the focus_chain for a client to transfer focus to
|
||||
// if 'c' is transient, transfer focus to the first suitable mainwindow
|
||||
{ // search the focus_chain for a client to transfer focus to,
|
||||
// first try to transfer focus to the first suitable window in the group
|
||||
Client* get_focus = NULL;
|
||||
const ClientList mainwindows = ( c != NULL ? c->mainClients() : ClientList());
|
||||
const ClientList windows = ( c != NULL ? c->group()->members() : ClientList());
|
||||
for ( int i = focus_chain[ currentDesktop() ].size() - 1;
|
||||
i >= 0;
|
||||
--i )
|
||||
{
|
||||
Client* ci = focus_chain[ currentDesktop() ].at( i );
|
||||
if( !ci->isShown( false )
|
||||
if( c == ci || !ci->isShown( false )
|
||||
|| !ci->isOnCurrentDesktop())
|
||||
continue;
|
||||
if( options->separateScreenFocus )
|
||||
|
@ -435,7 +435,7 @@ bool Workspace::activateNextClient( Client* c )
|
|||
if( c == NULL && !ci->isOnScreen( activeScreen()))
|
||||
continue;
|
||||
}
|
||||
if( mainwindows.contains( ci ))
|
||||
if( windows.contains( ci ))
|
||||
{
|
||||
get_focus = ci;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue