fix flags
[enigma2.git] / lib / gui / ewidget.cpp
index e05042965b5cfaad310bdf63b1aa68c16104dca2..8a396ad36e09a1d533d25c2da817defc6e8280b0 100644 (file)
@@ -205,10 +205,14 @@ void eWidget::setZPosition(int z)
 
 void eWidget::setTransparent(int transp)
 {
-       if (transp)
-               m_vis |= wVisTransparent;
-       else
-               m_vis &=~wVisTransparent;
+       if (isTransparent() != transp)
+       {
+               if (transp)
+                       m_vis |= wVisTransparent;
+               else
+                       m_vis &=~wVisTransparent;
+               recalcClipRegionsWhenVisible();
+       }
 }
 
 ePoint eWidget::getAbsolutePosition()
@@ -341,8 +345,13 @@ int eWidget::event(int event, void *data, void *data2)
                        }
                } else
                {
-                       if (m_have_background_color)
-                               painter.setBackgroundColor(m_background_color);
+                       eWidget *w = this;
+                       
+                       while (w && !w->m_have_background_color)
+                               w = w->m_parent;
+
+                       if (w)
+                               painter.setBackgroundColor(w->m_background_color);
                }
                break;
        }