mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
fixed possible deadlock when closing osd with blinking element
This commit is contained in:
parent
f2c492d81c
commit
cdc1c10204
@ -342,7 +342,7 @@ void cAnimation::Blink(void) {
|
|||||||
Sleep(freq);
|
Sleep(freq);
|
||||||
if (Running()) {
|
if (Running()) {
|
||||||
blinkable->DoBlink(blinkFunc, blinkOn);
|
blinkable->DoBlink(blinkFunc, blinkOn);
|
||||||
blinkable->Flush();
|
blinkable->Flush();
|
||||||
}
|
}
|
||||||
blinkOn = !blinkOn;
|
blinkOn = !blinkOn;
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,7 @@ public:
|
|||||||
bool ActiveTab(void) { return activeTab; };
|
bool ActiveTab(void) { return activeTab; };
|
||||||
virtual int GetWidth(void) { return 0; };
|
virtual int GetWidth(void) { return 0; };
|
||||||
virtual void Cache(void) {};
|
virtual void Cache(void) {};
|
||||||
|
virtual void StopBlinkers(void) {};
|
||||||
virtual void Close(void) {};
|
virtual void Close(void) {};
|
||||||
virtual void Clear(void) {};
|
virtual void Clear(void) {};
|
||||||
virtual void Hide(void) {};
|
virtual void Hide(void) {};
|
||||||
@ -82,7 +83,6 @@ private:
|
|||||||
void CreatePixmap(cRect drawPort = cRect::Null);
|
void CreatePixmap(cRect drawPort = cRect::Null);
|
||||||
void SetScrollFunc(void);
|
void SetScrollFunc(void);
|
||||||
void StartBlinkers(void);
|
void StartBlinkers(void);
|
||||||
void StopBlinkers(void);
|
|
||||||
public:
|
public:
|
||||||
cArea(void);
|
cArea(void);
|
||||||
cArea(const cArea &other);
|
cArea(const cArea &other);
|
||||||
@ -131,6 +131,7 @@ public:
|
|||||||
//Blinkable
|
//Blinkable
|
||||||
int BlinkFreq(int func);
|
int BlinkFreq(int func);
|
||||||
void DoBlink(int func, bool on);
|
void DoBlink(int func, bool on);
|
||||||
|
void StopBlinkers(void);
|
||||||
//Common
|
//Common
|
||||||
const char *Name(void) { return attribs->Name(); };
|
const char *Name(void) { return attribs->Name(); };
|
||||||
bool BackgroundArea(void) { return attribs->BackgroundArea(); };
|
bool BackgroundArea(void) { return attribs->BackgroundArea(); };
|
||||||
|
@ -215,6 +215,11 @@ void cView::Render(int ve, bool force) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cView::Close(void) {
|
void cView::Close(void) {
|
||||||
|
for (int i=0; i < numViewElements; i++) {
|
||||||
|
if (!viewElements[i])
|
||||||
|
continue;
|
||||||
|
viewElements[i]->StopBlinking();
|
||||||
|
}
|
||||||
delete fader;
|
delete fader;
|
||||||
fader = NULL;
|
fader = NULL;
|
||||||
delete shifter;
|
delete shifter;
|
||||||
|
@ -319,6 +319,12 @@ void cViewElement::Close(void) {
|
|||||||
blocked = false;
|
blocked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cViewElement::StopBlinking(void) {
|
||||||
|
for (cAreaNode *node = areaNodes.First(); node; node = areaNodes.Next(node)) {
|
||||||
|
node->StopBlinkers();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void cViewElement::Render(void) {
|
void cViewElement::Render(void) {
|
||||||
if (!dirty || blocked)
|
if (!dirty || blocked)
|
||||||
return;
|
return;
|
||||||
|
@ -61,6 +61,7 @@ public:
|
|||||||
void SetAreaHeight(int height);
|
void SetAreaHeight(int height);
|
||||||
void Cache(void);
|
void Cache(void);
|
||||||
virtual void Close(void);
|
virtual void Close(void);
|
||||||
|
void StopBlinking(void);
|
||||||
virtual void Clear(void);
|
virtual void Clear(void);
|
||||||
void Hide(void);
|
void Hide(void);
|
||||||
void Show(void);
|
void Show(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user