Fixed "fixed" logic. There's really no other way to do this that's readable so if the "suspicious code" checker still picks this up just ignore it.
BUG: 171709 svn path=/trunk/KDE/kdebase/workspace/; revision=865220
This commit is contained in:
parent
4430053ef8
commit
24816cb67b
2 changed files with 14 additions and 8 deletions
|
@ -1313,10 +1313,13 @@ void SceneOpenGL::Window::performPaint( int mask, QRegion region, WindowPaintDat
|
|||
// check if there is something to paint (e.g. don't paint if the window
|
||||
// is only opaque and only PAINT_WINDOW_TRANSLUCENT is requested)
|
||||
bool opaque = isOpaque() && data.opacity == 1.0;
|
||||
if( opaque && ( mask & ( PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSLUCENT )) == PAINT_WINDOW_TRANSLUCENT )
|
||||
return;
|
||||
if( !opaque && ( mask & ( PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSLUCENT )) == PAINT_WINDOW_OPAQUE )
|
||||
return;
|
||||
if( !( mask & ( PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSLUCENT )))
|
||||
{ // We are only painting either opaque OR translucent windows, not both
|
||||
if( mask & PAINT_WINDOW_OPAQUE && !opaque )
|
||||
return; // Only painting opaque and window is translucent
|
||||
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());
|
||||
|
|
|
@ -523,10 +523,13 @@ void SceneXrender::Window::performPaint( int mask, QRegion region, WindowPaintDa
|
|||
setTransformedShape( QRegion()); // maybe nothing will be painted
|
||||
// check if there is something to paint
|
||||
bool opaque = isOpaque() && data.opacity == 1.0;
|
||||
if( opaque && ( mask & ( PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSLUCENT )) == PAINT_WINDOW_TRANSLUCENT )
|
||||
return;
|
||||
if( !opaque && ( mask & ( PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSLUCENT )) == PAINT_WINDOW_OPAQUE )
|
||||
return;
|
||||
if( !( mask & ( PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSLUCENT )))
|
||||
{ // We are only painting either opaque OR translucent windows, not both
|
||||
if( mask & PAINT_WINDOW_OPAQUE && !opaque )
|
||||
return; // Only painting opaque and window is translucent
|
||||
if( mask & PAINT_WINDOW_TRANSLUCENT && opaque )
|
||||
return; // Only painting translucent and window is opaque
|
||||
}
|
||||
Picture pic = picture(); // get XRender picture
|
||||
if( pic == None ) // The render format can be null for GL and/or Xv visuals
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue