diff options
author | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-08-24 16:51:01 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-08-28 13:10:33 +0200 |
commit | d2d70779224b067f6035f431319036054272ce65 (patch) | |
tree | 0ea297990553ff75cf82fb840d59dde903903dcd /src/compositor/compositor_api/qwaylandview_p.h | |
parent | 88f821e189bd1d4d4550c1864f622ca7df2a7c34 (diff) |
Make the default wl_shell available from QML
This finaly ties together how to use QWaylandQuickItems with different
shells
It was required to decouple QWaylandView from the QWaylandQuickItem
since QML doesn't play to well with muliple inheritance. The
QWaylandQuickItem can be retrieved from the QWaylandView which is now
conveniently a QObject. Also the QWaylandQuickItem owns the
QWaylandView. This architecture also leaves room for creating a
QWaylandWidget :)
Change-Id: Ib8a00e6f17f0f1bfc3ff244753f021c76db22cb1
Diffstat (limited to 'src/compositor/compositor_api/qwaylandview_p.h')
-rw-r--r-- | src/compositor/compositor_api/qwaylandview_p.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/compositor/compositor_api/qwaylandview_p.h b/src/compositor/compositor_api/qwaylandview_p.h index 562b54f6c..c37cd6b71 100644 --- a/src/compositor/compositor_api/qwaylandview_p.h +++ b/src/compositor/compositor_api/qwaylandview_p.h @@ -39,6 +39,7 @@ #include <QtCore/QPoint> #include <QtCore/QMutex> +#include <QtCore/private/qobject_p.h> #include <QtCompositor/QWaylandBufferRef> @@ -47,27 +48,23 @@ QT_BEGIN_NAMESPACE class QWaylandSurface; class QWaylandOutput; -class QWaylandViewPrivate +class QWaylandViewPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QWaylandView) public: - static QWaylandViewPrivate *get(QWaylandView *view); + static QWaylandViewPrivate *get(QWaylandView *view) { return view->d_func(); } - QWaylandViewPrivate(QWaylandView *view) - : q_ptr(view) + QWaylandViewPrivate() + : renderObject(Q_NULLPTR) , surface(Q_NULLPTR) , output(Q_NULLPTR) - , lockedBuffer(false) + , bufferLock(false) + , broadcastRequestedPositionChanged(false) { } void markSurfaceAsDestroyed(QWaylandSurface *surface); - bool shouldBroadcastRequestedPositionChanged() const - { - return broadcastRequestedPositionChanged && output; - } - - QWaylandView *q_ptr; + QObject *renderObject; QWaylandSurface *surface; QWaylandOutput *output; QPointF requestedPos; @@ -76,7 +73,7 @@ public: QRegion currentDamage; QWaylandBufferRef nextBuffer; QRegion nextDamage; - bool lockedBuffer; + bool bufferLock; bool broadcastRequestedPositionChanged; }; |