wayland: Send missing output-device properties
Currently, we don't set eisa id and the serial number.
This commit is contained in:
parent
5619a2939a
commit
9d9747490e
8 changed files with 21 additions and 4 deletions
|
@ -78,6 +78,11 @@ void AbstractWaylandOutput::setGlobalPos(const QPoint &pos)
|
|||
}
|
||||
}
|
||||
|
||||
QString AbstractWaylandOutput::eisaId() const
|
||||
{
|
||||
return m_eisaId;
|
||||
}
|
||||
|
||||
QString AbstractWaylandOutput::manufacturer() const
|
||||
{
|
||||
return m_manufacturer;
|
||||
|
@ -197,9 +202,12 @@ void AbstractWaylandOutput::setCurrentModeInternal(const QSize &size, int refres
|
|||
}
|
||||
|
||||
void AbstractWaylandOutput::initialize(const QString &model, const QString &manufacturer,
|
||||
const QString &eisaId, const QString &serialNumber,
|
||||
const QString &uuid, const QSize &physicalSize,
|
||||
const QVector<Mode> &modes, const QByteArray &edid)
|
||||
{
|
||||
m_serialNumber = serialNumber;
|
||||
m_eisaId = eisaId;
|
||||
m_manufacturer = manufacturer.isEmpty() ? i18n("unknown") : manufacturer;
|
||||
m_model = model;
|
||||
m_physicalSize = physicalSize;
|
||||
|
|
|
@ -98,6 +98,7 @@ public:
|
|||
return m_internal;
|
||||
}
|
||||
|
||||
QString eisaId() const;
|
||||
QString manufacturer() const override;
|
||||
QString model() const override;
|
||||
QString serialNumber() const override;
|
||||
|
@ -136,6 +137,7 @@ Q_SIGNALS:
|
|||
|
||||
protected:
|
||||
void initialize(const QString &model, const QString &manufacturer,
|
||||
const QString &eisaId, const QString &serialNumber,
|
||||
const QString &uuid, const QSize &physicalSize,
|
||||
const QVector<Mode> &modes, const QByteArray &edid);
|
||||
|
||||
|
@ -170,6 +172,7 @@ protected:
|
|||
|
||||
private:
|
||||
QString m_name;
|
||||
QString m_eisaId;
|
||||
QString m_manufacturer;
|
||||
QString m_model;
|
||||
QString m_serialNumber;
|
||||
|
|
|
@ -240,7 +240,9 @@ void DrmOutput::initOutputDevice(drmModeConnector *connector)
|
|||
}
|
||||
|
||||
setName(m_conn->connectorName());
|
||||
initialize(m_conn->modelName(), m_conn->edid()->manufacturerString(), m_uuid, m_conn->physicalSize(), modes, m_conn->edid()->raw());
|
||||
initialize(m_conn->modelName(), m_conn->edid()->manufacturerString(),
|
||||
m_conn->edid()->eisaId(), m_conn->edid()->serialNumber(),
|
||||
m_uuid, m_conn->physicalSize(), modes, m_conn->edid()->raw());
|
||||
}
|
||||
|
||||
bool DrmOutput::isCurrentMode(const drmModeModeInfo *mode) const
|
||||
|
|
|
@ -70,7 +70,7 @@ void FramebufferOutput::init(const QSize &pixelSize, const QSize &physicalSize)
|
|||
mode.size = pixelSize;
|
||||
mode.flags = ModeFlag::Current;
|
||||
mode.refreshRate = refreshRate;
|
||||
initialize("model_TODO", "manufacturer_TODO", "UUID_TODO", physicalSize, { mode }, {});
|
||||
initialize("model_TODO", "manufacturer_TODO", "eisa_TODO", "serial_TODO", "UUID_TODO", physicalSize, { mode }, {});
|
||||
}
|
||||
|
||||
void FramebufferOutput::vblank(std::chrono::nanoseconds timestamp)
|
||||
|
|
|
@ -55,6 +55,8 @@ void VirtualOutput::init(const QPoint &logicalPosition, const QSize &pixelSize)
|
|||
mode.refreshRate = refreshRate;
|
||||
initialize(QByteArray("model_").append(QByteArray::number(m_identifier)),
|
||||
QByteArray("manufacturer_").append(QByteArray::number(m_identifier)),
|
||||
QByteArray("eisa_").append(QByteArray::number(m_identifier)),
|
||||
QByteArray("serial_").append(QByteArray::number(m_identifier)),
|
||||
QByteArray("UUID_").append(QByteArray::number(m_identifier)),
|
||||
pixelSize, { mode }, QByteArray("EDID_").append(QByteArray::number(m_identifier)));
|
||||
setGeometry(QRect(logicalPosition, pixelSize));
|
||||
|
|
|
@ -62,7 +62,7 @@ void WaylandOutput::init(const QPoint &logicalPosition, const QSize &pixelSize)
|
|||
mode.size = pixelSize;
|
||||
mode.flags = ModeFlag::Current;
|
||||
mode.refreshRate = refreshRate;
|
||||
initialize("model_TODO", "manufacturer_TODO", "UUID_TODO", pixelSize, { mode }, {});
|
||||
initialize("model_TODO", "manufacturer_TODO", "eisa_TODO", "serial_TODO", "UUID_TODO", pixelSize, { mode }, {});
|
||||
setGeometry(logicalPosition, pixelSize);
|
||||
setScale(backend()->initialOutputScale());
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ void X11WindowedOutput::init(const QPoint &logicalPosition, const QSize &pixelSi
|
|||
// Physicial size must be adjusted, such that QPA calculates correct sizes of
|
||||
// internal elements.
|
||||
const QSize physicalSize = pixelSize / 96.0 * 25.4 / m_backend->initialOutputScale();
|
||||
initialize("model_TODO", "manufacturer_TODO", "UUID_TODO", physicalSize, { mode }, {});
|
||||
initialize("model_TODO", "manufacturer_TODO", "eisa_TODO", "serial_TODO", "UUID_TODO", physicalSize, { mode }, {});
|
||||
setGeometry(logicalPosition, pixelSize);
|
||||
setScale(m_backend->initialOutputScale());
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@ WaylandOutputDevice::WaylandOutputDevice(AbstractWaylandOutput *output, QObject
|
|||
m_outputDevice->setGlobalPosition(output->geometry().topLeft());
|
||||
m_outputDevice->setScaleF(output->scale());
|
||||
m_outputDevice->setTransform(kwinTransformToOutputDeviceTransform(output->transform()));
|
||||
m_outputDevice->setEisaId(output->eisaId());
|
||||
m_outputDevice->setSerialNumber(output->serialNumber());
|
||||
|
||||
const auto modes = output->modes();
|
||||
for (const AbstractWaylandOutput::Mode &mode : modes) {
|
||||
|
|
Loading…
Reference in a new issue