Get name and refresh rate from output device
Summary: We can simplify the AbstractWaylandOutput code some more by getting name and refresh rate of an output from the always available output device object. Test Plan: Tested with DRM, Wayland nested and virtual backends. Reviewers: #kwin Subscribers: davidedmundson, apol, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D23546
This commit is contained in:
parent
836f88495b
commit
e8fada8a36
1 changed files with 3 additions and 8 deletions
|
@ -46,10 +46,8 @@ AbstractWaylandOutput::~AbstractWaylandOutput()
|
||||||
|
|
||||||
QString AbstractWaylandOutput::name() const
|
QString AbstractWaylandOutput::name() const
|
||||||
{
|
{
|
||||||
if (!m_waylandOutput) {
|
return QStringLiteral("%1 %2").arg(m_waylandOutputDevice->manufacturer()).arg(
|
||||||
return i18n("unknown");
|
m_waylandOutputDevice->model());
|
||||||
}
|
|
||||||
return QStringLiteral("%1 %2").arg(m_waylandOutput->manufacturer()).arg(m_waylandOutput->model());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QRect AbstractWaylandOutput::geometry() const
|
QRect AbstractWaylandOutput::geometry() const
|
||||||
|
@ -64,10 +62,7 @@ QSize AbstractWaylandOutput::physicalSize() const
|
||||||
|
|
||||||
int AbstractWaylandOutput::refreshRate() const
|
int AbstractWaylandOutput::refreshRate() const
|
||||||
{
|
{
|
||||||
if (!m_waylandOutput) {
|
return m_waylandOutputDevice->refreshRate();
|
||||||
return 60000;
|
|
||||||
}
|
|
||||||
return m_waylandOutput->refreshRate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QPoint AbstractWaylandOutput::globalPos() const
|
QPoint AbstractWaylandOutput::globalPos() const
|
||||||
|
|
Loading…
Reference in a new issue