diff --git a/coreengine/animation.c b/coreengine/animation.c index 2e703ee..3e40a4a 100644 --- a/coreengine/animation.c +++ b/coreengine/animation.c @@ -342,7 +342,7 @@ void cAnimation::Blink(void) { Sleep(freq); if (Running()) { blinkable->DoBlink(blinkFunc, blinkOn); - blinkable->Flush(); + blinkable->Flush(); } blinkOn = !blinkOn; } diff --git a/coreengine/area.h b/coreengine/area.h index 5f3a8e9..256feda 100644 --- a/coreengine/area.h +++ b/coreengine/area.h @@ -42,6 +42,7 @@ public: bool ActiveTab(void) { return activeTab; }; virtual int GetWidth(void) { return 0; }; virtual void Cache(void) {}; + virtual void StopBlinkers(void) {}; virtual void Close(void) {}; virtual void Clear(void) {}; virtual void Hide(void) {}; @@ -82,7 +83,6 @@ private: void CreatePixmap(cRect drawPort = cRect::Null); void SetScrollFunc(void); void StartBlinkers(void); - void StopBlinkers(void); public: cArea(void); cArea(const cArea &other); @@ -131,6 +131,7 @@ public: //Blinkable int BlinkFreq(int func); void DoBlink(int func, bool on); + void StopBlinkers(void); //Common const char *Name(void) { return attribs->Name(); }; bool BackgroundArea(void) { return attribs->BackgroundArea(); }; diff --git a/coreengine/view.c b/coreengine/view.c index 0a323bc..2aba313 100644 --- a/coreengine/view.c +++ b/coreengine/view.c @@ -215,6 +215,11 @@ void cView::Render(int ve, bool force) { } void cView::Close(void) { + for (int i=0; i < numViewElements; i++) { + if (!viewElements[i]) + continue; + viewElements[i]->StopBlinking(); + } delete fader; fader = NULL; delete shifter; diff --git a/coreengine/viewelement.c b/coreengine/viewelement.c index 69377d0..cf05733 100644 --- a/coreengine/viewelement.c +++ b/coreengine/viewelement.c @@ -319,6 +319,12 @@ void cViewElement::Close(void) { blocked = false; } +void cViewElement::StopBlinking(void) { + for (cAreaNode *node = areaNodes.First(); node; node = areaNodes.Next(node)) { + node->StopBlinkers(); + } +} + void cViewElement::Render(void) { if (!dirty || blocked) return; diff --git a/coreengine/viewelement.h b/coreengine/viewelement.h index 1f7db74..dedbcbf 100644 --- a/coreengine/viewelement.h +++ b/coreengine/viewelement.h @@ -61,6 +61,7 @@ public: void SetAreaHeight(int height); void Cache(void); virtual void Close(void); + void StopBlinking(void); virtual void Clear(void); void Hide(void); void Show(void);