From 250169ff845e08502828b3808dacb9cbffb66c79 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Mon, 14 Jun 2021 23:16:37 +0200 Subject: [PATCH] platforms/drm: make context current without outputs in eglstream --- src/plugins/platforms/drm/egl_stream_backend.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/plugins/platforms/drm/egl_stream_backend.cpp b/src/plugins/platforms/drm/egl_stream_backend.cpp index 6da75c0087..b628bfba92 100644 --- a/src/plugins/platforms/drm/egl_stream_backend.cpp +++ b/src/plugins/platforms/drm/egl_stream_backend.cpp @@ -198,9 +198,7 @@ void EglStreamBackend::attachStreamConsumer(KWaylandServer::SurfaceInterface *su void *eglStream, wl_array *attribs) { - if (!m_outputs.isEmpty()) { - makeContextCurrent(m_outputs.first()); - } + makeCurrent(); QVector streamAttribs; streamAttribs << EGL_WAYLAND_EGLSTREAM_WL << (EGLAttrib)eglStream; EGLAttrib *attribArray = (EGLAttrib *)attribs->data; @@ -229,9 +227,7 @@ void EglStreamBackend::attachStreamConsumer(KWaylandServer::SurfaceInterface *su connect(surface, &KWaylandServer::SurfaceInterface::destroyed, this, [surface, this]() { - if (!m_outputs.isEmpty()) { - makeContextCurrent(m_outputs.first()); - } + makeCurrent(); const StreamTexture &st = m_streamTextures.take(surface); pEglDestroyStreamKHR(eglDisplay(), st.stream); glDeleteTextures(1, &st.texture);