mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
gui/components/cc_frm_clock: disable thread idle timeout; clear clock when thread exits
Origin commit data
------------------
Commit: 9472155b88
Author: martii <m4rtii@gmx.de>
Date: 2014-01-02 (Thu, 02 Jan 2014)
This commit is contained in:
@@ -258,8 +258,10 @@ void* CComponentsFrmClock::initClockThread(void *arg)
|
||||
pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS,0);
|
||||
|
||||
CComponentsFrmClock *clock = static_cast<CComponentsFrmClock*>(arg);
|
||||
#if 0
|
||||
time_t count = time(0);
|
||||
std::string format_str_save = clock->cl_format_str;
|
||||
#endif
|
||||
std::string format_str_save = clock->cl_format_str; // FIXME. This will cause setClockFormat() to be ignored. --martii
|
||||
//start loop for paint
|
||||
while(clock != NULL) {
|
||||
if (clock->paintClock) {
|
||||
@@ -274,12 +276,16 @@ void* CComponentsFrmClock::initClockThread(void *arg)
|
||||
}
|
||||
//paint segements, but wihtout saved backgrounds
|
||||
clock->paint(CC_SAVE_SCREEN_NO);
|
||||
#if 0
|
||||
count = time(0);
|
||||
#endif
|
||||
}
|
||||
#if 0 // memory leak, thread will not be joined --martii
|
||||
if (time(0) >= count+30) {
|
||||
clock->cl_thread = 0;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
mySleep(clock->cl_interval);
|
||||
}
|
||||
return 0;
|
||||
@@ -316,6 +322,7 @@ bool CComponentsFrmClock::stopThread()
|
||||
return false;
|
||||
}
|
||||
}
|
||||
kill();
|
||||
cl_thread = 0;
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user