diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2007-07-13 16:07:25 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2007-07-13 16:07:25 +0000 |
| commit | c917eef3dc01ada59fc5f3f1e63036ee6fcb5bba (patch) | |
| tree | 9596cd778e1f93455555f62e0f2cfd542103a465 /lib/gui/ewidget.cpp | |
| parent | 31ae4773f86fa2732b81d60c8d8def4321d9fb9e (diff) | |
| download | enigma2-c917eef3dc01ada59fc5f3f1e63036ee6fcb5bba.tar.gz enigma2-c917eef3dc01ada59fc5f3f1e63036ee6fcb5bba.zip | |
add 'parent visibility changes' notification and use that to fix video widget
Diffstat (limited to 'lib/gui/ewidget.cpp')
| -rw-r--r-- | lib/gui/ewidget.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/gui/ewidget.cpp b/lib/gui/ewidget.cpp index 6d02ebaf..a0a089a6 100644 --- a/lib/gui/ewidget.cpp +++ b/lib/gui/ewidget.cpp @@ -100,6 +100,9 @@ void eWidget::show() return; m_vis |= wVisShow; + eDebug("show widget %p", this); + notifyShowHide(); + /* TODO: optimize here to only recalc what's required. possibly merge with hide. */ eWidget *root = this; ePoint abspos = position(); @@ -133,10 +136,12 @@ void eWidget::hide() if (!(m_vis & wVisShow)) return; m_vis &= ~wVisShow; + /* this is a workaround to the above problem. when we are in the delete phase, don't hide childs. */ if (!(m_parent || m_desktop)) return; + notifyShowHide(); /* TODO: optimize here to only recalc what's required. possibly merge with show. */ eWidget *root = this; @@ -361,3 +366,9 @@ void eWidget::setFocus(eWidget *focus) m_current_focus->event(evtFocusGot, this); } +void eWidget::notifyShowHide() +{ + event(evtParentVisibilityChanged); + for (ePtrList<eWidget>::iterator i(m_childs.begin()); i != m_childs.end(); ++i) + i->notifyShowHide(); +} |
