summaryrefslogtreecommitdiffstats
path: root/tdm/kfrontend/themer/tdmrect.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-05-07 00:12:51 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-05-07 00:12:51 -0500
commit3421d01bb00aaf52883a4d21eade96e9c663e05d (patch)
treef294c52c8d1d12774629a2d410ec157504af3f57 /tdm/kfrontend/themer/tdmrect.cpp
parent9804217b51b058fed43a060a746f543da044b2a5 (diff)
downloadtdebase-3421d01bb00aaf52883a4d21eade96e9c663e05d.tar.gz
tdebase-3421d01bb00aaf52883a4d21eade96e9c663e05d.zip
Fix TDM hang in certain circumstances when themed greeter is deleted
This resolves Bug 1453 Resolve themed greeter drawing inconsistencies between composited and non-composited mode
Diffstat (limited to 'tdm/kfrontend/themer/tdmrect.cpp')
-rw-r--r--tdm/kfrontend/themer/tdmrect.cpp33
1 files changed, 22 insertions, 11 deletions
diff --git a/tdm/kfrontend/themer/tdmrect.cpp b/tdm/kfrontend/themer/tdmrect.cpp
index 9056a513c..a92b0f679 100644
--- a/tdm/kfrontend/themer/tdmrect.cpp
+++ b/tdm/kfrontend/themer/tdmrect.cpp
@@ -57,8 +57,9 @@ KdmRect::init( const TQDomNode &node, const char * )
rect.hasBorder = false;
// A rect can have no properties (defaults to parent ones)
- if (node.isNull())
+ if (node.isNull()) {
return;
+ }
// Read RECT ID
TQDomNode n = node;
@@ -75,18 +76,22 @@ KdmRect::init( const TQDomNode &node, const char * )
parseColor( el.attribute( "color", TQString::null ), rect.normal.color );
rect.normal.alpha = el.attribute( "alpha", "1.0" ).toFloat();
parseFont( el.attribute( "font", "Sans 14" ), rect.normal.font );
- } else if (tagName == "active") {
+ }
+ else if (tagName == "active") {
rect.active.present = true;
parseColor( el.attribute( "color", TQString::null ), rect.active.color );
rect.active.alpha = el.attribute( "alpha", "1.0" ).toFloat();
parseFont( el.attribute( "font", "Sans 14" ), rect.active.font );
- } else if (tagName == "prelight") {
+ }
+ else if (tagName == "prelight") {
rect.prelight.present = true;
parseColor( el.attribute( "color", TQString::null ), rect.prelight.color );
rect.prelight.alpha = el.attribute( "alpha", "1.0" ).toFloat();
parseFont( el.attribute( "font", "Sans 14" ), rect.prelight.font );
- } else if (tagName == "border")
+ }
+ else if (tagName == "border") {
rect.hasBorder = true;
+ }
}
}
@@ -95,18 +100,22 @@ KdmRect::drawContents( TQPainter *p, const TQRect &r )
{
// choose the correct rect class
RectStruct::RectClass *rClass = &rect.normal;
- if (state == Sactive && rect.active.present)
+ if (state == Sactive && rect.active.present) {
rClass = &rect.active;
- if (state == Sprelight && rect.prelight.present)
+ }
+ if (state == Sprelight && rect.prelight.present) {
rClass = &rect.prelight;
+ }
- if (rClass->alpha <= 0 || !rClass->color.isValid())
+ if (rClass->alpha <= 0 || !rClass->color.isValid()) {
return;
+ }
- if (rClass->alpha == 1)
+ if (rClass->alpha == 1) {
p->fillRect( area, TQBrush( rClass->color ) );
+ }
else {
-// if ((_compositor.isEmpty()) || (!argb_visual_available)) {
+// if (!argb_visual_available) {
// Software blend only (no compositing support)
TQRect backRect = r;
backRect.moveBy( area.x(), area.y() );
@@ -127,11 +136,13 @@ void
KdmRect::statusChanged()
{
KdmItem::statusChanged();
- if (!rect.active.present && !rect.prelight.present)
+ if (!rect.active.present && !rect.prelight.present) {
return;
+ }
if ((state == Sprelight && !rect.prelight.present) ||
- (state == Sactive && !rect.active.present))
+ (state == Sactive && !rect.active.present)) {
return;
+ }
needUpdate();
}