diff --git a/src/cursordelegate_opengl.cpp b/src/cursordelegate_opengl.cpp index f75c4c2d6f..43d555fb54 100644 --- a/src/cursordelegate_opengl.cpp +++ b/src/cursordelegate_opengl.cpp @@ -60,6 +60,9 @@ void CursorDelegateOpenGL::paint(RenderTarget *renderTarget, const QRegion ®i mvp.ortho(QRect(QPoint(0, 0), renderTarget->size())); mvp.translate(cursorRect.x() * scale, cursorRect.y() * scale); + GLFramebuffer *fbo = std::get(renderTarget->nativeHandle()); + GLFramebuffer::pushFramebuffer(fbo); + // Don't need to call GLVertexBuffer::beginFrame() and GLVertexBuffer::endOfFrame() because // the GLVertexBuffer::streamingBuffer() is not being used when painting cursor. glEnable(GL_BLEND); @@ -71,6 +74,8 @@ void CursorDelegateOpenGL::paint(RenderTarget *renderTarget, const QRegion ®i m_cursorTexture->render(region, QRect(0, 0, cursorRect.width(), cursorRect.height()), scale); m_cursorTexture->unbind(); glDisable(GL_BLEND); + + GLFramebuffer::popFramebuffer(); } } // namespace KWin