diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-09-06 11:12:10 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-09-07 06:25:12 +0000 |
commit | 8b62fafcbe3ec5c1b50d9c3845b5ac961c9c3e87 (patch) | |
tree | 2b06d4097067f3fdffcf7a5ea4a4293d9b6985b5 | |
parent | 3bbb85c3f1374eaf1dc23e94cddaaa90b9908c13 (diff) | |
download | qtwayland-8b62fafcbe3ec5c1b50d9c3845b5ac961c9c3e87.tar.gz |
Compositor: Add XdgToplevel::xdgSurface
Similar to the property we already have for popups, XdgPopup::xdgSurface.
Change-Id: I1a0b77b28a35597139fcf381a4b345ccaa93d626
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshell.cpp | 17 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshell.h | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/compositor/extensions/qwaylandxdgshell.cpp b/src/compositor/extensions/qwaylandxdgshell.cpp index ce6add3d..4a0db2a5 100644 --- a/src/compositor/extensions/qwaylandxdgshell.cpp +++ b/src/compositor/extensions/qwaylandxdgshell.cpp @@ -742,6 +742,23 @@ QWaylandXdgToplevel::~QWaylandXdgToplevel() } /*! + * \qmlproperty XdgSurface QtWaylandCompositor::XdgToplevel::xdgSurface + * + * This property holds the XdgSurface for this XdgToplevel. + */ + +/*! + * \property QWaylandXdgToplevel::xdgSurface + * + * This property holds the QWaylandXdgSurface for this QWaylandXdgToplevel. + */ +QWaylandXdgSurface *QWaylandXdgToplevel::xdgSurface() const +{ + Q_D(const QWaylandXdgToplevel); + return d->m_xdgSurface; +} + +/*! * \qmlproperty XdgToplevel QtWaylandCompositor::XdgToplevel::parentToplevel * * This property holds the XdgToplevel parent of this XdgToplevel. diff --git a/src/compositor/extensions/qwaylandxdgshell.h b/src/compositor/extensions/qwaylandxdgshell.h index 71454f92..774dd228 100644 --- a/src/compositor/extensions/qwaylandxdgshell.h +++ b/src/compositor/extensions/qwaylandxdgshell.h @@ -142,6 +142,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgToplevel : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QWaylandXdgToplevel) + Q_PROPERTY(QWaylandXdgSurface *xdgSurface READ xdgSurface CONSTANT) Q_PROPERTY(QWaylandXdgToplevel *parentToplevel READ parentToplevel NOTIFY parentToplevelChanged) Q_PROPERTY(QString title READ title NOTIFY titleChanged) Q_PROPERTY(QString appId READ appId NOTIFY appIdChanged) @@ -171,6 +172,7 @@ public: explicit QWaylandXdgToplevel(QWaylandXdgSurface *xdgSurface, QWaylandResource &resource); ~QWaylandXdgToplevel() override; + QWaylandXdgSurface *xdgSurface() const; QWaylandXdgToplevel *parentToplevel() const; QString title() const; |