Add a Workspace::findAbstractClient
Like Workspace::findClient just that it operates on AbstractClient and the m_allClients instead of clients.
This commit is contained in:
parent
cb400d7128
commit
0bf2b1de0f
2 changed files with 12 additions and 0 deletions
|
@ -1615,6 +1615,17 @@ Client *Workspace::findClient(std::function<bool (const Client*)> func) const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
AbstractClient *Workspace::findAbstractClient(std::function<bool (const AbstractClient*)> func) const
|
||||
{
|
||||
if (AbstractClient *ret = Toplevel::findInList(m_allClients, func)) {
|
||||
return ret;
|
||||
}
|
||||
if (Client *ret = Toplevel::findInList(desktops, func)) {
|
||||
return ret;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Unmanaged *Workspace::findUnmanaged(std::function<bool (const Unmanaged*)> func) const
|
||||
{
|
||||
return Toplevel::findInList(unmanaged, func);
|
||||
|
|
|
@ -105,6 +105,7 @@ public:
|
|||
* @see findClient(Predicate, xcb_window_t)
|
||||
*/
|
||||
Client *findClient(std::function<bool (const Client*)> func) const;
|
||||
AbstractClient *findAbstractClient(std::function<bool (const AbstractClient*)> func) const;
|
||||
/**
|
||||
* @brief Finds the Client matching the given match @p predicate for the given window.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue