diff options
Diffstat (limited to 'kdm/kfrontend/themer/kdmrect.cpp')
-rw-r--r-- | kdm/kfrontend/themer/kdmrect.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/kdm/kfrontend/themer/kdmrect.cpp b/kdm/kfrontend/themer/kdmrect.cpp index 1d854d213..1db128da0 100644 --- a/kdm/kfrontend/themer/kdmrect.cpp +++ b/kdm/kfrontend/themer/kdmrect.cpp @@ -21,6 +21,7 @@ #include "kdmrect.h" #include "kdmthemer.h" +#include "kdmconfig.h" #include <kimageeffect.h> #include <kdebug.h> @@ -30,6 +31,8 @@ #include <tqwidget.h> #include <tqlayout.h> +extern bool argb_visual_available; + KdmRect::KdmRect( KdmItem *parent, const TQDomNode &node, const char *name ) : KdmItem( parent, node, name ) { @@ -103,14 +106,20 @@ KdmRect::drawContents( TQPainter *p, const TQRect &r ) if (rClass->alpha == 1) p->fillRect( area, TQBrush( rClass->color ) ); else { - TQRect backRect = r; - backRect.moveBy( area.x(), area.y() ); - TQPixmap backPixmap( backRect.size() ); - bitBlt( &backPixmap, TQPoint( 0, 0 ), p->device(), backRect ); - TQImage backImage = backPixmap.convertToImage(); - KImageEffect::blend( rClass->color, backImage, rClass->alpha ); - p->drawImage( backRect.x(), backRect.y(), backImage ); - // area.moveBy(1,1); +// if ((_compositor.isEmpty()) || (!argb_visual_available)) { + // Software blend only (no compositing support) + TQRect backRect = r; + backRect.moveBy( area.x(), area.y() ); + TQPixmap backPixmap( backRect.size() ); + bitBlt( &backPixmap, TQPoint( 0, 0 ), p->device(), backRect ); + TQImage backImage = backPixmap.convertToImage(); + KImageEffect::blend( rClass->color, backImage, rClass->alpha ); + p->drawImage( backRect.x(), backRect.y(), backImage ); + // area.moveBy(1,1); +// } +// else { +// // We have compositing support! +// } } } |