summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandshell.cpp
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@kdab.com>2016-02-03 10:42:27 +0200
committerGiulio Camuffo <giuliocamuffo@gmail.com>2016-02-12 15:00:16 +0000
commit74b1ec474d1d48242893dcaf58b8a35f155f3fc3 (patch)
treea439d3307b7511eab756d1e90a44a70c5d2715a2 /src/compositor/extensions/qwaylandshell.cpp
parent03a8036674d07daadd2ee716f92e840a18ed2753 (diff)
Expose a method to send ping events in QWaylandShellSurface
It must be callable by the user so it must be public API. Change-Id: Ic028843189148130a57a21e6e64840bd400dc7dc Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Diffstat (limited to 'src/compositor/extensions/qwaylandshell.cpp')
-rw-r--r--src/compositor/extensions/qwaylandshell.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/compositor/extensions/qwaylandshell.cpp b/src/compositor/extensions/qwaylandshell.cpp
index 8bd3e6adb..9865432ed 100644
--- a/src/compositor/extensions/qwaylandshell.cpp
+++ b/src/compositor/extensions/qwaylandshell.cpp
@@ -88,12 +88,6 @@ QWaylandShellSurfacePrivate::~QWaylandShellSurfacePrivate()
{
}
-void QWaylandShellSurfacePrivate::ping()
-{
- uint32_t serial = m_surface->compositor()->nextSerial();
- ping(serial);
-}
-
void QWaylandShellSurfacePrivate::ping(uint32_t serial)
{
m_pings.insert(serial);
@@ -566,4 +560,22 @@ QWaylandSurfaceRole *QWaylandShellSurface::role()
return &QWaylandShellSurfacePrivate::s_role;
}
+/*!
+ * \qmlmethod void QtWaylandCompositor::ShellSurface::ping()
+ *
+ * Sends a ping event to the client. If the client replies to the event the \a pong
+ * signal will be emitted.
+ */
+
+/*!
+ * Sends a ping event to the client. If the client replies to the event the \a pong
+ * signal will be emitted.
+ */
+void QWaylandShellSurface::ping()
+{
+ Q_D(QWaylandShellSurface);
+ uint32_t serial = d->m_surface->compositor()->nextSerial();
+ d->ping(serial);
+}
+
QT_END_NAMESPACE