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:
parent
e688058235
commit
42941eba8a
1 changed files with 6 additions and 0 deletions
|
@ -613,6 +613,12 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
|
||||||
if ( mask & PAINT_WINDOW_TRANSLUCENT && opaque )
|
if ( mask & PAINT_WINDOW_TRANSLUCENT && opaque )
|
||||||
return; // Only painting translucent and window is 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
|
Picture pic = picture(); // get XRender picture
|
||||||
if (pic == None) // The render format can be null for GL and/or Xv visuals
|
if (pic == None) // The render format can be null for GL and/or Xv visuals
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue