Commit c7736493 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Simplify EffectHandler::findWindow(uuid) implementation

With Workspace::findToplevel() code paths in findWindow() can be
unified.
parent beecf8c9
Pipeline #168583 passed with stage
in 13 minutes and 53 seconds
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment