From: Felix Domke Date: Tue, 22 Mar 2005 02:58:52 +0000 (+0000) Subject: - added hack for disabling actions on hidden windows. FIX ME X-Git-Tag: 2.6.0~5917 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/cfe43ee16030fd37f6bce9ba99e367c15ecbf44f - added hack for disabling actions on hidden windows. FIX ME --- diff --git a/lib/gui/elistbox.cpp b/lib/gui/elistbox.cpp index a6fe45f1..7764e6b5 100644 --- a/lib/gui/elistbox.cpp +++ b/lib/gui/elistbox.cpp @@ -130,8 +130,12 @@ int eListbox::event(int event, void *data, void *data2) return 0; } case evtAction: - moveSelection((int)data2); - return 1; + if (isVisible()) + { + moveSelection((int)data2); + return 1; + } + break; default: return eWidget::event(event, data, data2); } diff --git a/lib/gui/ewidget.h b/lib/gui/ewidget.h index 97eb1434..fbe5a92a 100644 --- a/lib/gui/ewidget.h +++ b/lib/gui/ewidget.h @@ -33,6 +33,10 @@ public: int getStyle(ePtr &style) { if (!m_style) return 1; style = m_style; return 0; } void setStyle(eWindowStyle *style) { m_style = style; } + /* untested code */ + int isVisible() { return (m_vis & wVisShow) && ((!m_parent) || m_parent->isVisible()); } + /* ... */ + private: eWidgetDesktop *m_desktop;