Changeset View
Changeset View
Standalone View
Standalone View
useractions.cpp
Show First 20 Lines • Show All 1591 Lines • ▼ Show 20 Line(s) | 1578 | if (!switchWindow(c, direction, curPos, desktopNumber)) { | |||
---|---|---|---|---|---|
1592 | }; | 1592 | }; | ||
1593 | 1593 | | |||
1594 | switchWindow(c, direction, opposite(), desktopNumber); | 1594 | switchWindow(c, direction, opposite(), desktopNumber); | ||
1595 | } | 1595 | } | ||
1596 | } | 1596 | } | ||
1597 | 1597 | | |||
1598 | bool Workspace::switchWindow(AbstractClient *c, Direction direction, QPoint curPos, int d) | 1598 | bool Workspace::switchWindow(AbstractClient *c, Direction direction, QPoint curPos, int d) | ||
1599 | { | 1599 | { | ||
1600 | Client *switchTo = nullptr; | 1600 | AbstractClient *switchTo = nullptr; | ||
1601 | int bestScore = 0; | 1601 | int bestScore = 0; | ||
1602 | 1602 | | |||
1603 | ToplevelList clist = stackingOrder(); | 1603 | ToplevelList clist = stackingOrder(); | ||
1604 | for (ToplevelList::Iterator i = clist.begin(); i != clist.end(); ++i) { | 1604 | for (ToplevelList::Iterator i = clist.begin(); i != clist.end(); ++i) { | ||
1605 | Client *client = qobject_cast<Client*>(*i); | 1605 | auto client = qobject_cast<AbstractClient*>(*i); | ||
1606 | if (!client) { | 1606 | if (!client) { | ||
1607 | continue; | 1607 | continue; | ||
1608 | } | 1608 | } | ||
1609 | if (client->wantsTabFocus() && *i != c && | 1609 | if (client->wantsTabFocus() && *i != c && | ||
1610 | client->isOnDesktop(d) && !client->isMinimized() && (*i)->isOnCurrentActivity()) { | 1610 | client->isOnDesktop(d) && !client->isMinimized() && (*i)->isOnCurrentActivity()) { | ||
1611 | // Centre of the other window | 1611 | // Centre of the other window | ||
1612 | QPoint other(client->pos().x() + client->geometry().width() / 2, | 1612 | QPoint other(client->pos().x() + client->geometry().width() / 2, | ||
1613 | client->pos().y() + client->geometry().height() / 2); | 1613 | client->pos().y() + client->geometry().height() / 2); | ||
▲ Show 20 Lines • Show All 279 Lines • Show Last 20 Lines |