From aab88cc10daf5ea7d1e8eb9516346f2c6c54f3dc Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Mon, 23 Apr 2012 11:42:17 +0200 Subject: [PATCH] re-implemented compositing-off dnd calculation properly. --- clients/oxygen/oxygenclient.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 847b1b863c..3d20846093 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -1913,11 +1913,14 @@ namespace Oxygen tileSet->render( geometry, &painter, TileSet::Ring); geometry.adjust( shadowSize, shadowSize, -shadowSize, -shadowSize ); + renderCorners( &painter, geometry, widget()->palette() ); + } - // render window background - renderCorners( &painter, geometry, widget()->palette() ); + // mask painter.setClipRegion( helper().roundedMask( geometry ), Qt::IntersectClip ); + + // render window background renderWindowBackground( &painter, geometry, widget(), widget()->palette() ); // darken background if item is inactive @@ -1948,10 +1951,14 @@ namespace Oxygen titlebarTextColor( widget()->palette(), isActive() && itemActive ), titlebarContrastColor( widget()->palette() ) ); + // adjust geometry for floatFrame when compositing is on. + if( drawShadow ) + { geometry.adjusted(-1, -1, 1, 1 ); } + // floating frame helper().drawFloatFrame( - &painter, geometry.adjusted(-1, -1, 1, 1 ), widget()->palette().window().color(), - false, false, + &painter, geometry, widget()->palette().window().color(), + !drawShadow, false, KDecoration::options()->color(ColorTitleBar) );