yet another focus-follows-mind attempt
svn path=/trunk/kdebase/kwin/; revision=56079
This commit is contained in:
parent
75a6430c8f
commit
678f92f146
1 changed files with 16 additions and 10 deletions
|
@ -1735,8 +1735,15 @@ void Workspace::setCurrentDesktop( int new_desktop ){
|
|||
Client* c = 0;
|
||||
|
||||
if ( options->focusPolicyIsReasonable()) {
|
||||
if (options->focusPolicy == Options::FocusFollowsMouse) {
|
||||
// Search in focus chain
|
||||
for( ClientList::ConstIterator it = focus_chain.fromLast(); it != focus_chain.end(); --it) {
|
||||
if ( (*it)->isVisible() && !(*it)->wantsTabFocus() ) {
|
||||
c = *it;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !c ) {
|
||||
for( ClientList::ConstIterator it = focus_chain.fromLast(); it != focus_chain.end(); --it) {
|
||||
if ( (*it)->isVisible() ) {
|
||||
c = *it;
|
||||
|
@ -1745,7 +1752,6 @@ void Workspace::setCurrentDesktop( int new_desktop ){
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (!c) {
|
||||
// Search top-most visible window
|
||||
for ( ClientList::ConstIterator it = stacking_order.fromLast(); it != stacking_order.end(); --it) {
|
||||
|
|
Loading…
Reference in a new issue