summaryrefslogtreecommitdiffstats
path: root/src/compositor
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2016-11-29 14:59:37 +0100
committerJohan Helsing <johan.helsing@qt.io>2016-11-30 14:24:09 +0000
commite572a0dead05e76603a4f783a6f688fd51f46734 (patch)
tree58a20ee91855ef965e8fb41b2dc3044b701c9d6e /src/compositor
parent545ef2e21d74128733f3b9b117d7c6024826cbb5 (diff)
Don't delete the paint node for QWaylandQuickItems with locked buffers
This fixes an issue where surfaces would sometimes disappear even though bufferLocked had been set. Change-Id: I01f8d879e166d9844671c51e01ecb3141b174d76 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/compositor')
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp
index 4c5bf0757..7e44dfae7 100644
--- a/src/compositor/compositor_api/qwaylandquickitem.cpp
+++ b/src/compositor/compositor_api/qwaylandquickitem.cpp
@@ -1125,9 +1125,12 @@ void QWaylandQuickItem::updateInputMethod(Qt::InputMethodQueries queries)
QSGNode *QWaylandQuickItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *)
{
Q_D(QWaylandQuickItem);
- const bool hasContent = surface() && surface()->hasContent() && d->view->currentBuffer().hasContent();
+ const bool bufferHasContent = d->view->currentBuffer().hasContent();
- if (!hasContent || !d->paintEnabled) {
+ if (d->view->isBufferLocked() && !bufferHasContent && d->paintEnabled)
+ return oldNode;
+
+ if (!bufferHasContent || !d->paintEnabled) {
delete oldNode;
return 0;
}