Add overload Workspace::hasClient(const AbstractClient*)
Delegates to hasClient(const Client*) if the AbstractClient is a Client. Needs to be extended for other AbstractClient subclasses.
This commit is contained in:
parent
792745c963
commit
1b02837d0b
2 changed files with 10 additions and 0 deletions
|
@ -1654,6 +1654,15 @@ Toplevel *Workspace::findToplevel(std::function<bool (const Toplevel*)> func) co
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
bool Workspace::hasClient(const AbstractClient *c)
|
||||
{
|
||||
if (auto cc = dynamic_cast<const Client*>(c)) {
|
||||
return hasClient(cc);
|
||||
}
|
||||
// TODO: test for ShellClient
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
#include "workspace.moc"
|
||||
|
|
|
@ -74,6 +74,7 @@ public:
|
|||
bool workspaceEvent(QEvent*);
|
||||
|
||||
bool hasClient(const Client*);
|
||||
bool hasClient(const AbstractClient*);
|
||||
|
||||
/**
|
||||
* @brief Finds the first Client matching the condition expressed by passed in @p func.
|
||||
|
|
Loading…
Reference in a new issue