diff options
-rw-r--r-- | src/plugins/platforms/wayland_common/qwaylandscreen.cpp | 5 | ||||
-rw-r--r-- | src/plugins/platforms/wayland_common/qwaylandscreen.h | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/platforms/wayland_common/qwaylandscreen.cpp b/src/plugins/platforms/wayland_common/qwaylandscreen.cpp index ce2cd1144..fe0f76ce3 100644 --- a/src/plugins/platforms/wayland_common/qwaylandscreen.cpp +++ b/src/plugins/platforms/wayland_common/qwaylandscreen.cpp @@ -56,6 +56,7 @@ QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, uint32_t id) , mDepth(32) , mRefreshRate(60000) , mFormat(QImage::Format_ARGB32_Premultiplied) + , mOutputName(QStringLiteral("Screen%1").arg(id)) , mWaylandCursor(new QWaylandCursor(this)) { // handle case of output extension global being sent after outputs @@ -156,9 +157,11 @@ void QWaylandScreen::output_geometry(int32_t x, int32_t y, { Q_UNUSED(subpixel); Q_UNUSED(make); - Q_UNUSED(model); Q_UNUSED(transform); + if (!model.isEmpty()) + mOutputName = model; + QRect geom(x, y, width, height); if (mGeometry == geom) diff --git a/src/plugins/platforms/wayland_common/qwaylandscreen.h b/src/plugins/platforms/wayland_common/qwaylandscreen.h index 585698433..91848ad05 100644 --- a/src/plugins/platforms/wayland_common/qwaylandscreen.h +++ b/src/plugins/platforms/wayland_common/qwaylandscreen.h @@ -69,6 +69,8 @@ public: Qt::ScreenOrientation orientation() const; qreal refreshRate() const; + QString name() const { return mOutputName; } + QPlatformCursor *cursor() const; QWaylandCursor *waylandCursor() const { return mWaylandCursor; }; @@ -95,6 +97,7 @@ private: int mRefreshRate; QImage::Format mFormat; QSize mPhysicalSize; + QString mOutputName; QWaylandCursor *mWaylandCursor; }; |