diff options
author | Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | 2013-08-01 01:11:39 +0200 |
---|---|---|
committer | Andy Nichols <andy.nichols@digia.com> | 2013-08-06 13:11:12 +0200 |
commit | b704431e9cd4b3e0da0d73d7f7e8cea428ecfce4 (patch) | |
tree | 84b8a8b93f91cb7fa9d40eb9868df0ce679ea2f8 /src | |
parent | 752b0b88988df4e5c49c6e5b97dad3bc3e98ccdc (diff) |
Show screen name based on output model
Platform screen now returns the screen name.
Change-Id: I190da6b4d89774dd25de8353615fe7dcaeb11cd4
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Diffstat (limited to 'src')
-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; }; |