summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandxdgshell.cpp
diff options
context:
space:
mode:
authorPier Luigi Fiorini <pierluigi.fiorini@gmail.com>2016-08-14 10:56:05 +0200
committerPier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>2016-08-15 11:30:32 +0000
commit768a28b284fa806cba38f864c56ba2e2c37296f2 (patch)
tree3f71557a400abd1733238cf600c0ec4dc8bde814 /src/compositor/extensions/qwaylandxdgshell.cpp
parentb9f0673a7928c896f44caf282c61b1080651f6b8 (diff)
compositor: Add shell property to xdg-shell
Add a shell property to QWaylandXdgSurface and QWaylandXdgPopup like QWaylandWlShellSurface. Change-Id: Id321f2ba8a48284c31fe67c4600c86f5c134b68d Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/compositor/extensions/qwaylandxdgshell.cpp')
-rw-r--r--src/compositor/extensions/qwaylandxdgshell.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/compositor/extensions/qwaylandxdgshell.cpp b/src/compositor/extensions/qwaylandxdgshell.cpp
index 93944fb32..273803d68 100644
--- a/src/compositor/extensions/qwaylandxdgshell.cpp
+++ b/src/compositor/extensions/qwaylandxdgshell.cpp
@@ -677,6 +677,7 @@ void QWaylandXdgSurface::initialize(QWaylandXdgShell *xdgShell, QWaylandSurface
d->m_windowGeometry = d->calculateFallbackWindowGeometry();
connect(surface, &QWaylandSurface::sizeChanged, this, &QWaylandXdgSurface::handleSurfaceSizeChanged);
connect(surface, &QWaylandSurface::bufferScaleChanged, this, &QWaylandXdgSurface::handleBufferScaleChanged);
+ emit shellChanged();
emit surfaceChanged();
emit windowGeometryChanged();
QWaylandCompositorExtension::initialize();
@@ -712,6 +713,23 @@ void QWaylandXdgSurface::handleBufferScaleChanged()
}
/*!
+ * \qmlproperty object QtWaylandCompositor::XdgSurface::shell
+ *
+ * This property holds the shell associated with this XdgSurface.
+ */
+
+/*!
+ * \property QWaylandXdgSurface::shell
+ *
+ * This property holds the shell associated with this QWaylandXdgSurface.
+ */
+QWaylandXdgShell *QWaylandXdgSurface::shell() const
+{
+ Q_D(const QWaylandXdgSurface);
+ return d->m_xdgShell;
+}
+
+/*!
* \qmlproperty object QtWaylandCompositor::XdgSurface::surface
*
* This property holds the surface associated with this XdgSurface.
@@ -1039,12 +1057,30 @@ void QWaylandXdgPopup::initialize(QWaylandXdgShell *shell, QWaylandSurface *surf
d->m_position = position;
d->init(resource.resource());
setExtensionContainer(surface);
+ emit shellChanged();
emit surfaceChanged();
emit parentSurfaceChanged();
QWaylandCompositorExtension::initialize();
}
/*!
+ * \qmlproperty object QtWaylandCompositor::XdgPopup::shell
+ *
+ * This property holds the shell associated with this XdgPopup.
+ */
+
+/*!
+ * \property QWaylandXdgPopup::shell
+ *
+ * This property holds the shell associated with this QWaylandXdgPopup.
+ */
+QWaylandXdgShell *QWaylandXdgPopup::shell() const
+{
+ Q_D(const QWaylandXdgPopup);
+ return d->m_xdgShell;
+}
+
+/*!
* \qmlproperty object QtWaylandCompositor::XdgPopup::surface
*
* This property holds the surface associated with this XdgPopup.