diff --git a/workspace.cpp b/workspace.cpp index bc994042d3..07f7fe0415 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1615,6 +1615,17 @@ Client *Workspace::findClient(std::function func) const return nullptr; } +AbstractClient *Workspace::findAbstractClient(std::function 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 func) const { return Toplevel::findInList(unmanaged, func); diff --git a/workspace.h b/workspace.h index 065306432a..440a7fa6c7 100644 --- a/workspace.h +++ b/workspace.h @@ -105,6 +105,7 @@ public: * @see findClient(Predicate, xcb_window_t) */ Client *findClient(std::function func) const; + AbstractClient *findAbstractClient(std::function func) const; /** * @brief Finds the Client matching the given match @p predicate for the given window. *