kwin: Fix the clip intersection code (XRender)

Do not process windows if the clip region does not
intersect the window region
This commit is contained in:
Jacopo De Simoi 2011-04-28 11:34:50 -04:00
parent e688058235
commit 42941eba8a

View file

@ -613,6 +613,12 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
if ( mask & PAINT_WINDOW_TRANSLUCENT && opaque )
return; // Only painting translucent and window is opaque
}*/
// 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;
Picture pic = picture(); // get XRender picture
if (pic == None) // The render format can be null for GL and/or Xv visuals
return;