diff options
author | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-07-29 14:32:59 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-08-28 13:09:41 +0200 |
commit | e94de5a53eddfcb880dc91507a7ab38b9f25f82b (patch) | |
tree | 51591c1642c7f18c7d764754b4e104838897ada6 /src/compositor/compositor_api/qwaylandquicksurface.cpp | |
parent | 57900c49362a7f9bf11a72a46e309f8beeb631bb (diff) |
Add WaylandOutputWindow item
and add a convenience getter on the QWaylandQuickSurface to retrieve the
window. This is because the window typically in qml will have
additional properties which we want to retrieve. Instead of doing
surface.output.window we can now do surface.outputWindow which looks
cleaner
Change-Id: Ia3007583a8a0e8e01444cb3f8819fbc651be14ab
Diffstat (limited to 'src/compositor/compositor_api/qwaylandquicksurface.cpp')
-rw-r--r-- | src/compositor/compositor_api/qwaylandquicksurface.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compositor/compositor_api/qwaylandquicksurface.cpp b/src/compositor/compositor_api/qwaylandquicksurface.cpp index 6acd1f200..a55569da9 100644 --- a/src/compositor/compositor_api/qwaylandquicksurface.cpp +++ b/src/compositor/compositor_api/qwaylandquicksurface.cpp @@ -166,7 +166,6 @@ QWaylandQuickSurface::QWaylandQuickSurface(wl_client *client, quint32 id, int ve connect(this, &QWaylandSurface::windowPropertyChanged, d->windowPropertyMap, &QQmlPropertyMap::insert); connect(d->windowPropertyMap, &QQmlPropertyMap::valueChanged, this, &QWaylandSurface::setWindowProperty); connect(this, &QWaylandSurface::shellViewCreated, this, &QWaylandQuickSurface::shellViewCreated); - connect(this, &QWaylandSurface::outputChanged, this, &QWaylandQuickSurface::onOutputChanged); } QWaylandQuickSurface::~QWaylandQuickSurface() @@ -207,6 +206,11 @@ QWaylandSurfaceItem *QWaylandQuickSurface::shellView() const return static_cast<QWaylandSurfaceItem *>(QWaylandSurface::shellView()); } +QWindow *QWaylandQuickSurface::outputWindow() const +{ + return output() ? output()->window() : Q_NULLPTR; +} + bool QWaylandQuickSurface::event(QEvent *e) { if (e->type() == static_cast<QEvent::Type>(QWaylandSurfaceLeaveEvent::WaylandSurfaceLeave)) { |