diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2010-02-12 14:23:02 +0100 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2010-02-12 14:23:02 +0100 |
| commit | ae12f5e4894a65289aeafd97931e1651939bf8b1 (patch) | |
| tree | 09b0cae757952d7b3a965a1a8f80d5221defdcd5 | |
| parent | 893e7e32f23e12aec86c1aa5d2adf41095ce92f5 (diff) | |
| parent | 04e48eed8c5dfc1e1a642b52ab0d03e40171e86e (diff) | |
| download | enigma2-ae12f5e4894a65289aeafd97931e1651939bf8b1.tar.gz enigma2-ae12f5e4894a65289aeafd97931e1651939bf8b1.zip | |
Merge branch 'bug_387_small_spinner_fix'
| -rw-r--r-- | lib/base/ebase.cpp | 1 | ||||
| -rw-r--r-- | lib/base/ebase.h | 4 | ||||
| -rw-r--r-- | lib/gdi/grc.cpp | 8 | ||||
| -rw-r--r-- | lib/gdi/grc.h | 1 |
4 files changed, 12 insertions, 2 deletions
diff --git a/lib/base/ebase.cpp b/lib/base/ebase.cpp index 313732ab..5bafe732 100644 --- a/lib/base/ebase.cpp +++ b/lib/base/ebase.cpp @@ -225,6 +225,7 @@ int eMainloop::processOneEvent(unsigned int twisted_timeout, PyObject **res, ePy } m_is_idle = 1; + ++m_idle_count; if (this == eApp) { diff --git a/lib/base/ebase.h b/lib/base/ebase.h index 524052bd..c69133f6 100644 --- a/lib/base/ebase.h +++ b/lib/base/ebase.h @@ -195,6 +195,7 @@ class eMainloop int processOneEvent(unsigned int user_timeout, PyObject **res=0, ePyObject additional=ePyObject()); int retval; int m_is_idle; + int m_idle_count; eSocketNotifier *m_inActivate; int m_interrupt_requested; @@ -210,7 +211,7 @@ public: #endif eMainloop() - :app_quit_now(0),loop_level(0),retval(0), m_is_idle(0), m_inActivate(0), m_interrupt_requested(0) + :app_quit_now(0),loop_level(0),retval(0), m_is_idle(0), m_idle_count(0), m_inActivate(0), m_interrupt_requested(0) { existing_loops.push_back(this); } @@ -240,6 +241,7 @@ public: /* m_is_idle needs to be atomic, but it doesn't really matter much, as it's read-only from outside */ int isIdle() { return m_is_idle; } + int idleCount() { return m_idle_count; } }; /** diff --git a/lib/gdi/grc.cpp b/lib/gdi/grc.cpp index 1f1b06a0..dff6b059 100644 --- a/lib/gdi/grc.cpp +++ b/lib/gdi/grc.cpp @@ -164,7 +164,13 @@ void *gRC::thread() if (pthread_cond_timedwait(&cond, &mutex, &timeout) == ETIMEDOUT) { if (eApp && !eApp->isIdle()) - idle = 0; + { + int idle_count = eApp->idleCount(); + if (idle_count == m_prev_idle_count) + idle = 0; + else + m_prev_idle_count = idle_count; + } } if (!idle) diff --git a/lib/gdi/grc.h b/lib/gdi/grc.h index 5d0106b3..3b8201ad 100644 --- a/lib/gdi/grc.h +++ b/lib/gdi/grc.h @@ -176,6 +176,7 @@ class gRC: public iObject, public Object ePtr<gCompositingData> m_compositing; + int m_prev_idle_count; public: gRC(); virtual ~gRC(); |
