From 8a9725a68b9379babb16609c8cfad8e802a62937 Mon Sep 17 00:00:00 2001 From: Philipp Knechtges Date: Wed, 6 Jul 2011 17:13:41 +0200 Subject: [PATCH] kwin: update the decoration texture although we dont paint the decoration We have to update the texture because the next time client->decorationPixmapRequiresRepaint() might return false. --- scene_opengl.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index d9d3d5fbbd..ad681ca3a2 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -623,8 +623,6 @@ void SceneOpenGL::Window::performPaint(int mask, QRegion region, WindowPaintData void SceneOpenGL::Window::paintDecoration(const QPixmap* decoration, TextureType decorationType, const QRegion& region, const QRect& rect, const WindowPaintData& data, const WindowQuadList& quads, bool updateDeco) { - if (quads.isEmpty()) - return; SceneOpenGL::Texture* decorationTexture; switch(decorationType) { case DecorationTop: @@ -653,6 +651,16 @@ void SceneOpenGL::Window::paintDecoration(const QPixmap* decoration, TextureType } } else return; + + // We have to update the texture although we do not paint anything. + // This is especially needed if we draw the opaque part of the window + // and the decoration in two different passes (as we in Scene::paintSimpleWindow do). + // Otherwise we run into the situation that in the first pass there are some + // pending decoration repaints but we dont paint the decoration and in the + // second pass it's the other way around. + if (quads.isEmpty()) + return; + if (filter == ImageFilterGood) decorationTexture->setFilter(GL_LINEAR); else