kwin: Fix the clip intersection code

The code that intersected the clip region with the window region
appears to have been accidentally lost in 5ce3c6b8.
This commit is contained in:
Fredrik Höglund 2011-02-15 22:34:23 +01:00
parent 5d29307f58
commit 90f6cbfa5e

View file

@ -463,11 +463,14 @@ void SceneOpenGL::Window::performPaint(int mask, QRegion region, WindowPaintData
if ( mask & PAINT_WINDOW_TRANSLUCENT && opaque )
return; // Only painting translucent and window is opaque
}*/
// paint only requested areas
if (region != infiniteRegion()) // avoid integer overflow
region.translate(-x(), -y());
// Intersect the clip region with the rectangle the window occupies on the screen
if (!(mask & (PAINT_WINDOW_TRANSFORMED | PAINT_SCREEN_TRANSFORMED)))
region &= toplevel->visibleRect();
if (region.isEmpty())
return;
if (!bindTexture())
return;
@ -501,8 +504,6 @@ void SceneOpenGL::Window::performPaint(int mask, QRegion region, WindowPaintData
if (!sceneShader)
pushMatrix(windowTransformation);
region.translate(toplevel->x(), toplevel->y()); // Back to screen coords
WindowQuadList decoration = data.quads.select(WindowQuadDecoration);
GLVertexBuffer *vbo = GLVertexBuffer::streamingBuffer();