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( focusChangeEnabled())
|
||||||
{
|
{
|
||||||
if ( options->focusPolicyIsReasonable())
|
if ( options->focusPolicyIsReasonable())
|
||||||
{ // search the focus_chain for a client to transfer focus to
|
{ // search the focus_chain for a client to transfer focus to,
|
||||||
// if 'c' is transient, transfer focus to the first suitable mainwindow
|
// first try to transfer focus to the first suitable window in the group
|
||||||
Client* get_focus = NULL;
|
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;
|
for ( int i = focus_chain[ currentDesktop() ].size() - 1;
|
||||||
i >= 0;
|
i >= 0;
|
||||||
--i )
|
--i )
|
||||||
{
|
{
|
||||||
Client* ci = focus_chain[ currentDesktop() ].at( i );
|
Client* ci = focus_chain[ currentDesktop() ].at( i );
|
||||||
if( !ci->isShown( false )
|
if( c == ci || !ci->isShown( false )
|
||||||
|| !ci->isOnCurrentDesktop())
|
|| !ci->isOnCurrentDesktop())
|
||||||
continue;
|
continue;
|
||||||
if( options->separateScreenFocus )
|
if( options->separateScreenFocus )
|
||||||
|
@ -435,7 +435,7 @@ bool Workspace::activateNextClient( Client* c )
|
||||||
if( c == NULL && !ci->isOnScreen( activeScreen()))
|
if( c == NULL && !ci->isOnScreen( activeScreen()))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if( mainwindows.contains( ci ))
|
if( windows.contains( ci ))
|
||||||
{
|
{
|
||||||
get_focus = ci;
|
get_focus = ci;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue