@ -1685,6 +1685,12 @@ bool Workspace::hasClient(const AbstractClient *c)
return false;
}
void Workspace::forEachAbstractClient(std::function< void (AbstractClient*) > func)
{
std::for_each(m_allClients.constBegin(), m_allClients.constEnd(), func);
std::for_each(desktops.constBegin(), desktops.constEnd(), func);
} // namespace
#include "workspace.moc"
@ -116,6 +116,7 @@ public:
*/
Client *findClient(Predicate predicate, xcb_window_t w) const;
void forEachClient(std::function<void (Client*)> func);
void forEachAbstractClient(std::function<void (AbstractClient*)> func);
Unmanaged *findUnmanaged(std::function<bool (const Unmanaged*)> func) const;
/**
* @brief Finds the Unmanaged with the given window id.