Introduce Platform::findOutput(int) overload
This can be useful if there is a need to look up an output by id.master
parent
6cfee149ea
commit
578d34dba9
|
@ -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);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue