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
This commit is contained in:
David Redondo 2024-04-10 15:36:00 +02:00
parent 485769ddd9
commit 1573d04b5a

View file

@ -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;
}