From fa1658f8bf548c3bcd6fc289bbb94a787a0a4bd9 Mon Sep 17 00:00:00 2001 From: Weng Xuetian Date: Fri, 10 Nov 2023 19:43:37 -0800 Subject: [PATCH] client: Always clear queued buffer busy flag when resetting the window In 816f41c00d22ca157eed273183f0711d9f1b41c7, the queued buffer is always set busy, but it may not be reset correctly if the queued buffer is not ever attached due to hiding the surface when window visibility is being updated at a very fast speed. Fixes: QTBUG-118650 Task-number: QTBUG-118650 Pick-to: 6.6 Change-Id: Id0bdd3caa69c821bb84927f01b4839f46eee8a10 Reviewed-by: David Edmundson Reviewed-by: David Redondo --- src/plugins/platforms/wayland/qwaylandwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index 87e75a5ad60..a2af701ddd7 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -300,6 +300,9 @@ void QWaylandWindow::reset() mOpaqueArea = QRegion(); mMask = QRegion(); + if (mQueuedBuffer) { + mQueuedBuffer->setBusy(false); + } mQueuedBuffer = nullptr; mQueuedBufferDamage = QRegion();