yet another focus-follows-mind attempt

svn path=/trunk/kdebase/kwin/; revision=56079
This commit is contained in:
Matthias Ettrich 2000-07-11 12:15:58 +00:00
parent 75a6430c8f
commit 678f92f146

View file

@ -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) {