From d28463b8e765b96004c71837d2a807c1a8139a13 Mon Sep 17 00:00:00 2001 From: Guillaume Bottesi Date: Tue, 13 May 2025 09:31:50 +0200 Subject: [PATCH] Prevent freeze in QSGRenderThread when pressing Win-D --- .../src/quick/scenegraph/qsgthreadedrenderloop.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qtdeclarative/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/qtdeclarative/src/quick/scenegraph/qsgthreadedrenderloop.cpp index 4fcaddf22c..9332704f58 100644 --- a/qtdeclarative/src/quick/scenegraph/qsgthreadedrenderloop.cpp +++ b/qtdeclarative/src/quick/scenegraph/qsgthreadedrenderloop.cpp @@ -632,8 +632,14 @@ void QSGRenderThread::syncAndRender() // An update request could still be delivered right before we get an // unexpose. With Vulkan on Windows for example attempting to render // leads to failures at this stage since the surface size is already 0. - if (effectiveOutputSize.isEmpty()) + if (effectiveOutputSize.isEmpty()) { + if (syncRequested) { + mutex.lock(); + waitCondition.wakeOne(); + mutex.unlock(); + } return; + } const QSize previousOutputSize = cd->swapchain->currentPixelSize(); if (previousOutputSize != effectiveOutputSize || cd->swapchainJustBecameRenderable) { -- 2.48.1.windows.1