screencast: Ensure that there is current OpenGL context when recording a window

We need an OpenGL context otherwise we may hit an assert in libepoxy.

BUG: 425869
master
Vlad Zahorodnii 2020-09-24 15:46:37 +03:00
parent 80554a3e12
commit 989e0987d7
1 changed files with 1 additions and 0 deletions

View File

@ -99,6 +99,7 @@ private:
if (m_damagedRegion.isEmpty()) {
return;
}
effects->makeOpenGLContextCurrent();
EGLFence fence(kwinApp()->platform()->sceneEglDisplay());
QSharedPointer<GLTexture> frameTexture(m_toplevel->effectWindow()->sceneWindow()->windowTexture());
const bool wasYInverted = frameTexture->isYInverted();