Simplify EffectHandler::findWindow(uuid) implementation
With Workspace::findToplevel() code paths in findWindow() can be unified.
This commit is contained in:
parent
beecf8c9d4
commit
c773649377
1 changed files with 2 additions and 9 deletions
|
@ -1125,15 +1125,8 @@ EffectWindow *EffectsHandlerImpl::findWindow(QWindow *w) const
|
|||
|
||||
EffectWindow *EffectsHandlerImpl::findWindow(const QUuid &id) const
|
||||
{
|
||||
if (const auto client = workspace()->findAbstractClient([&id](const Window *c) {
|
||||
return c->internalId() == id;
|
||||
})) {
|
||||
return client->effectWindow();
|
||||
}
|
||||
if (const auto unmanaged = workspace()->findUnmanaged([&id](const Unmanaged *c) {
|
||||
return c->internalId() == id;
|
||||
})) {
|
||||
return unmanaged->effectWindow();
|
||||
if (Window *window = workspace()->findToplevel(id)) {
|
||||
return window->effectWindow();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue