summaryrefslogtreecommitdiffstats
path: root/examples/wayland
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-08-07 03:00:22 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-08-07 03:00:22 +0200
commitd79f7c12db1a21097ab1bf7e2cf87e7b88b1ae9f (patch)
treeb85d933f56fd98f19ee911130b8950a9a40cc03e /examples/wayland
parentf4527f1581486b99d2699b2675ad5d258bc8a7fc (diff)
parenta6cfa65eae4d15c7ad5e7411d998332179080fbd (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Diffstat (limited to 'examples/wayland')
-rw-r--r--examples/wayland/qwindow-compositor/compositor.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/wayland/qwindow-compositor/compositor.cpp b/examples/wayland/qwindow-compositor/compositor.cpp
index 8ba8929e1..e224cd1c3 100644
--- a/examples/wayland/qwindow-compositor/compositor.cpp
+++ b/examples/wayland/qwindow-compositor/compositor.cpp
@@ -72,8 +72,11 @@ View::View(Compositor *compositor)
QOpenGLTexture *View::getTexture()
{
- if (advance()) {
- QWaylandBufferRef buf = currentBuffer();
+ bool newContent = advance();
+ QWaylandBufferRef buf = currentBuffer();
+ if (!buf.hasContent())
+ m_texture = nullptr;
+ if (newContent) {
m_texture = buf.toOpenGLTexture();
if (surface()) {
m_size = surface()->size();