diff options
-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 ce6add3de..4a0db2a53 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 71454f929..774dd2282 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; |