From 1573d04b5ac7f54649fd8225a42c7a9a09266eb5 Mon Sep 17 00:00:00 2001 From: David Redondo Date: Wed, 10 Apr 2024 15:36:00 +0200 Subject: [PATCH] Mark windows for offsceen rendering in WindowThumbnailSource This way if an effect wants to show such window that is for example on a different virtual desktop it is updated live. BUG:456280 FIXED-IN:6.0.4 --- src/scripting/windowthumbnailitem.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/scripting/windowthumbnailitem.cpp b/src/scripting/windowthumbnailitem.cpp index d2b46747fe..e07357234e 100644 --- a/src/scripting/windowthumbnailitem.cpp +++ b/src/scripting/windowthumbnailitem.cpp @@ -51,10 +51,17 @@ WindowThumbnailSource::WindowThumbnailSource(QQuickWindow *view, Window *handle) }); connect(Compositor::self()->scene(), &WorkspaceScene::preFrameRender, this, &WindowThumbnailSource::update); + + m_handle->refOffscreenRendering(); } WindowThumbnailSource::~WindowThumbnailSource() { + + if (m_handle) { + m_handle->unrefOffscreenRendering(); + } + if (!m_offscreenTexture) { return; }