Commit 578d34db authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Introduce Platform::findOutput(int) overload

This can be useful if there is a need to look up an output by id.
parent 6cfee149
......@@ -113,7 +113,7 @@ int OutputScreens::number(const QPoint &pos) const
AbstractOutput *OutputScreens::findOutput(int screen) const
{
return m_platform->enabledOutputs().value(screen);
return m_platform->findOutput(screen);
}
} // namespace
......@@ -163,6 +163,11 @@ void Platform::requestOutputsChange(KWaylandServer::OutputConfigurationInterface
config->setApplied();
}
AbstractOutput *Platform::findOutput(int screenId)
{
return enabledOutputs().value(screenId);
}
AbstractOutput *Platform::findOutput(const QByteArray &uuid)
{
const auto outs = outputs();
......
......@@ -410,6 +410,7 @@ public:
virtual Outputs enabledOutputs() const {
return Outputs();
}
AbstractOutput *findOutput(int screenId);
AbstractOutput *findOutput(const QByteArray &uuid);
/**
......
Markdown is supported
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