fix: invalidate in non-visible widget invalidated visible stuff
authorFelix Domke <tmbinc@elitedvb.net>
Sat, 15 Oct 2005 23:52:16 +0000 (23:52 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Sat, 15 Oct 2005 23:52:16 +0000 (23:52 +0000)
lib/gui/ewidgetdesktop.cpp
lib/gui/ewidgetdesktop.h

index dcc2ef6..fb0f39d 100644 (file)
@@ -66,6 +66,8 @@ void eWidgetDesktop::calcWidgetClipRegion(eWidget *widget, gRegion &parent_visib
        for (ePtrList<eWidget>::iterator i(widget->m_childs.begin()); i != widget->m_childs.end(); ++i)
                if (i->m_vis & eWidget::wVisShow)
                        calcWidgetClipRegion(*i, widget->m_visible_region);
        for (ePtrList<eWidget>::iterator i(widget->m_childs.begin()); i != widget->m_childs.end(); ++i)
                if (i->m_vis & eWidget::wVisShow)
                        calcWidgetClipRegion(*i, widget->m_visible_region);
+               else
+                       clearVisibility(*i);
 }
 
 void eWidgetDesktop::recalcClipRegions(eWidget *root)
 }
 
 void eWidgetDesktop::recalcClipRegions(eWidget *root)
@@ -79,7 +81,10 @@ void eWidgetDesktop::recalcClipRegions(eWidget *root)
                for (ePtrList<eWidget>::iterator i(m_root.begin()); i != m_root.end(); ++i)
                {
                        if (!(i->m_vis & eWidget::wVisShow))
                for (ePtrList<eWidget>::iterator i(m_root.begin()); i != m_root.end(); ++i)
                {
                        if (!(i->m_vis & eWidget::wVisShow))
+                       {
+                               clearVisibility(i);
                                continue;
                                continue;
+                       }
                        
                        gRegion visible_before = i->m_visible_with_childs;
 
                        
                        gRegion visible_before = i->m_visible_with_childs;
 
@@ -94,10 +99,11 @@ void eWidgetDesktop::recalcClipRegions(eWidget *root)
                
                gRegion redraw = (background_before - m_screen.m_background_region) | (m_screen.m_background_region - background_before);
                invalidate(redraw);
                
                gRegion redraw = (background_before - m_screen.m_background_region) | (m_screen.m_background_region - background_before);
                invalidate(redraw);
-       } else
+       } else if (m_comp_mode == cmBuffered)
        {
                if (!root->m_vis & eWidget::wVisShow)
                {
        {
                if (!root->m_vis & eWidget::wVisShow)
                {
+                       clearVisibility(root);
                        removeBufferForWidget(root);
                        return;
                }
                        removeBufferForWidget(root);
                        return;
                }
@@ -387,3 +393,10 @@ void eWidgetDesktop::notify()
 {
        redrawComposition(1);
 }
 {
        redrawComposition(1);
 }
+
+void eWidgetDesktop::clearVisibility(eWidget *widget)
+{
+       widget->m_visible_with_childs = gRegion();
+       for (ePtrList<eWidget>::iterator i(widget->m_childs.begin()); i != widget->m_childs.end(); ++i)
+               clearVisibility(*i);
+}
index 117138b..9fbe1bc 100644 (file)
@@ -81,6 +81,8 @@ private:
        
        void redrawComposition(int notifed);
        void notify();
        
        void redrawComposition(int notifed);
        void notify();
+       
+       void clearVisibility(eWidget *widget);
 };
 
 #endif
 };
 
 #endif