From d8da7a4eaa4a61b2f0c379fb0d6ce9d7dd0b6d2d Mon Sep 17 00:00:00 2001 From: Asahi Lina Date: Wed, 21 Dec 2022 00:53:29 +0900 Subject: [PATCH] kwinglutils: Restore the default FB when the last FBO is unbound Fixes GL warnings in GbmSurface::makeContextCurrent() when using screencasting. --- src/libkwineffects/kwinglutils.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libkwineffects/kwinglutils.cpp b/src/libkwineffects/kwinglutils.cpp index 601b4d6abf..5fa38bd28c 100644 --- a/src/libkwineffects/kwinglutils.cpp +++ b/src/libkwineffects/kwinglutils.cpp @@ -983,6 +983,8 @@ GLFramebuffer *GLFramebuffer::popFramebuffer() GLFramebuffer *ret = s_fbos.pop(); if (!s_fbos.isEmpty()) { s_fbos.top()->bind(); + } else { + glBindFramebuffer(GL_FRAMEBUFFER, 0); } return ret;