From 84704502bd1842791e632fd4c9dcb18118d4aa7f Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 14 Mar 2025 14:57:01 -0700 Subject: [PATCH] Qt: Properly activate context when resizing layers (fixes #3435) --- src/platform/qt/DisplayGL.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/platform/qt/DisplayGL.cpp b/src/platform/qt/DisplayGL.cpp index b3a7d62c8..ec69acdea 100644 --- a/src/platform/qt/DisplayGL.cpp +++ b/src/platform/qt/DisplayGL.cpp @@ -699,7 +699,13 @@ void PainterGL::resizeContext() { dequeueAll(false); mRectangle dims = {0, 0, size.width(), size.height()}; + if (!m_started) { + makeCurrent(); + } m_backend->setLayerDimensions(m_backend, VIDEO_LAYER_IMAGE, &dims); + if (!m_started) { + m_gl->doneCurrent(); + } recenterLayers(); m_dims = size; }