diff options
author | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2014-07-03 16:40:36 +0300 |
---|---|---|
committer | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2014-07-30 16:52:48 +0200 |
commit | 1c449aa980e2ca34bd1d36e16a2e8d084da07f57 (patch) | |
tree | 01295eda4a0be19e810ea0b91dce81bcfcad0a67 /src/compositor/compositor_api/qwaylandsurface_p.h | |
parent | 4f39034927ebc76c6e7fde5fe692eaa88c085734 (diff) |
Add more API to change QWaylandSurface properties
The previous patch allows for QWaylandSurface to call into custom
protocol implementations, but the other way around is needed too.
Instead of adding many public setters to QWaylandSurface this
makes QWaylandSurfaceInterface the way to set them, through
protected functions. This avoids calling the setters from other code
paths, which would bring the server and client states of the same
surface out of sync.
Change-Id: I9836c38835f10f6e63007b13d27a62884065f837
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/compositor/compositor_api/qwaylandsurface_p.h')
-rw-r--r-- | src/compositor/compositor_api/qwaylandsurface_p.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compositor/compositor_api/qwaylandsurface_p.h b/src/compositor/compositor_api/qwaylandsurface_p.h index 01d7ce545..07541d32f 100644 --- a/src/compositor/compositor_api/qwaylandsurface_p.h +++ b/src/compositor/compositor_api/qwaylandsurface_p.h @@ -56,16 +56,18 @@ class QWaylandSurfaceInterface; class Q_COMPOSITOR_EXPORT QWaylandSurfacePrivate : public QObjectPrivate, public QtWayland::Surface { + Q_DECLARE_PUBLIC(QWaylandSurface) public: QWaylandSurfacePrivate(wl_client *client, quint32 id, QWaylandCompositor *compositor, QWaylandSurface *surface); + void setType(QWaylandSurface::WindowType type); + void setTitle(const QString &title); + void setClassName(const QString &className); bool closing; int refCount; QWaylandSurface::WindowType windowType; QList<QWaylandSurfaceView *> views; QList<QWaylandSurfaceInterface *> interfaces; - - friend class QWaylandSurface; }; QT_END_NAMESPACE |