Changeset View
Changeset View
Standalone View
Standalone View
workspace.cpp
Show First 20 Lines • Show All 1714 Lines • ▼ Show 20 Line(s) | 1714 | if (Unmanaged *ret = Toplevel::findInList(unmanaged, func)) { | |||
---|---|---|---|---|---|
1715 | return ret; | 1715 | return ret; | ||
1716 | } | 1716 | } | ||
1717 | if (InternalClient *ret = Toplevel::findInList(m_internalClients, func)) { | 1717 | if (InternalClient *ret = Toplevel::findInList(m_internalClients, func)) { | ||
1718 | return ret; | 1718 | return ret; | ||
1719 | } | 1719 | } | ||
1720 | return nullptr; | 1720 | return nullptr; | ||
1721 | } | 1721 | } | ||
1722 | 1722 | | |||
1723 | void Workspace::forEachToplevel(std::function<void (Toplevel *)> func) | ||||
1724 | { | ||||
1725 | std::for_each(m_allClients.constBegin(), m_allClients.constEnd(), func); | ||||
1726 | std::for_each(desktops.constBegin(), desktops.constEnd(), func); | ||||
1727 | std::for_each(deleted.constBegin(), deleted.constEnd(), func); | ||||
1728 | std::for_each(unmanaged.constBegin(), unmanaged.constEnd(), func); | ||||
1729 | std::for_each(m_internalClients.constBegin(), m_internalClients.constEnd(), func); | ||||
1730 | } | ||||
1731 | | ||||
1723 | bool Workspace::hasClient(const AbstractClient *c) | 1732 | bool Workspace::hasClient(const AbstractClient *c) | ||
1724 | { | 1733 | { | ||
1725 | if (auto cc = dynamic_cast<const X11Client *>(c)) { | 1734 | if (auto cc = dynamic_cast<const X11Client *>(c)) { | ||
1726 | return hasClient(cc); | 1735 | return hasClient(cc); | ||
1727 | } else { | 1736 | } else { | ||
1728 | return findAbstractClient([c](const AbstractClient *test) { | 1737 | return findAbstractClient([c](const AbstractClient *test) { | ||
1729 | return test == c; | 1738 | return test == c; | ||
1730 | }) != nullptr; | 1739 | }) != nullptr; | ||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |