mirror of
				https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
				synced 2023-10-19 15:58:31 +00:00 
			
		
		
		
	fixed possible deadlock when closing osd with blinking element
This commit is contained in:
		| @@ -342,7 +342,7 @@ void cAnimation::Blink(void) { | ||||
|         Sleep(freq); | ||||
|         if (Running()) { | ||||
|             blinkable->DoBlink(blinkFunc, blinkOn); | ||||
|             blinkable->Flush();   | ||||
|             blinkable->Flush(); | ||||
|         } | ||||
|         blinkOn = !blinkOn; | ||||
|     } | ||||
|   | ||||
| @@ -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(); }; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user