Fix wrong logic.

svn path=/trunk/KDE/kdebase/workspace/; revision=864621
This commit is contained in:
Luboš Luňák 2008-09-25 09:13:00 +00:00
parent c2ef38b83c
commit b9bf9831b0
2 changed files with 8 additions and 24 deletions

View file

@ -1313,18 +1313,10 @@ void SceneOpenGL::Window::performPaint( int mask, QRegion region, WindowPaintDat
// check if there is something to paint (e.g. don't paint if the window // 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) // is only opaque and only PAINT_WINDOW_TRANSLUCENT is requested)
bool opaque = isOpaque() && data.opacity == 1.0; bool opaque = isOpaque() && data.opacity == 1.0;
if( mask & ( PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSLUCENT )) if( opaque && ( mask & ( PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSLUCENT )) == PAINT_WINDOW_TRANSLUCENT )
{} return;
else if( mask & PAINT_WINDOW_OPAQUE ) if( !opaque && ( mask & ( PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSLUCENT )) == PAINT_WINDOW_OPAQUE )
{ return;
if( !opaque )
return;
}
else if( mask & PAINT_WINDOW_TRANSLUCENT )
{
if( opaque )
return;
}
// paint only requested areas // paint only requested areas
if( region != infiniteRegion()) // avoid integer overflow if( region != infiniteRegion()) // avoid integer overflow
region.translate( -x(), -y()); region.translate( -x(), -y());

View file

@ -523,18 +523,10 @@ void SceneXrender::Window::performPaint( int mask, QRegion region, WindowPaintDa
setTransformedShape( QRegion()); // maybe nothing will be painted setTransformedShape( QRegion()); // maybe nothing will be painted
// check if there is something to paint // check if there is something to paint
bool opaque = isOpaque() && data.opacity == 1.0; bool opaque = isOpaque() && data.opacity == 1.0;
if( mask & ( PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSLUCENT )) if( opaque && ( mask & ( PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSLUCENT )) == PAINT_WINDOW_TRANSLUCENT )
{} return;
else if( mask & PAINT_WINDOW_OPAQUE ) if( !opaque && ( mask & ( PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSLUCENT )) == PAINT_WINDOW_OPAQUE )
{ return;
if( !opaque )
return;
}
else if( mask & PAINT_WINDOW_TRANSLUCENT )
{
if( opaque )
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;