All pastes #800569 Raw Edit

Unnamed

public text v1 · immutable
#800569 ·published 2007-11-28 15:42 UTC
rendered paste body
Index: runtime/kstyles/oxygen/oxygen.cpp
===================================================================
--- runtime/kstyles/oxygen/oxygen.cpp   (revision 742660)
+++ runtime/kstyles/oxygen/oxygen.cpp   (working copy)
@@ -2028,10 +2028,12 @@ bool OxygenStyle::eventFilter(QObject *o
         if (ev->type() == QEvent::Paint)
         {
             QWidget *widget = static_cast<QWidget*>(obj);
-            QPainter p(widget);
-            QPaintEvent *e = (QPaintEvent*)ev;
-            p.setClipRegion(e->region());
-            renderWindowBackground(&p, e->rect(), widget);
+            if (widget->autoFillBackground()) {
+                QPainter p(widget);
+                QPaintEvent *e = (QPaintEvent*)ev;
+                p.setClipRegion(e->region());
+                renderWindowBackground(&p, e->rect(), widget);
+            }
         }
         return false;
     }