Switch the order, so the decoration is drawn before the client window.
svn path=/trunk/KDE/kdebase/workspace/; revision=1054380
This commit is contained in:
parent
08954b37e4
commit
0b992748be
2 changed files with 32 additions and 29 deletions
|
@ -1437,20 +1437,8 @@ void SceneOpenGL::Window::performPaint( int mask, QRegion region, WindowPaintDat
|
|||
}
|
||||
region.translate( toplevel->x(), toplevel->y() ); // Back to screen coords
|
||||
|
||||
texture.bind();
|
||||
texture.enableUnnormalizedTexCoords();
|
||||
|
||||
WindowQuadList decoration = data.quads.select( WindowQuadDecoration );
|
||||
// paint the content
|
||||
if ( !(mask & PAINT_DECORATION_ONLY) )
|
||||
{
|
||||
prepareStates( Content, data.opacity * data.contents_opacity, data.brightness, data.saturation, data.shader );
|
||||
renderQuads( mask, region, data.quads.select( WindowQuadContents ));
|
||||
restoreStates( Content, data.opacity * data.contents_opacity, data.brightness, data.saturation, data.shader );
|
||||
}
|
||||
|
||||
texture.disableUnnormalizedTexCoords();
|
||||
texture.unbind();
|
||||
|
||||
// decorations
|
||||
Client *client = dynamic_cast<Client*>(toplevel);
|
||||
|
@ -1520,6 +1508,20 @@ void SceneOpenGL::Window::performPaint( int mask, QRegion region, WindowPaintDat
|
|||
}
|
||||
}
|
||||
|
||||
texture.bind();
|
||||
texture.enableUnnormalizedTexCoords();
|
||||
|
||||
// paint the content
|
||||
if ( !(mask & PAINT_DECORATION_ONLY) )
|
||||
{
|
||||
prepareStates( Content, data.opacity * data.contents_opacity, data.brightness, data.saturation, data.shader );
|
||||
renderQuads( mask, region, data.quads.select( WindowQuadContents ));
|
||||
restoreStates( Content, data.opacity * data.contents_opacity, data.brightness, data.saturation, data.shader );
|
||||
}
|
||||
|
||||
texture.disableUnnormalizedTexCoords();
|
||||
texture.unbind();
|
||||
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
|
|
|
@ -724,22 +724,6 @@ void SceneXrender::Window::performPaint( int mask, QRegion region, WindowPaintDa
|
|||
!iterator.isDone();
|
||||
iterator.next())
|
||||
{
|
||||
if ( !(mask & PAINT_DECORATION_ONLY) )
|
||||
{
|
||||
// Paint the window contents
|
||||
if( opaque )
|
||||
{
|
||||
XRenderComposite( display(), PictOpSrc, pic, None, buffer, cr.x() * xscale, cr.y() * yscale,
|
||||
0, 0, dr.x(), dr.y(), dr.width(), dr.height());
|
||||
}
|
||||
else
|
||||
{
|
||||
Picture alpha = alphaMask( data.opacity );
|
||||
XRenderComposite( display(), PictOpOver, pic, alpha, buffer, cr.x() * xscale, cr.y() * yscale,
|
||||
0, 0, dr.x(), dr.y(), dr.width(), dr.height());
|
||||
transformed_shape = QRegion();
|
||||
}
|
||||
}
|
||||
if( client || deleted )
|
||||
{
|
||||
bool noBorder = true;
|
||||
|
@ -804,7 +788,24 @@ void SceneXrender::Window::performPaint( int mask, QRegion region, WindowPaintDa
|
|||
}
|
||||
}
|
||||
}
|
||||
if( data.brightness < 1.0 )
|
||||
if ( !(mask & PAINT_DECORATION_ONLY) )
|
||||
{
|
||||
// Paint the window contents
|
||||
if( opaque )
|
||||
{
|
||||
XRenderComposite( display(), PictOpSrc, pic, None, buffer, cr.x() * xscale, cr.y() * yscale,
|
||||
0, 0, dr.x(), dr.y(), dr.width(), dr.height());
|
||||
}
|
||||
else
|
||||
{
|
||||
Picture alpha = alphaMask( data.opacity );
|
||||
XRenderComposite( display(), PictOpOver, pic, alpha, buffer, cr.x() * xscale, cr.y() * yscale,
|
||||
0, 0, dr.x(), dr.y(), dr.width(), dr.height());
|
||||
transformed_shape = QRegion();
|
||||
}
|
||||
}
|
||||
|
||||
if( data.brightness < 1.0 )
|
||||
{
|
||||
// fake brightness change by overlaying black
|
||||
XRenderColor col = { 0, 0, 0, 0xffff * ( 1 - data.brightness ) * data.opacity };
|
||||
|
|
Loading…
Reference in a new issue