step into the focus chain at the beginning
if the index is 0, we close the circle, but if the index is -1 (invalid) we're "somewhere" and step into the focus chain - reasonably at the beginning BUG: 340594 REVIEW: 121024
This commit is contained in:
parent
b26ef9302a
commit
7747a38189
1 changed files with 4 additions and 1 deletions
|
@ -202,7 +202,10 @@ Client *FocusChain::nextMostRecentlyUsed(Client *reference) const
|
|||
return NULL;
|
||||
}
|
||||
const int index = m_mostRecentlyUsed.indexOf(reference);
|
||||
if (index == -1 || index == 0) {
|
||||
if (index == -1) {
|
||||
return m_mostRecentlyUsed.first();
|
||||
}
|
||||
if (index == 0) {
|
||||
return m_mostRecentlyUsed.last();
|
||||
}
|
||||
return m_mostRecentlyUsed.at(index - 1);
|
||||
|
|
Loading…
Reference in a new issue