diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-08-07 03:00:22 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-08-07 03:00:22 +0200 |
commit | d79f7c12db1a21097ab1bf7e2cf87e7b88b1ae9f (patch) | |
tree | b85d933f56fd98f19ee911130b8950a9a40cc03e /examples | |
parent | f4527f1581486b99d2699b2675ad5d258bc8a7fc (diff) | |
parent | a6cfa65eae4d15c7ad5e7411d998332179080fbd (diff) | |
download | qtwayland-d79f7c12db1a21097ab1bf7e2cf87e7b88b1ae9f.tar.gz |
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I7947816edbfef4e07d488d25122cfd9a969436db
Diffstat (limited to 'examples')
-rw-r--r-- | examples/wayland/qwindow-compositor/compositor.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/wayland/qwindow-compositor/compositor.cpp b/examples/wayland/qwindow-compositor/compositor.cpp index 8ba8929e..e224cd1c 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(); |