[kwin] Drop Predicate based Workspace::forEachClient
Migrates the last usage to the lambda based variant.
This commit is contained in:
parent
11d0176dc9
commit
fe5f7fb2f6
2 changed files with 3 additions and 21 deletions
|
@ -772,7 +772,6 @@ bool Workspace::waitForCompositingSetup()
|
|||
/**
|
||||
* Reread settings
|
||||
*/
|
||||
KWIN_PROCEDURE(CheckBorderSizesProcedure, Client, cl->checkBorderSizes(true));
|
||||
|
||||
void Workspace::slotReconfigure()
|
||||
{
|
||||
|
@ -794,9 +793,10 @@ void Workspace::slotReconfigure()
|
|||
deco->destroyPreviousPlugin();
|
||||
connect(deco->factory(), &KDecorationFactory::recreateDecorations, deco, &DecorationPlugin::recreateDecorations);
|
||||
} else {
|
||||
forEachClient(CheckBorderSizesProcedure());
|
||||
foreach (Client * c, clients)
|
||||
foreach (Client * c, clients) {
|
||||
c->checkBorderSizes(true);
|
||||
c->triggerDecorationRepaint();
|
||||
}
|
||||
}
|
||||
|
||||
RuleBook::self()->load();
|
||||
|
|
18
workspace.h
18
workspace.h
|
@ -73,8 +73,6 @@ public:
|
|||
bool hasClient(const Client*);
|
||||
|
||||
template<typename T> Client* findClient(T predicate) const;
|
||||
template<typename T1, typename T2> void forEachClient(T1 procedure, T2 predicate);
|
||||
template<typename T> void forEachClient(T procedure);
|
||||
void forEachClient(std::function<void (Client*)> func);
|
||||
Unmanaged *findUnmanaged(std::function<bool (const Unmanaged*)> func) const;
|
||||
/**
|
||||
|
@ -671,16 +669,6 @@ inline Client* Workspace::findClient(T predicate) const
|
|||
return NULL;
|
||||
}
|
||||
|
||||
template< typename T1, typename T2 >
|
||||
inline void Workspace::forEachClient(T1 procedure, T2 predicate)
|
||||
{
|
||||
for (ClientList::ConstIterator it = clients.constBegin(); it != clients.constEnd(); ++it)
|
||||
if (predicate(const_cast<const Client*>(*it)))
|
||||
procedure(*it);
|
||||
for (ClientList::ConstIterator it = desktops.constBegin(); it != desktops.constEnd(); ++it)
|
||||
if (predicate(const_cast<const Client*>(*it)))
|
||||
procedure(*it);
|
||||
}
|
||||
|
||||
inline
|
||||
void Workspace::forEachClient(std::function< void (Client*) > func)
|
||||
|
@ -689,12 +677,6 @@ void Workspace::forEachClient(std::function< void (Client*) > func)
|
|||
std::for_each(desktops.constBegin(), desktops.constEnd(), func);
|
||||
}
|
||||
|
||||
template< typename T >
|
||||
inline void Workspace::forEachClient(T procedure)
|
||||
{
|
||||
return forEachClient(procedure, TruePredicate());
|
||||
}
|
||||
|
||||
inline
|
||||
void Workspace::forEachUnmanaged(std::function< void (Unmanaged*) > func)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue