| 497 | } |
| 498 | |
| 499 | void TabBoxHandler::createModel(bool partialReset) |
| 500 | { |
| 501 | d->clientModel()->createClientList(partialReset); |
| 502 | // TODO: C++11 use lambda function |
| 503 | bool lastRaised = false; |
| 504 | bool lastRaisedSucc = false; |
| 505 | const auto clients = stackingOrder(); |
| 506 | for (Window *window : clients) { |
| 507 | if (window == d->lastRaisedClient) { |
| 508 | lastRaised = true; |
| 509 | } |
| 510 | if (window == d->lastRaisedClientSucc) { |
| 511 | lastRaisedSucc = true; |
| 512 | } |
| 513 | } |
| 514 | if (d->lastRaisedClient && !lastRaised) { |
| 515 | d->lastRaisedClient = nullptr; |
| 516 | } |
| 517 | if (d->lastRaisedClientSucc && !lastRaisedSucc) { |
| 518 | d->lastRaisedClientSucc = nullptr; |
| 519 | } |
| 520 | } |
| 521 | |
| 522 | QModelIndex TabBoxHandler::first() const |
| 523 | { |
no test coverage detected