summaryrefslogtreecommitdiff
path: root/examples/wayland/server-buffer
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@theqtcompany.com>2015-09-03 12:40:19 +0200
committerJørgen Lind <jorgen.lind@theqtcompany.com>2015-09-04 16:12:47 +0200
commit4c5a796e96a66c18afbde0577d8b912a618fe710 (patch)
treee9b3aa53541f67d58dbf1599ae3181ac2cdae2ae /examples/wayland/server-buffer
parenta814616ff34bf5901fc299c6ba91c80cad39922d (diff)
downloadqtwayland-4c5a796e96a66c18afbde0577d8b912a618fe710.tar.gz
Make it possible to construct QWaylandOutput
This requires QWaylandOutput to be initialized. This will happend when the QWaylandCompositor of the QWaylandOutputSpace that is set on the QWaylandOutput is created. QWaylandCompositor will send or post a Polish event to the QWaylandOutput which again will call QWaylandOutput::initialize. This function will create the global that will be put on the wl_displays registry This makes it possible to Create WaylandOutputs in QML (see the pure-qml example) and also gives a better programming model in C++ Change-Id: Iaf907ae18a283678eda6d04390dc9790ae0bced8
Diffstat (limited to 'examples/wayland/server-buffer')
-rw-r--r--examples/wayland/server-buffer/compositor/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/wayland/server-buffer/compositor/main.cpp b/examples/wayland/server-buffer/compositor/main.cpp
index d6e09dca..36a9ca9c 100644
--- a/examples/wayland/server-buffer/compositor/main.cpp
+++ b/examples/wayland/server-buffer/compositor/main.cpp
@@ -56,7 +56,7 @@
#include <QQuickView>
#include "qwayland-server-share-buffer.h"
-#include <QtCompositor/qwaylandoutput.h>
+#include <QtCompositor/QWaylandQuickOutput>
#include <QtCompositor/QWaylandCompositor>
#include <QtCompositor/QWaylandQuickItem>
#include <QtCompositor/private/qwaylandcompositor_p.h>
@@ -86,7 +86,7 @@ public:
m_view.setResizeMode(QQuickView::SizeRootObjectToView);
m_view.setColor(Qt::black);
m_view.create();
- m_output = primaryOutputSpace()->addOutputWindow(&m_view);
+ m_output = new QWaylandQuickOutput(primaryOutputSpace(), &m_view);
connect(&m_view, &QQuickView::afterRendering, this, &QmlCompositor::sendCallbacks);