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
master
Thomas Lübking 10 years ago
parent b26ef9302a
commit 7747a38189

@ -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…
Cancel
Save